 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
AbrasiveZealot Newbie cheater
Reputation: 0
Joined: 02 Jan 2011 Posts: 21
|
Posted: Fri Jun 13, 2014 7:16 pm Post subject: Assembly, compare register before proceding |
|
|
I've got this bit of code, and it crashes. I can't seem to figure out how to continue.
| Code: |
mov eax,[2380B58] // Start Setting Up Pointer
cmp [eax],00000000 // Compare To Prevent Crashes
je MyThread // If Invalid Restart Thread
mov ebx,[eax+30]
cmp [ebx],00000000
je MyThread
mov eax,[ebx+BC]
cmp [eax],00000000
je MyThread
mov ebx,[eax+3D8]
cmp [ebx],00000000
je MyThread
mov eax,[ebx+35C]
cmp [eax],00000000
je MyThread
mov ebx,[eax+CC]
cmp [ebx],00000000
je MyThread
mov eax,[ebx+14]
cmp [eax],00000000
je MyThread
mov ebx,[eax+160]
cmp [ebx],00000000
je MyThread
mov eax,[ebx+A0] // Finish Setting Up Pointer
cmp [eax],00000000
je MyThread |
The crashing happens when I enter a vehicle, and after debugging it i found why. When in a vehicle the pointer becomes invalid and crashes at this line:
mov ebx,[eax+CC]
It happens because the address pointed at by [eax+CC] doesn't contain any data (?? ?? ?? ??). How can I do a compare to check and see that's it's valid? I've tried doing 2 compares to check and see that the value is good (Value > 00000000 && Value < 7FFFFFFF) but it doesn't work. How can I tell if it's good in assembly?
|
|
| Back to top |
|
 |
justa_dude Grandmaster Cheater
Reputation: 23
Joined: 29 Jun 2010 Posts: 893
|
Posted: Fri Jun 13, 2014 7:32 pm Post subject: |
|
|
cmp reg,0
je start
_________________
A nagy kapu mellett, mindig van egy kis kapu.
----------------------
Come on... |
|
| Back to top |
|
 |
AbrasiveZealot Newbie cheater
Reputation: 0
Joined: 02 Jan 2011 Posts: 21
|
Posted: Fri Jun 13, 2014 8:06 pm Post subject: |
|
|
cmp eax,00000000
cmp [eax],00000000
je MyThread
These both don't trigger a jump
cmp [eax+CC],00000000
And this crashes upon execution because it's comparing something that doesn't exist. So I don't really understand what you mean.
|
|
| 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
|
|