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 


Found instructions that set coords of players... Now what?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
absurder
How do I cheat?
Reputation: 0

Joined: 06 Nov 2016
Posts: 1

PostPosted: Sun Nov 06, 2016 8:44 pm    Post subject: Found instructions that set coords of players... Now what? Reply with quote

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
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Sun Nov 06, 2016 10:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
ulysse31
Master Cheater
Reputation: 2

Joined: 19 Mar 2015
Posts: 324
Location: Paris

PostPosted: Sun Nov 06, 2016 11:58 pm    Post subject: Reply with quote

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
View user's profile Send private message
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