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 


Help me to compare value from another address(assembly)

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Twistedfate
Expert Cheater
Reputation: 1

Joined: 11 Mar 2016
Posts: 223

PostPosted: Sun Jun 26, 2016 1:16 am    Post subject: Help me to compare value from another address(assembly) Reply with quote

Can anybody tell me
1- how to change the type of values to string or 2 byte 4 byte etc :
for example add # before the number to convert the value 4 byte
what could i add to convert the value to float or string ?
___________________________________________________
2nd - I want to compare between the 4 bytes value inside this Mygame.exe+737140 with [esi+160]

I tried to do this but did not work !!
cmp [esi+160] ,Mygame.exe+737140 (Help here) →

I want to compare the value inside Mygame.exe+737140 with [esi+160]

Code:
[enable]
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)

newmem:
cmp [esi+160],     HelpHere
je originalcode
mov eax,#0



jmp exit
originalcode:
mov eax,[esi+000001D4]

exit:
jmp returnhere

"Mygame.exe"+2D34BA:
jmp newmem
nop
returnhere:
[Disable]
dealloc(newmem)
"Mygame.exe"+2D34BA:
mov eax,[esi+000001D4]
Back to top
View user's profile Send private message
ulysse31
Master Cheater
Reputation: 2

Joined: 19 Mar 2015
Posts: 324
Location: Paris

PostPosted: Sun Jun 26, 2016 3:49 am    Post subject: Re: Help me to compare value from another address(assembly) This post has 1 review(s) Reply with quote

Twistedfate wrote:
Can anybody tell me
1- how to change the type of values to string or 2 byte 4 byte etc :
for example add # before the number to convert the value 4 byte
what could i add to convert the value to float or string ?
___________________________________________________
2nd - I want to compare between the 4 bytes value inside this Mygame.exe+737140 with [esi+160]

I tried to do this but did not work !!
cmp [esi+160] ,Mygame.exe+737140 (Help here) →

I want to compare the value inside Mygame.exe+737140 with [esi+160]

Code:
[enable]
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)

newmem:
cmp [esi+160],     HelpHere
je originalcode
mov eax,#0



jmp exit
originalcode:
mov eax,[esi+000001D4]

exit:
jmp returnhere

"Mygame.exe"+2D34BA:
jmp newmem
nop
returnhere:
[Disable]
dealloc(newmem)
"Mygame.exe"+2D34BA:
mov eax,[esi+000001D4]


1/ # doesn't convert the value to 4 bytes, it "converts" it to a decimal integer type.
To make it a float you can do as such :
Code:
dd (float)6541


2/

Code:
[enable]
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)

newmem:
push ecx
mov ecx,[Mygame.exe+737140]
cmp [esi+160], ecx
je originalcode
mov eax,#0



jmp exit
originalcode:
mov eax,[esi+000001D4]

exit:
pop ecx
jmp returnhere

"Mygame.exe"+2D34BA:
jmp newmem
nop
returnhere:
[Disable]
dealloc(newmem)
"Mygame.exe"+2D34BA:
mov eax,[esi+000001D4]
Back to top
View user's profile Send private message
Twistedfate
Expert Cheater
Reputation: 1

Joined: 11 Mar 2016
Posts: 223

PostPosted: Sun Jun 26, 2016 11:57 am    Post subject: Reply with quote

Thank you very much i did what i want to ^^ but is there anyway to keep the changed value saved inside the code continuously ?
I mean every time the code change
Code:
[Mygame.exe+737140]

add new lines to my script and run it ?
for example :
Code:
[Mygame.exe+737140]
= 7
the code goes like this

cmp [esi+160],#7
je originalcode
mov eax,#0

and another numbers keep saved etc ^^ ?
Back to top
View user's profile Send private message
ulysse31
Master Cheater
Reputation: 2

Joined: 19 Mar 2015
Posts: 324
Location: Paris

PostPosted: Sun Jun 26, 2016 1:51 pm    Post subject: Reply with quote

You can store the values into variables which you test but it has to be a defined number of variables (ie it cannot saved an infinite amount of values).
you create variables like this :
Code:
alloc (var,12)


you initialize them like this :
Code:
var:
dd #0
var+4:
dd #0
var+8:
dd #0


you test them like this :
Code:
push ebx
mov ebx,[var]
test ebx,ebx
pop ebx
jne label // this jump is taken if ebx != 0
mov [var],ecx //if var holds 0 you save ecx's value to it


You may need to work on your assembly a bit first
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking 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