View previous topic :: View next topic |
Author |
Message |
absurder How do I cheat? Reputation: 0
Joined: 06 Nov 2016 Posts: 1
|
Posted: Sun Nov 06, 2016 8:44 pm Post subject: Found instructions that set coords of players... Now what? |
|
|
Hi. I am trying to reverse-engineer a 2D game. I have found the instructions that write to the coordinates of the NPCs and your player.
I am looking for a way to programatically find these values that the instructions have written to via C#. My question is, how would I do this? I know how to read/write process memory in C#, but is there a way to view what an instruction writes to? Or can I mod the executable to log to an empty data segment and then read off of that? Thanks
|
|
Back to top |
|
|
Zanzer I post too much Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Sun Nov 06, 2016 10:20 pm Post subject: |
|
|
You can include a debugger with your application to perform the same features as Find out what addresses this instruction accesses.
Alternatively, you can do as you suggested and write your own code injection. Save the value of the register to a custom variable yourself.
Anything CE does, you could code yourself. All of the source code is there.
I doubt you're going to get anyone posting the code for you.
Go search about how to implement a debugger or perform code injections for C#.
|
|
Back to top |
|
|
ulysse31 Master Cheater Reputation: 2
Joined: 19 Mar 2015 Posts: 324 Location: Paris
|
Posted: Sun Nov 06, 2016 11:58 pm Post subject: |
|
|
You probably will want to go for option 2 that zanzer mentioned.
say this code writes your coordonates :
mov [ebx], eax
You could scan for code caves with cheat engine, say at address 04567812 you have a code cave. you hook the code from the application and save the ebx value which you know holds the coodonates variable. You also save eax which you know holds the latest coordonates value written.
Ie you inject those codes :
mov [ 04567812],ebx
mov [ 04567816],eax
and then the original code :
mov [ebx], eax
You have several solutions for injecting your code, injecting a dll, make it allocate some memory and write your code there will be cleaner and more patch proof, might require more learning and coding time for the first attempt.
You can alsojust use writeprocessmemory the write bytes that will be executed as your code into newly allocated memory or code cave, I guess it's quicker on the short term.
|
|
Back to top |
|
|
|