Last year for Brucon, I produced some reverse engineering challenges (and I’m producing new ones for this year’s edition).
The Hex Factor blog posted the solution for level 300.
The source code for the challenge can be downloaded here. It’s completely written in assembler, even the I/O routines.
Here’s a trick I used to create your own EXE from assembler code, without any library:
A simple assembly program:
BITS 32 ret
Assemble with nasm: nasm -f win32 ret.asm -o ret.o
And link with mingw32‘s linker: ld -s ret.o -o ret.exe