Function at 0x408b50
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x74
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x70], eax
push ebx
push esi
mov edx, dword [str._Graphics_]
mov dword [esp + 0x4c], edx
movzx edx, word [0x40d988]
mov word [esp + 0x54], dx
mov edx, dword [str._Program_]
mov eax, dword [esp + 0x80]
mov dword [esp + 0x64], edx
movzx edx, word [0x40d994]
mov ecx, 0xa
mov word [esp + 8], cx
mov ecx, dword [0x40d984]
mov dword [esp + 0x50], ecx
movzx ecx, byte [0x40d98a]
mov word [esp + 0x6c], dx
movzx edx, word [0x40d394]
mov byte [esp + 0x56], cl
mov ecx, dword [0x40d990]
mov dword [esp + 0x68], ecx
mov ecx, dword [str._Z80_]
mov word [esp + 0x48], dx
mov edx, dword [0x40d99c]
mov dword [esp + 0x44], ecx
mov ecx, dword [str._Samples_]
mov dword [esp + 0x5c], edx
mov edx, dword [str._BIOS_]
mov dword [esp + 0x58], ecx
movzx ecx, word [0x40d9a0]
mov dword [esp + 0x70], edx
mov dl, byte [0x40dac2]
mov byte [esp + 0x76], dl
movzx edx, word [0x40d79c]
mov word [esp + 0x60], cx
movzx ecx, word [0x40dac0]
mov word [esp + 0x40], dx
mov edx, dword [eax + 4]
mov eax, dword [esp + 0x84]
mov word [esp + 0x74], cx
imul eax, eax, 0x3ec
mov ecx, dword [str._TEXT_]
mov dword [esp + 0x3c], ecx
movzx ecx, byte [0x40d79e]
mov byte [esp + 0x42], cl
push 0x55c300
lea ecx, [esp + 0x28]
mov dword [esp + 0x28], edx
mov edx, dword [0x438028]
push ecx
add eax, 0x55c300
push edx
mov ebx, 4
call fcn.004011c0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x408c98
push eax
mov eax, dword [0x438094]
push str.kawaks_loader
push 0x40d9a4
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
pop esi
pop ebx
mov ecx, dword [esp + 0x70]
xor ecx, esp
call fcn.004098be
add esp, 0x74
ret
mov edx, dword [0x438028]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
push 0
push 0x14
lea ecx, [esp + 0x34]
push ecx
add esi, ebx
push esi
push edx
call ebp
jmp 0x408cc0
mov eax, dword [esp + 0x30]
cmp eax, 9
ja case.0x408ccd.1
jmp dword [eax*4 + 0x409160]
lea eax, [esp + 0x68]
lea edx, [eax + 1]
jmp 0x408ce0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408ce0
mov ebx, dword [sym.imp.MSVCR90.dll_fwrite]
sub eax, edx
push edi
push eax
lea eax, [esp + 0x70]
push 1
push eax
call ebx
lea eax, [esp + 0x1c]
add esp, 0x10
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x408d04
sub eax, ecx
push edi
push eax
lea ecx, [esp + 0x14]
push 1
push ecx
call ebx
mov eax, dword [0x438028]
add esp, 0x10
push 0
push 0x14
lea edx, [esp + 0x1c]
push edx
add esi, 0x14
push esi
push eax
call ebp
mov eax, dword [esp + 0x24]
cmp eax, 0xa
je 0x408d6f
lea esp, [esp]
cmp eax, 0xb
je 0x408d6f
mov ebx, edi
lea ecx, [esp + 0x14]
call fcn.00408950
mov edx, dword [0x438028]
push 0
push 0x14
lea ecx, [esp + 0x1c]
push ecx
add esi, 0x14
push esi
push edx
call ebp
mov eax, dword [esp + 0x24]
cmp eax, 0xa
jne 0x408d40
mov ecx, dword [0x438028]
push 0
push 0x14
lea eax, [esp + 0x34]
push eax
push esi
push ecx
call ebp
lea eax, [esp + 0xc]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408d90
push edi
sub eax, edx
push eax
push 1
lea edx, [esp + 0x18]
push edx
jmp 0x40913a
mov ecx, dword [0x438028]
push 0
push 0x14
lea eax, [esp + 0x1c]
push eax
add esi, 0x14
push esi
push ecx
call ebp
mov eax, dword [esp + 0x24]
cmp eax, 0xa
je 0x408de9
cmp eax, 0xb
je 0x408de9
mov eax, dword [0x438028]
push 0
push 0x14
lea edx, [esp + 0x1c]
push edx
add esi, 0x14
push esi
push eax
call ebp
mov eax, dword [esp + 0x24]
cmp eax, 0xa
jne 0x408dc6
mov edx, dword [0x438028]
push 0
push 0x14
lea ecx, [esp + 0x34]
push ecx
push esi
push edx
call ebp
jmp case.0x408ccd.1
mov ecx, dword [0x438028]
push 0
push 0x14
lea eax, [esp + 0x1c]
push eax
add esi, 0x14
push esi
push ecx
call ebp
mov eax, dword [esp + 0x24]
cmp eax, 0xa
je 0x408de9
cmp eax, 0xb
je 0x408de9
mov eax, dword [0x438028]
push 0
push 0x14
lea edx, [esp + 0x1c]
push edx
add esi, 0x14
push esi
push eax
call ebp
mov eax, dword [esp + 0x24]
cmp eax, 0xa
jne 0x408e20
jmp 0x408de9
mov byte [esp + 0x13], 0
lea ebx, [ebx]
mov ecx, dword [0x438028]
push 0
push 0x14
lea eax, [esp + 0x1c]
push eax
add esi, 0x14
push esi
push ecx
call ebp
cmp dword [esp + 0x18], 0xb
je 0x408e50
mov eax, dword [esp + 0x24]
cmp eax, 0xa
je 0x408edd
cmp eax, 0xb
je 0x408edd
cmp byte [esp + 0x13], 0
jne 0x408e89
mov byte [esp + 0x13], 1
jmp 0x408e50
lea eax, [esp + 0x40]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408e90
sub eax, edx
push edi
push eax
lea edx, [esp + 0x48]
push 1
push edx
call dword [sym.imp.MSVCR90.dll_fwrite]
lea eax, [esp + 0x1c]
add esp, 0x10
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408eb2
sub eax, edx
push edi
push eax
lea eax, [esp + 0x14]
push 1
push eax
call dword [sym.imp.MSVCR90.dll_fwrite]
add esp, 0x10
mov ebx, edi
lea ecx, [esp + 0x14]
call fcn.00408950
jmp 0x408e50
mov edx, dword [0x438028]
push 0
push 0x14
lea ecx, [esp + 0x34]
push ecx
push esi
push edx
call ebp
lea eax, [esp + 0xc]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408ef7
push edi
sub eax, edx
push eax
push 1
lea eax, [esp + 0x18]
push eax
jmp 0x40913a
lea eax, [esp + 0x48]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408f15
mov ebx, dword [sym.imp.MSVCR90.dll_fwrite]
push edi
sub eax, edx
push eax
lea ecx, [esp + 0x50]
push 1
push ecx
call ebx
lea eax, [esp + 0x1c]
add esp, 0x10
lea ecx, [eax + 1]
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x408f40
push edi
sub eax, ecx
push eax
lea edx, [esp + 0x14]
push 1
push edx
call ebx
mov ecx, dword [0x438028]
add esp, 0x10
push 0
push 0x14
lea eax, [esp + 0x1c]
push eax
add esi, 0x14
push esi
push ecx
call ebp
mov eax, dword [esp + 0x24]
cmp eax, 0xa
je 0x408fa4
cmp eax, 0xb
je 0x408fa4
mov ebx, edi
lea ecx, [esp + 0x14]
call fcn.00408950
mov eax, dword [0x438028]
push 0
push 0x14
lea edx, [esp + 0x1c]
push edx
add esi, 0x14
push esi
push eax
call ebp
mov eax, dword [esp + 0x24]
cmp eax, 0xa
jne 0x408f76
mov edx, dword [0x438028]
push 0
push 0x14
lea ecx, [esp + 0x34]
push ecx
push esi
push edx
call ebp
lea eax, [esp + 0xc]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408fc0
push edi
sub eax, edx
push eax
push 1
lea eax, [esp + 0x18]
push eax
jmp 0x40913a
lea eax, [esp + 0x5c]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408fe0
mov ebx, dword [sym.imp.MSVCR90.dll_fwrite]
push edi
sub eax, edx
push eax
lea ecx, [esp + 0x64]
push 1
push ecx
call ebx
lea eax, [esp + 0x1c]
add esp, 0x10
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x409004
sub eax, edx
push edi
push eax
lea edx, [esp + 0x14]
push 1
push edx
call ebx
add esp, 0x10
jmp 0x409020
mov ecx, dword [0x438028]
push 0
push 0x14
lea eax, [esp + 0x1c]
push eax
add esi, 0x14
push esi
push ecx
call ebp
cmp dword [esp + 0x18], 7
je 0x409020
mov eax, dword [esp + 0x24]
cmp eax, 0xa
je 0x409058
cmp eax, 0xb
je 0x409058
mov ebx, edi
lea ecx, [esp + 0x14]
call fcn.00408950
jmp 0x409020
mov eax, dword [0x438028]
push 0
push 0x14
lea edx, [esp + 0x34]
push edx
push esi
push eax
call ebp
lea eax, [esp + 0xc]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x409071
jmp 0x40912f
lea eax, [esp + 0x50]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x409084
mov ebx, dword [sym.imp.MSVCR90.dll_fwrite]
sub eax, edx
push edi
push eax
lea edx, [esp + 0x58]
push 1
push edx
call ebx
lea eax, [esp + 0x1c]
add esp, 0x10
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4090a8
sub eax, ecx
push edi
push eax
lea eax, [esp + 0x14]
push 1
push eax
call ebx
mov edx, dword [0x438028]
add esp, 0x10
push 0
push 0x14
lea ecx, [esp + 0x1c]
push ecx
add esi, 0x14
push esi
push edx
call ebp
mov eax, dword [esp + 0x24]
cmp eax, 0xa
je 0x40910f
mov edi, edi
cmp eax, 0xb
je 0x40910f
mov ebx, edi
lea ecx, [esp + 0x14]
call fcn.00408950
mov ecx, dword [0x438028]
push 0
push 0x14
lea eax, [esp + 0x1c]
push eax
add esi, 0x14
push esi
push ecx
call ebp
mov eax, dword [esp + 0x24]
cmp eax, 0xa
jne 0x4090e0
mov eax, dword [0x438028]
push 0
push 0x14
lea edx, [esp + 0x34]
push edx
push esi
push eax
call ebp
lea eax, [esp + 0xc]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x409128
push edi
sub eax, edx
push eax
push 1
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.MSVCR90.dll_fwrite]
add esp, 0x10
cmp dword [esp + 0x3c], 0xb
jne 0x408cc0
mov ecx, dword [esp + 0x7c]
pop ebp
pop esi
pop ebx
xor ecx, esp
call fcn.004098be
add esp, 0x74
ret