@echo off

SymDump.exe --ordinals

nasm.exe -f bin IntroBodyExOGL.asm -o IntroBodyExOGL.bin -s -O9 -DNO_PEEK_MSG=1 -DLOAD_BY_ORDINAL=1 -DWIN10_SUPPORT=0 -DWIN11_SUPPORT=0 -DWINANY_SUPPORT=1
IF ERRORLEVEL 1 GOTO BUILDFAIL

ndisasm.exe -u -a IntroBodyExOGL.bin > IntroBodyExOGL_dis.asm
IF ERRORLEVEL 1 GOTO BUILDFAIL

512Packer.exe IntroBodyExOGL.bin IntroBodyExOGL.inc
IF ERRORLEVEL 1 GOTO BUILDFAIL

del /q IntroBodyExOGL.bin
IF ERRORLEVEL 1 GOTO BUILDFAIL

nasm.exe -f bin IntroLoaderExOGLByOrdinal.asm -o add512_winany.exe -s -O9 -DNO_PEEK_MSG=1 -DLOAD_BY_ORDINAL=1 -DWIN10_SUPPORT=0 -DWIN11_SUPPORT=0 -DWINANY_SUPPORT=1
IF ERRORLEVEL 1 GOTO BUILDFAIL

ndisasm.exe -u -a add512_winany.exe > add512_winany_dis.asm
IF ERRORLEVEL 1 GOTO BUILDFAIL

call SymDump.exe --dump add512_winany.exe
call FileSize add512_winany.exe

GOTO BUILDSUCC
:BUILDFAIL
echo Something is fucked!
:BUILDSUCC
