Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


OR operation in ID Compare

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
sp4rx
Advanced Cheater
Reputation: 0

Joined: 19 Feb 2013
Posts: 64
Location: India

PostPosted: Mon Jun 24, 2013 5:27 pm    Post subject: OR operation in ID Compare Reply with quote

Can I perform OR operation during ID Compare??

The offset is [ebp+408] , My code will only execute when the offset is 0 or 1.

Can anyone tell me how to perform this???

_________________
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25808
Location: The netherlands

PostPosted: Mon Jun 24, 2013 5:32 pm    Post subject: Reply with quote

do you mean offset, or the value of the address ?
If value of address then something like this
Code:

cmp [ebp+408],2
jae aftermycode //jump if above or after
..
..
..
aftermycode:
..
..
..



(If the compare flags are important, put a pushfd before the cmp, and a popfd after "aftermycode:")

If offset, then you mean EBP, and an offset of 0 or 1 would mean certain crash

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
sp4rx
Advanced Cheater
Reputation: 0

Joined: 19 Feb 2013
Posts: 64
Location: India

PostPosted: Tue Jun 25, 2013 3:46 am    Post subject: Reply with quote

This is my code for a GOD mode
Code:

[ENABLE]
alloc(newmem,2048)
label(returnhere)
label(enemy)
label(originalcode)
label(exit)

newmem:
cmp [ebx+37C],(float)15
Edit: jne enemy
originalcode:
mov dword ptr [ebx+00000354],(float)200
jmp exit
enemy:
mov dword ptr [ebx+00000354],0

exit:
jmp returnhere

"Bangla-gta-vc.exe"+126808:
jmp newmem
nop
returnhere:


 
 
[DISABLE]
dealloc(newmem)
"Bangla-gta-vc.exe"+126808:
fstp dword ptr [ebx+00000354]
//Alt: db D9 9B 54 03 00 00


This is a God mode and one hit kill script. Here when I jumping from a car the value of [ebx+37C] changes to 0. So I die If I jump from a car

So I want to execute this mov dword ptr [ebx+00000354],(float)200 for both the value 0 and 15

_________________


Last edited by sp4rx on Tue Jun 25, 2013 5:24 am; edited 1 time in total
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Tue Jun 25, 2013 3:59 am    Post subject: Reply with quote

Right now, (float)15 forces you to jump to enemy (one-hit kill). In other words, [ebx+37C] changing to 0 should not kill you.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25808
Location: The netherlands

PostPosted: Tue Jun 25, 2013 4:01 am    Post subject: Reply with quote

right now your code is
Code:

cmp [ebx+37C],(float)15
je enemy

which means it will jump to enemy if it IS 15
(of course, floats are NOT exact values so the chance that it's perfect 15 is pretty small)

I recommend using the 4 byte hexadecimal value instead
so something like this:
Code:

cmp [ebx+37C],41700000  //float 15 (modify this to the exact value)
je originalcode

cmp [ebx+37C],0
je originalcode

//still here, so enemy
jmp enemy


_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
sp4rx
Advanced Cheater
Reputation: 0

Joined: 19 Feb 2013
Posts: 64
Location: India

PostPosted: Tue Jun 25, 2013 5:23 am    Post subject: Reply with quote

Sorry there was a little mistake in my last code.

It will be
Code:
cmp [ebx+37C],(float)15
jne enemy
originalcode:
mov dword ptr [ebx+00000354],(float)200
jmp exit
enemy:
mov dword ptr [ebx+00000354],0


Let me explain:
Here my player is 15 and others are 7.5

But when i Jump from a car 15 changes to 0. So I died

_________________
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25808
Location: The netherlands

PostPosted: Tue Jun 25, 2013 5:50 am    Post subject: Reply with quote

Code:

cmp [ebx+37C],41700000  //(float)15 (modify this to the exact value)
je originalcode

cmp [ebx+37C],0
je originalcode
//this code gets reached if [ecx+37c] is neither 41700000 (float 15) nor 0
jmp enemy

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
sp4rx
Advanced Cheater
Reputation: 0

Joined: 19 Feb 2013
Posts: 64
Location: India

PostPosted: Tue Jun 25, 2013 6:58 am    Post subject: Reply with quote

Thanx for the idea,, It worked, Smile
_________________
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites