 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
Ullisses How do I cheat?
Reputation: 0
Joined: 07 May 2015 Posts: 3
|
Posted: Sat May 09, 2015 3:45 pm Post subject: Understanding Assembly |
|
|
I've been studying ASM, and i'm having a hard time understanding this.
| Code: | MOV EBX, [EBP+08]
MOV [EBX], 110
ADD EBX, 2
MOV [EBX], 123 |
would the results be ebp+8 = 110 and ebp+10 = 123.
if so, this code bellow sets ebp-04 to 0 then tests if its lower than 100, which doesnt make any sense
| Code: | push ebp
mov ebp,esp
sub esp,08
mov [ebp-04],00000000
cmp dword ptr [ebp-04],64
jnl 182394 |
also, a "mov ebp,esp" sets esp's value to ebp, or its memory address?
|
|
| Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Sat May 09, 2015 5:13 pm Post subject: |
|
|
EBP+08 equals a pointer address.
EBX now equals that address.
So the value at that address is changed to 110.
Adding 2 to EBX then moves that pointer up 2 bytes.
This means you are overwriting the last 2 bytes of the previous 4-byte '110' value you just moved.
So, whatever address that was, you just wrote the following 6-bytes:
6E 00 7B 00 00 00
You should also note that "ebp+10" is a hex 10, decimal 16.
So by adding 2, you should have expected "ebp+a".
|
|
| Back to top |
|
 |
Stylo Grandmaster Cheater Supreme
Reputation: 3
Joined: 16 May 2007 Posts: 1073 Location: Israel
|
|
| Back to top |
|
 |
|
|
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
|
|