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 


-------Cmp ..Assembly I need your help ------

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

Joined: 11 Mar 2016
Posts: 231

PostPosted: Sat Jun 18, 2016 5:57 am    Post subject: -------Cmp ..Assembly I need your help ------ Reply with quote

My code jumps to original code if its not between (619000-620439)

but also i need the code run when the value is zero
how do i tell my code do not jump if equal to zero but
jump if above or more than 620439
jump if less or below than 620439




[code=
newmem: //this is allocated memory, you have read,write,execute access
cmp [esi+40],#619000
Jl originalcode
cmp [esi+40],#620439
jg originalcode

cmp [esi+40],#0 //help me here

fild dword ptr [esi+20]
mov dword ptr [esi+20],#0
sub esp,0C
jmp exit

originalcode:
fild dword ptr [esi+20]
sub esp,0C
[/code]

"]
Back to top
View user's profile Send private message
ulysse31
Master Cheater
Reputation: 2

Joined: 19 Mar 2015
Posts: 324
Location: Paris

PostPosted: Sat Jun 18, 2016 6:19 am    Post subject: Re: -------Cmp ..Assembly I need your help ------ Reply with quote

Twistedfate wrote:
My code jumps to original code if its not between (619000-620439)

but also i need the code run when the value is zero
how do i tell my code do not jump if equal to zero but
jump if above or more than 620439
jump if less or below than 620439




[code=
newmem: //this is allocated memory, you have read,write,execute access
cmp [esi+40],#619000
Jl originalcode
cmp [esi+40],#620439
jg originalcode

cmp [esi+40],#0 //help me here

fild dword ptr [esi+20]
mov dword ptr [esi+20],#0
sub esp,0C
jmp exit

originalcode:
fild dword ptr [esi+20]
sub esp,0C
[/code]

"]


Code:
label(bypassjumps)

newmem: //this is allocated memory, you have read,write,execute access
cmp [esi+40],#0 //help me here
je bypassjumps
cmp [esi+40],#619000
Jl originalcode
cmp [esi+40],#620439
jg originalcode
bypassjumps:


fild dword ptr [esi+20]
mov dword ptr [esi+20],#0
sub esp,0C
jmp exit

originalcode:
fild dword ptr [esi+20]
sub esp,0C
Back to top
View user's profile Send private message
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Sat Jun 18, 2016 6:23 am    Post subject: Reply with quote

Code:
newmem:
cmp [esi+40],0
je @f
cmp [esi+40],#619000
jl originalcode
cmp [esi+40],#620439
jg originalcode


@@:
mov dword ptr [esi+20],#0
jmp originalcode


originalcode:
fild dword ptr [esi+20]
sub esp,0C
jmp exit
[/code]
_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
Twistedfate
Expert Cheater
Reputation: 1

Joined: 11 Mar 2016
Posts: 231

PostPosted: Sat Jun 18, 2016 6:39 am    Post subject: Re: -------Cmp ..Assembly I need your help ------ Reply with quote

ulysse3131 wrote:
Twistedfate wrote:
My code jumps to original code if its not between (619000-620439)

but also i need the code run when the value is zero
how do i tell my code do not jump if equal to zero but
jump if above or more than 620439
jump if less or below than 620439




[code=
newmem: //this is allocated memory, you have read,write,execute access
cmp [esi+40],#619000
Jl originalcode
cmp [esi+40],#620439
jg originalcode

cmp [esi+40],#0 //help me here

fild dword ptr [esi+20]
mov dword ptr [esi+20],#0
sub esp,0C
jmp exit

originalcode:
fild dword ptr [esi+20]
sub esp,0C
[/code]

"]


Code:
label(bypassjumps)

newmem: //this is allocated memory, you have read,write,execute access
cmp [esi+40],#0 //help me here
je bypassjumps
cmp [esi+40],#619000
Jl originalcode
cmp [esi+40],#620439
jg originalcode
bypassjumps:


fild dword ptr [esi+20]
mov dword ptr [esi+20],#0
sub esp,0C
jmp exit

originalcode:
fild dword ptr [esi+20]
sub esp,0C



Thank you that;s was helpful
How can your write the code with green color ?
does jump to label escape the jumps ^^ ?
Back to top
View user's profile Send private message
ulysse31
Master Cheater
Reputation: 2

Joined: 19 Mar 2015
Posts: 324
Location: Paris

PostPosted: Sat Jun 18, 2016 7:04 am    Post subject: Re: -------Cmp ..Assembly I need your help ------ Reply with quote

Twistedfate wrote:


Thank you that;s was helpful
How can your write the code with green color ?

First write the code, then select the code and click on the "Code" button of the post message form, the code you originally wrote will appear green after the post is submitted.

Twistedfate wrote:

does jump to label escape the jumps ^^ ?

Indeed, as its name indicates, the "bypassjumps" label escape the jumps, simply because he is located after them in the auto assembler window (see cheat engine doc to understand exactly how labels are assigned a position
Back to top
View user's profile Send private message
Twistedfate
Expert Cheater
Reputation: 1

Joined: 11 Mar 2016
Posts: 231

PostPosted: Sun Jun 19, 2016 2:26 am    Post subject: Re: -------Cmp ..Assembly I need your help ------ Reply with quote

ulysse3131 wrote:
Twistedfate wrote:


Thank you that;s was helpful
How can your write the code with green color ?

First write the code, then select the code and click on the "Code" button of the post message form, the code you originally wrote will appear green after the post is submitted.

Twistedfate wrote:

does jump to label escape the jumps ^^ ?

Indeed, as its name indicates, the "bypassjumps" label escape the jumps, simply because he is located after them in the auto assembler window (see cheat engine doc to understand exactly how labels are assigned a position



thank you ^^
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 Discussions 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