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 


Why is there a bunch of NOPs after JNE?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
gir489
Grandmaster Cheater
Reputation: 14

Joined: 03 Jan 2012
Posts: 841
Location: Maryland, United States

PostPosted: Sun Mar 31, 2019 11:28 am    Post subject: Why is there a bunch of NOPs after JNE? Reply with quote

If I do something like this in a 64-bit script:
Code:
cmp [rsp],PreyDll.dll+2E75038
jne notwidth
mov [rax+04],(float)8
notwidth:


I get this:
Code:
7FFDD1910000 - 81 3C 24  38507AD4    - cmp [rsp],D47A5038 { -730181576 }
7FFDD1910007 - 75 0B                 - jne 7FFDD1910014
7FFDD1910009 - 90                    - nop
7FFDD191000A - 90                    - nop
7FFDD191000B - 90                    - nop
7FFDD191000C - 90                    - nop
7FFDD191000D - C7 40 04 00000041     - mov [rax+04],41000000 { 8.00 }
7FFDD1910014 - 81 3C 24  30507AD4    - cmp [rsp],D47A5030 { -730181584 }


Why? Why is there 4 NOPs added? Can I tell the assembler not to do that somehow?
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4699

PostPosted: Sun Mar 31, 2019 12:24 pm    Post subject: Reply with quote

CE has no idea how far away the destination is at the time of that instruction, so it assumes the instruction will take up more memory than is actually needed.

Override it with short
Code:
jne short notwidth

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Sun Mar 31, 2019 1:24 pm    Post subject: Reply with quote

next ce version will just place a 6 byte jne there (unless overriden)
_________________
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
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