The first 2 bytes of a DOS executable are 0x4d and 0x5a. If these are executed, 0x4d implies 'dec ebp' and 0x5a is 'pop edx'.
'dec ebp' decrements the base pointer by 1 and 'pop edx' increments the value of esp by 4 (x86 assembly). My question is that won't these operations leave the stack in an inconsistent state? And since the command line arguments (if any) are stored relative to ebp, won't these operations make the command line arguments inaccessible?
I may be missing something obvious, if so please humour me...