开发者

Anyone knows what "mov edi,edi " does?

开发者 https://www.devze.com 2023-01-16 16:18 出处:网络
69A8AB13int3 69A8AB14int3 69A8AB15movedi,edi 69A8AB17push开发者_开发技巧ebp 69A8AB18movebp,esp movedi,edidoesn\'t make sense for me,what\'s it for?It\'s a 2 byte NOP instruction. It gets included
69A8AB13  int         3    
69A8AB14  int         3    
69A8AB15  mov         edi,edi 
69A8AB17  push    开发者_开发技巧    ebp  
69A8AB18  mov         ebp,esp 

mov edi,edi doesn't make sense for me,what's it for?


It's a 2 byte NOP instruction. It gets included at the beginning of any function in an image compiled with the /hotpatch option:

http://msdn.microsoft.com/en-us/library/ms173507.aspx

-scott


According to this page: StackExchange's Reverse Engineering

In x86-64 mov edi,edi is not a NOP. In x86-64 it zeroes the top 32 bits of rdi.

I though it was important enough to point it out, in supplement to snoone's answer.

0

精彩评论

暂无评论...
验证码 换一张
取 消