News for hackers. Stuff that matters.
Re:Why do Windows functions all begin with a pointless MOV E... by sp_ on Wednesday September 21, 2011 @11:40AM (#3022398)
About 2: You would have to copy the overwritten bytes to another place in memory to execute them later. As the length of x86 instructions is not fixed you would need a whole disassembler to find out what bytes belong to what instruction. Easier to have just two bytes you can overwrite at will. Saves the hassle of calculating how many bytes you need to copy.
Re:Why do Windows functions all begin with a pointless MOV E... by tptacek on Wednesday September 21, 2011 @12:08PM (#3022515)
I actually don't know how Windows hot-patching works, but I'd assume they'd just replace the whole function. You wouldn't need to execute the replaced bytes (like you do in Detours, which is usually hooking functions, not replacing them).