| View previous topic :: View next topic |
| Author |
Message |
NightEternal Advanced Cheater
Reputation: 0
Joined: 27 Nov 2007 Posts: 56
|
Posted: Tue Dec 04, 2007 3:49 am Post subject: Help understanding some instructions / general hacking |
|
|
Hello,
I have a game that I'm trying to hack, and am attempting to discover how some number is being generated.
I'm trying to discover the current speed of my character. I found the memory address that has the top speed of the character at any given time, I have traced down the instructions to this point, but cannot seem to go any further.
| Code: |
0789614b - 89 5d f4 - mov [ebp-0c],ebx
0789614e - 8b d8 - mov ebx,eax
07896150 - 52 - push edx
07896151 - 6a 00 - push 00
07896153 - 51 - push ecx
07896154 - ff 51 08 - call dword ptr [ecx+08]
07896157 - 83 c4 0c - add esp,0c
0789615a - dd 5d ec - fstp [ebp-14]
|
In a specific example, after the FSTP instruction, the address at EBP-14 contains .45. This represents my character's current speed.
I don't quite understand the FSTP instruction. How do I find where this .45 is coming from?
Ideally, I would like to figure out the components that make up the value that's in FSTP, so I can trace them back to their source.
Thanks for any help you can give. Hopefully this is enough info, if this is confusing or you need anything else, let me know.
|
|
| Back to top |
|
 |
Labyrnth Moderator
Reputation: 10
Joined: 28 Nov 2006 Posts: 6301
|
Posted: Tue Dec 04, 2007 6:31 am Post subject: |
|
|
fstp copies the floating point register stack to another floating point register or to 32,64 or 80 bit memory
push - push data onto stack
esp - stack pointer
ebp - base pointer
|
|
| Back to top |
|
 |
NightEternal Advanced Cheater
Reputation: 0
Joined: 27 Nov 2007 Posts: 56
|
Posted: Tue Dec 04, 2007 11:48 am Post subject: |
|
|
So the contents of the ESP register is the memory location that contains the contents of the stack?
How would I go about looking at the contents of the register / stack?
This is probably really basic, I couldn't find a decent tutorial on it since the forum searches were down for the last couple of days.
Thanks for your response.
|
|
| Back to top |
|
 |
Labyrnth Moderator
Reputation: 10
Joined: 28 Nov 2006 Posts: 6301
|
Posted: Tue Dec 04, 2007 12:32 pm Post subject: |
|
|
Look for what access's the address you find.
Then you can click more info.
|
|
| Back to top |
|
 |
|