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 


Using EAX and EDX registers

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
zm0d
Master Cheater
Reputation: 7

Joined: 06 Nov 2013
Posts: 423

PostPosted: Wed Apr 30, 2014 3:52 am    Post subject: Reply with quote

Use code-caves to write the register value to some allocated memory you can access. (What is a code-cave? http://www.codeproject.com/Articles/20240/The-Beginners-Guide-to-Codecaves)

To write a JMP to your code cave and insert a new MOV opcode to extract your registers value to allocated memory use array of bytes with the hexadecimal opcodes (e.g. NOP = 0x90, JMP = 0xE9, .....)

List of opcodes with hex: http://www.mathemainzel.info/files/x86asmref.html

Important WinApi-Methods:
Arrow OpenProcess Arrow only when not using an injected DLL.
Arrow VirtualAlloc(Ex) Arrow allocates memory for your code-cave.
Arrow WriteProcessMemory
Arrow ReadProcessMemory
Back to top
View user's profile Send private message
zm0d
Master Cheater
Reputation: 7

Joined: 06 Nov 2013
Posts: 423

PostPosted: Wed Apr 30, 2014 4:36 am    Post subject: Reply with quote

You can't do that unless you're using breakpoints.

To find this values stored in registers use base pointers and/or code injection, especially code caves as mentioned above.
Back to top
View user's profile Send private message
Rydian
Grandmaster Cheater Supreme
Reputation: 31

Joined: 17 Sep 2012
Posts: 1358

PostPosted: Wed Apr 30, 2014 7:12 am    Post subject: Reply with quote

m4x3t wrote:
Just what I want is my program to know what CheatEngine knows. In CE I can see EAX=0x12345678, and I want my program to use that automatically without me using CE.
Terraria compiles itself every time it's run, in addition to this it doesn't even load/compile certain code until it's needed (so for example the code that controls mercy invincibility doesn't exist until you get hit the first time after starting the game).

So as far as I see the options are...

A - Native edits for it, since it's .NET/XNA and thus not fully compiled on the harddrive, and moddable.

B - AOB scans for the code that edits the values in the first place, which is most of what I did for the game.
http://forum.cheatengine.org/viewtopic.php?p=5510987
http://forum.cheatengine.org/viewtopic.php?t=568669

C - Code injection and debugging stuff for you to grab the info out of the registers and junk like is being discussed.

_________________
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