| View previous topic :: View next topic |
| Author |
Message |
kagato1980 Cheater
Reputation: 0
Joined: 30 Oct 2020 Posts: 30 Location: The netherlands
|
Posted: Tue Nov 03, 2020 8:18 am Post subject: Comparing 2 addresses in assembly |
|
|
I am trying to make an injection for ZSNES, where a lot of value modifications pass through this code:
| Code: | | mov [ecx+zsnesw.exe+32B468],al |
Now I want to compare the address (not the value) to a baseaddress where 'health' is stored. But the compiler won't let me save the script:
| Code: | | cmp ecx + zsnesw.exe+32B468,0072E846 |
If I add brackets, it will try comparing the value instead of address I think..when I do that it doesn't work anyhow. Any ideas?
Edit: I fixed it, by just comparing the value of ecx, as that is the only variable in the address..the code:
| Code: |
code:
cmp ecx,0x00033DE
je return
mov [ecx+zsnesw.exe+32B468],al
jmp return
|
Whenever I get hit, instead of writing to health it just skips. And for the other addresses it keeps the original code
|
|
| Back to top |
|
 |
MMM-304 Expert Cheater
Reputation: 0
Joined: 17 Aug 2020 Posts: 170 Location: Milkey Way
|
Posted: Tue Nov 03, 2020 10:09 am Post subject: |
|
|
to compare address
| Code: |
push eax
lea eax,[ecx+zsnesw.exe+32B468]
cmp eax,0072E846
pop eax
|
|
|
| Back to top |
|
 |
kagato1980 Cheater
Reputation: 0
Joined: 30 Oct 2020 Posts: 30 Location: The netherlands
|
Posted: Wed Nov 04, 2020 2:41 am Post subject: |
|
|
| Cool,thanks!
|
|
| Back to top |
|
 |
|