View previous topic :: View next topic |
Author |
Message |
NeoJesus How do I cheat? Reputation: 0
Joined: 30 May 2018 Posts: 5
|
Posted: Wed May 30, 2018 10:45 am Post subject: How to calculate pointer of address "edi"? |
|
|
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.
Description: |
|
Filesize: |
30.25 KB |
Viewed: |
2234 Time(s) |
|
|
|
Back to top |
|
|
Meas Newbie cheater Reputation: 0
Joined: 31 Oct 2015 Posts: 18
|
Posted: Fri Jun 08, 2018 2:40 pm Post subject: |
|
|
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 |
|
|
LewcowVaal Advanced Cheater Reputation: 0
Joined: 30 Dec 2017 Posts: 63
|
Posted: Fri Jun 08, 2018 3:36 pm Post subject: |
|
|
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 |
|
|
|