Using nasm, we can build the smallest possible native exe (without using a packer, dropper or anything like that) file that will work on all Windows versions. This is what one of the possible solution binary looks like: The code for this little cutie: IMAGEBASE equ 400000h BITS 32 ORG IMAGEBASE ; IMAGE_DOS_HEADER dw "MZ" ; e_magic dw 0 ; e_cblp ; IMAGE_NT_HEADERS - lowest possible start is at 0x4 Signature: dw 'PE',0 ; Signature ; IMAGE_FILE_HEADER dw 0x14c ; Machine = IMAGE_FILE_MACHINE_I386 dw 0 ; NumberOfSections user32.
When going back down memory lane about my programming projects the first memory that comes up is developing software under DOS. The simple way of writing programs as .com files allowed for a lot of fun stuff like coding size competitions. Those executable files did not include any header and got executed as code starting from first byte of the file. My favorite production of the old days is this 29 byte small intro that I developed 2001 using assembly language.