View previous topic :: View next topic |
Author |
Message |
Dereta How do I cheat? Reputation: 0
Joined: 21 Aug 2016 Posts: 9
|
Posted: Sun Aug 28, 2016 3:23 pm Post subject: Assembly JUMP if Greather or Equal.. |
|
|
Hey everyone have try a lots of thinks that let crash my game
I want to change the value of an adress after it reach the value 4 or higher to 0. But the game crashes...
here's my code:
Code: |
push eax // Push EAX to save old value
mov eax, (int)4 // Write Number to compare with to eax
cmp [esi+00000410], eax // Compare Value @ esi+x with eax (4)?
jb 00F30016 // Jump
inc [esi+00000410] // Increase esi+x with 1
jmp 00F30020 // Jump to end
mov [esi+00000410], 0 // Write 0 to esi + x
pop eax // Get old EAX value
ret // Return |
the old code was just this here:
i replace it with a jump to my injected code... but as i say.. game crashes.. what did i wrong
Thanks 4 helping :3
|
|
Back to top |
|
|
Zanzer I post too much Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Sun Aug 28, 2016 4:20 pm Post subject: |
|
|
Jumps looks wrong. You're not popping EAX in all scenarios. Should you even be using RET?
Your code is probably all screwed up. Just use the built-in AOB Injection template.
Code: | code:
cmp [esi+410],4
jge @f
inc [esi+410]
jmp return
@@:
mov [esi+410],0
jmp return |
|
|
Back to top |
|
|
Dereta How do I cheat? Reputation: 0
Joined: 21 Aug 2016 Posts: 9
|
Posted: Sun Aug 28, 2016 4:31 pm Post subject: |
|
|
Thanks
This code now WORKS for me <3
Code: | cmp [esi+410], (int)3
je newmem+14
inc [esi+410]
jmp newmem+1E
mov [esi+410], 0
jmp return |
|
|
Back to top |
|
|
hhhuut Grandmaster Cheater Reputation: 6
Joined: 08 Feb 2015 Posts: 607
|
Posted: Mon Aug 29, 2016 2:29 am Post subject: |
|
|
Still doesn't look "good" because of the newmem-offsets you're using as jumps. Best define new labels and use those as jump addresses instead (just some improvement advise) ...
|
|
Back to top |
|
|
|