I made a simple MessageBox using nasm in Windows 7 and I was a bit unhappy with the size of the generated file: 2.51 kb.
extern MessageBoxA
extern ExitProcess
import MessageBoxA user32.dll
import ExitProcess kernel32.dll
section .text use32
..start:
push 0
push sCapt
push sText
push 0
call [MessageBoxA]
push 0
call [ExitProcess]
section .data
sCapt db 'test', 0
sText db 'test2', 0
So I opened the executable in OllyDbg and it seems that it generated a lot of unnecessary stuff.
So to learn a little more I would like to make this program directly in hexadecimal to stay with the smallest possible size! I searched but found nothing teaching how to create a PE Executable manually.
If someone could give me links or explain how to do I would be grateful!