Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Hi there I am having trouble with some shared opcodes

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
denismu321
Newbie cheater
Reputation: 0

Joined: 24 Dec 2018
Posts: 20

PostPosted: Wed Sep 14, 2022 2:29 pm    Post subject: Hi there I am having trouble with some shared opcodes Reply with quote

The game I am talking about is Shadowrun returns.
Now I can make it work, to not harm the group and to get one hit kills on enemies, but it is not persistent.

Means when I restart the game it is gone, or when I change the scene.
I have achieved it with writing CE scripts.

My question would be, how can I make the game changes through the script persistent ?

Thanks a lot in advance,

Denis.
Back to top
View user's profile Send private message Send e-mail
cooleko
Grandmaster Cheater
Reputation: 11

Joined: 04 May 2016
Posts: 717

PostPosted: Wed Sep 14, 2022 2:37 pm    Post subject: Reply with quote

So you are saying you already have an AOB script that runs on a shared instruction, but that the discrepancy you found such as a value at offset 20 in the structure changes every time? So sometimes 30 is you and 50 is the enemy, or sometimes 99 is you and 300 is the enemy?

In that case, you need to look for a pattern you can apply or consider another offset!

Or are you saying that sometimes offset 30 has info and sometimes offset 50 has it? If so, then you could check both and execute if either has it, just don't load a null pointer or you will likely crash the game!

Either way, we need a bit more information to help.
Back to top
View user's profile Send private message
denismu321
Newbie cheater
Reputation: 0

Joined: 24 Dec 2018
Posts: 20

PostPosted: Wed Sep 14, 2022 2:57 pm    Post subject: Hi thank you for responding Reply with quote

Well actually I think that I have written one script as AOB Injection, and the other as Code Injection. Now the problem really is just that I cannot activate the scripts after restarting the game, or changing the scene.

I simply cannot activate them.

I will post the content of both of them here if it helps.

this one being the AOB script

Code:


aobscan(INJECT,89 86 9C 00 00 00 39 36 83 EC 0C 68 E0 67 5A 1C E8 40) // should be unique
alloc(newmem,$1000)

label(code)
label(return)
label(kill)

newmem:

code:
  cmp [esi+a4],2
  jne kill
  jmp return

kill:
  mov [esi+9c],00
  fldz
  jmp return

INJECT:
  jmp newmem
  nop
return:
registersymbol(INJECT)



and this for the Code Injection script

Code:


alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)
label(kill)
newmem: //this is allocated memory, you have read,write,execute access
//place your code here
cmp [esi+98],3
jne kill
jmp exit

kill:
mov [esi+9c],00
jmp exit

originalcode:
//mov [esi+0000009C],eax

exit:
jmp returnhere

067C4B13:
jmp newmem
nop
returnhere:



thank you for your effort.
Back to top
View user's profile Send private message Send e-mail
cooleko
Grandmaster Cheater
Reputation: 11

Joined: 04 May 2016
Posts: 717

PostPosted: Wed Sep 14, 2022 9:20 pm    Post subject: Reply with quote

Is the script executing and just not working or is it not executing?

If not executing at all:

Do a search for type array of bytes using that AOB while the game is running, if you can find it then cheat engine can.

Always rename the injection point to something unique, you can reuse names so leaving it as default will eventually cause things to not work.

If not working, then break and trace your compare and observe what values it is actually seeing to debug what you might be doing wrong.
Back to top
View user's profile Send private message
denismu321
Newbie cheater
Reputation: 0

Joined: 24 Dec 2018
Posts: 20

PostPosted: Thu Sep 15, 2022 2:00 am    Post subject: Hi thanks for answering Reply with quote

Hi, I was just wondering, what could be causing this kind of problem.
Could it be that the debugger was the wrong one ?
I was using the windows one, but I was told to use the VEH debugger ?

Thanks for an answer,

Denis.
Back to top
View user's profile Send private message Send e-mail
cooleko
Grandmaster Cheater
Reputation: 11

Joined: 04 May 2016
Posts: 717

PostPosted: Thu Sep 15, 2022 3:04 am    Post subject: Reply with quote

