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 


How to calculate pointer of address "edi"?

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

Joined: 30 May 2018
Posts: 5

PostPosted: Wed May 30, 2018 10:45 am    Post subject: How to calculate pointer of address "edi"? Reply with quote

Greetings,

I'm using Cheat Engine 6.7, I know various programming languages, a bit about assembly & assemblers & compilation etc, but I'm relatively new to using Cheat Engine and its Gamehacking process. Watched a few video tutorials in the past but now I'm trying to have AHK (AutoHotKey) access the value of ammunition in a game (even if it's just the display value) so I can make an auto-clicker which does not continue spamming after there's 0 ammo.

So I can easily locate the display value of the ammo-count (of the weapon currently selected; perfect for my need!) and it's a double, despite being an integer in-game. Opening up the debugger I can find two instructions that access that address whenever a shot is fired, but they both refer to "edi" which is a reference to a reigster or something? Many tutorials use offsets with a register reference, but this directly uses the "edi" address, so I don't know how to calculate the pointer.

I included an annotated screenshot of the debugger in the attachments (because I can't post BBCode image urls).

Any ideas on how I can make/get a pointer that points to the ammo count on every restart of the game and every player death (because that changes the address also; wherein I assume these are called multi-level pointers)?

Kind Regards,
NeoJ.



asdasxxcxcxc.png
 Description:
Debugger Annotation
 Filesize:  30.25 KB
 Viewed:  2234 Time(s)

asdasxxcxcxc.png


Back to top
View user's profile Send private message
Meas
Newbie cheater
Reputation: 0

Joined: 31 Oct 2015
Posts: 18

PostPosted: Fri Jun 08, 2018 2:40 pm    Post subject: Reply with quote

I never enjoyed finding the base pointer. You can do pointer scans but those are so very tedious.

Unless the game you're cheating in has Anti-Cheat I would just opt for patching the code directly.

1. Find the address that holds ammo.
2. Find what accesses OR writes to that address (player death/firing) try to find the piece of code that handles the most cases.
3. Add your own assembler that stores the ammo value to some static address.
4. (Optional): Instead of needing CE of assembler injection you can copy the bytes that make up the changes you made to the assembler and write it with AHK.
4. Read that address with AHK.

If you really want to do multi-level pointers then someone else might have a good idea to find those fast and easy. I don't know how to do that myself.
Back to top
View user's profile Send private message
LewcowVaal
Advanced Cheater
Reputation: 0

Joined: 30 Dec 2017
Posts: 63

PostPosted: Fri Jun 08, 2018 3:36 pm    Post subject: Reply with quote

In that case you may want to consider it like [edi+0], for the pointer calculation. So the offset of that level will be 0.

There are a bunch of tutorial of how to manually search for pointers. You will end up having a very stable pointer by doing that, but it is a VERY long process and a tedious one indeed (at least it is with modern games).
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