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 


Weird Assembler instructions

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Corruptor
Advanced Cheater
Reputation: 3

Joined: 10 Aug 2011
Posts: 82

PostPosted: Tue Apr 23, 2013 4:54 am    Post subject: Weird Assembler instructions Reply with quote

Code:
worldedit.exe+1B2660 - 83 7C 24 08 00        - cmp dword ptr [esp+08],00
worldedit.exe+1B2665 - 56                    - push esi
worldedit.exe+1B2666 - 8B F1                 - mov esi,ecx
worldedit.exe+1B2668 - 74 05                 - je worldedit.exe+1B266F


Basically, my question is: what does that cmp do there? The mov instruction resets the flags anyways, so the je cant possibly refer to the cmp. But what does it do there then?
Back to top
View user's profile Send private message
Fresco
Grandmaster Cheater
Reputation: 4

Joined: 07 Nov 2010
Posts: 600

PostPosted: Tue Apr 23, 2013 10:59 am    Post subject: Reply with quote

why not ?
the cmp instruction sets the FLAGS register it does not matter if you have a push and a mov in the between
btw the mov does not reset the FLAGS it just copies ecx's value into esi's
so yes, the je instruction is referring to that cmp above it

_________________
... Fresco
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 222

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Tue Apr 23, 2013 4:53 pm    Post subject: Reply with quote

@Corruptor
Yes, this a common thing. This "separation" of compare instruction and conditional-jump.

_________________
Back to top
View user's profile Send private message MSN Messenger
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