Function at 0x407790
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x60
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x5c], eax
push ebx
push esi
mov edx, dword [str._Graphics_]
mov eax, dword [esp + 0x6c]
mov dword [esp + 0x40], edx
movzx edx, word [0x40d988]
mov word [esp + 0x48], dx
mov edx, dword [str._Program_]
mov dword [esp + 0x4c], edx
movzx edx, word [0x40d994]
mov word [esp + 0x54], dx
movzx edx, word [0x40d394]
mov ecx, 0xa
mov word [esp + 8], cx
mov ecx, dword [0x40d984]
mov dword [esp + 0x44], ecx
mov cl, byte [0x40d98a]
mov byte [esp + 0x4a], cl
mov ecx, dword [0x40d990]
mov word [esp + 0x3c], dx
mov edx, dword [0x40d99c]
mov dword [esp + 0x50], ecx
mov ecx, dword [str._Z80_]
mov dword [esp + 0x5c], edx
mov edx, dword [eax + 4]
mov eax, dword [esp + 0x70]
mov dword [esp + 0x38], ecx
imul eax, eax, 0x3ec
mov ecx, dword [str._Samples_]
mov dword [esp + 0x58], ecx
mov cx, word [0x40d9a0]
mov word [esp + 0x60], cx
push 0x55c300
lea ecx, [esp + 0x24]
mov dword [esp + 0x24], 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 0x407890
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 + 0x5c]
xor ecx, esp
call fcn.004098be
add esp, 0x60
ret
mov edx, dword [0x438028]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
push 0
push 0x14
lea ecx, [esp + 0x30]
push ecx
add esi, ebx
push esi
push edx
call ebp
lea esp, [esp]
mov eax, dword [esp + 0x2c]
cmp eax, 6
ja case.0x4078bd.1
jmp dword [eax*4 + 0x407bf8]
lea eax, [esp + 0x50]
lea edx, [eax + 1]
jmp 0x4078d0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4078d0
mov ebx, dword [sym.imp.MSVCR90.dll_fwrite]
sub eax, edx
push edi
push eax
lea eax, [esp + 0x58]
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 0x4078f4
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 + 0x18]
push edx
add esi, 0x14
push esi
push eax
call ebp
mov eax, dword [esp + 0x20]
cmp eax, 0xa
je 0x40795f
lea esp, [esp]
cmp eax, 0xb
je 0x40795f
mov ebx, edi
lea ecx, [esp + 0x10]
call fcn.00408950
mov edx, dword [0x438028]
push 0
push 0x14
lea ecx, [esp + 0x18]
push ecx
add esi, 0x14
push esi
push edx
call ebp
mov eax, dword [esp + 0x20]
cmp eax, 0xa
jne 0x407930
mov ecx, dword [0x438028]
push 0
push 0x14
lea eax, [esp + 0x30]
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 0x407980
jmp 0x407bc7
lea eax, [esp + 0x44]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407993
mov ebx, dword [sym.imp.MSVCR90.dll_fwrite]
sub eax, edx
push edi
push eax
lea eax, [esp + 0x4c]
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 0x4079b7
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 + 0x18]
push edx
add esi, 0x14
push esi
push eax
call ebp
mov eax, dword [esp + 0x20]
cmp eax, 0xa
je 0x407a1f
lea esp, [esp]
cmp eax, 0xb
je 0x407a1f
mov ebx, edi
lea ecx, [esp + 0x10]
call fcn.00408950
mov edx, dword [0x438028]
push 0
push 0x14
lea ecx, [esp + 0x18]
push ecx
add esi, 0x14
push esi
push edx
call ebp
mov eax, dword [esp + 0x20]
cmp eax, 0xa
jne 0x4079f0
mov ecx, dword [0x438028]
push 0
push 0x14
lea eax, [esp + 0x30]
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 0x407a40
jmp 0x407bc7
lea eax, [esp + 0x3c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407a53
mov ebx, dword [sym.imp.MSVCR90.dll_fwrite]
sub eax, edx
push edi
push eax
lea eax, [esp + 0x44]
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 0x407a77
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 + 0x18]
push edx
add esi, 0x14
push esi
push eax
call ebp
mov eax, dword [esp + 0x20]
cmp eax, 0xa
je 0x407adf
lea esp, [esp]
cmp eax, 0xb
je 0x407adf
mov ebx, edi
lea ecx, [esp + 0x10]
call fcn.00408950
mov edx, dword [0x438028]
push 0
push 0x14
lea ecx, [esp + 0x18]
push ecx
add esi, 0x14
push esi
push edx
call ebp
mov eax, dword [esp + 0x20]
cmp eax, 0xa
jne 0x407ab0
mov ecx, dword [0x438028]
push 0
push 0x14
lea eax, [esp + 0x30]
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 0x407b00
jmp 0x407bc7
lea eax, [esp + 0x5c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407b13
mov ebx, dword [sym.imp.MSVCR90.dll_fwrite]
sub eax, edx
push edi
push eax
lea eax, [esp + 0x64]
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 0x407b37
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 + 0x18]
push edx
add esi, 0x14
push esi
push eax
call ebp
mov eax, dword [esp + 0x20]
cmp eax, 0xa
je 0x407b9f
lea esp, [esp]
cmp eax, 0xb
je 0x407b9f
mov ebx, edi
lea ecx, [esp + 0x10]
call fcn.00408950
mov edx, dword [0x438028]
push 0
push 0x14
lea ecx, [esp + 0x18]
push ecx
add esi, 0x14
push esi
push edx
call ebp
mov eax, dword [esp + 0x20]
cmp eax, 0xa
jne 0x407b70
mov ecx, dword [0x438028]
push 0
push 0x14
lea eax, [esp + 0x30]
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 0x407bc0
push edi
sub eax, edx
push eax
lea edx, [esp + 0x14]
push 1
push edx
call dword [sym.imp.MSVCR90.dll_fwrite]
add esp, 0x10
cmp dword [esp + 0x38], 0xb
jne 0x4078b0
mov ecx, dword [esp + 0x68]
pop ebp
pop esi
pop ebx
xor ecx, esp
call fcn.004098be
add esp, 0x60
ret