I read the recent article "Longest x86 Instruction"
https://web.archive.org/web/20160405202815/http://blog.onlinedisassembler.com/blog/?p=23
I attempted to reproduce the curious disassembly issue on a Win7x86 development platform using masm and as the article suggested, redunant prefixes.
Talk is cheap, so here's a toy program (masm32):
.386 .model flat, stdcall
option casemap:none
includelib \x\x\kernel32.lib
includelib \x\x\user32.lib
include \x\x\kernel32.inc
include \x\x\user32.inc
include \x\x\windows.inc
.code
start:
db 0F3h
db 0F3h
db 0F3h
db 0F3h
db 0F3h
db 0F3h
db 0F3h
;...6 more bytes later
db 089h
db 0E5h
end start
invoke ExitProcess, NULL
After linking and assembling, I opened the resulting executable in windbg.
To my disappointment, when I single step, unassemble the $exentry, etc. windbg simply sees the prefixes/bytes as individual instructions, says 'to hell with it' and executes only the valid instructions.
Is there something I'm missing?