The only reason I know for a script with an AOB scan in it to not activate is the AOB doesn't exist.

I tend to only change debuggers if attaching it to the process causes a crash.
Back to top
View user's profile Send private message
denismu321
Newbie cheater
Reputation: 0

Joined: 24 Dec 2018
Posts: 20

PostPosted: Thu Sep 15, 2022 5:31 am    Post subject: Hello Reply with quote

I have tried ,like you suggested, to make an AOB scan with cheat engine for the bytes in the script.

Cheat Engine won't find them.

What does that mean ?

Do you probably have any suggestions what to try next ?
Back to top
View user's profile Send private message Send e-mail
sbryzl
Master Cheater
Reputation: 6

Joined: 25 Jul 2016
Posts: 252

PostPosted: Thu Sep 15, 2022 2:16 pm    Post subject: Reply with quote

Your aob probably covers instructions that use memory locations which will likely be different each time you start the game. You need to use wildcards for the memory location parts and if you can't find a unique aob that way you may need a different method.
Back to top
View user's profile Send private message
denismu321
Newbie cheater
Reputation: 0

Joined: 24 Dec 2018
Posts: 20

PostPosted: Thu Sep 15, 2022 3:05 pm    Post subject: Hello thanks again Reply with quote

Thank you for your advice regarding wildcards.
Can you somehow point me in the right direction about using them ?
Maybe CE related ?

I am still a novice in these things.

Thanks for the patience.

Denis.
Back to top
View user's profile Send private message Send e-mail
sbryzl
Master Cheater
Reputation: 6

Joined: 25 Jul 2016
Posts: 252

PostPosted: Thu Sep 15, 2022 4:08 pm    Post subject: Reply with quote

This looks like what your aob probably covers:

Code:
89 86 9C 00 00 00       mov [rsi+0x9c],eax
39 36                   cmp [rsi],esi
83 EC 0C                sub esp,0C
68 E0 67 5A 1C          push 1C5A67E0
E8 40 ?? ?? ??          call ????????


The values after the call are probably a memory location and the "1C5A67E0" is also a memory location which can change so when you make the aob just use a ? or ?? for each wildcard. eg:

Code:
aobscan(INJECT,89 86 9C 00 00 00 39 36 83 EC 0C 68 ? ? ? ? E8 ? ? ? ?)
Back to top
View user's profile Send private message
denismu321
Newbie cheater
Reputation: 0

Joined: 24 Dec 2018
Posts: 20

PostPosted: Thu Sep 15, 2022 4:16 pm    Post subject: Thanks for explaining Reply with quote

Thank you for your answer and the mentioned method.

My problem now is, when I have figured out the offset for the cmp instruction,
to tell when an enemy gets hit or not, I just have to load a different save game and the values from dissecting the structures change.

So far I have not found a method to find a valid offset for the cmp.

Are there any tricks or techniques usable from Cheat Engine to solve this problem ?
Back to top
View user's profile Send private message Send e-mail
sbryzl
Master Cheater
Reputation: 6

Joined: 25 Jul 2016
Posts: 252

PostPosted: Thu Sep 15, 2022 7:19 pm    Post subject: Reply with quote

If you mean finding an indicator to distinguish from friend or foe there are a few things you could try.

I usually look for bit flags or base pointers for friend foe data arrays.

You could try to find multilevel pointers for your address then see if there's a point in it where friend/foe can be distinguished. This is a more challenging thing to do.

Often I will find something on stack which makes it pretty simple.

You could plug base pointers for different characters into data/structure compare. Put all friends on one side and enemies on other, check to only find matching groups, and run the scan which will probably find a lot of unimportant data you'll have to sort through.
Back to top
View user's profile Send private message
denismu321
Newbie cheater
Reputation: 0

Joined: 24 Dec 2018
Posts: 20

PostPosted: Fri Sep 16, 2022 4:10 am    Post subject: Reply with quote

Thank you I already tried dissecting the structures.
I am not so firm as to look into the stack,but I think I could
give multi level pointers a try.

Thanks for your patience ,

Denis.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites