Function at 0x403c20
Capabilities:
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x8c
mov edi, dword [esp + 0xb8]
mov esi, dword [esp + 0xc]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0xa8]
mov dword [esp + 0x48], edx
mov edx, dword [esp + 0xac]
mov ebp, dword [edi]
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0xb0]
mov dword [esp + 0x34], edx
mov dword [esp + 0x50], eax
mov eax, dword [edi + 0x18]
mov dword [esp + 0x2c], esi
mov dword [esp + 8], eax
mov eax, 0x64
imul ecx, dword [edi + 0xc], 0x64
mul dword [edi + 8]
mov ebx, dword [esp + 8]
mov dword [esp + 0x78], 0
mov dword [esp + 0x7c], 0
mov dword [esp + 0x28], ebx
mov ebx, dword [edi + 0x14]
add edx, ecx
mov ecx, dword [edi + 0x10]
mov dword [esp], eax
mov dword [esp + 0xc], ebx
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
call fcn.004a0f50
mov esi, dword [esp + 0x2c]
mov ebx, dword [esp + 0x28]
mov dword [esp + 4], eax
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call dword [ebp + 0x2c]
mov esi, dword [esp + 0xa0]
test esi, esi
js 0x404460
mov ebx, dword [esp + 0x34]
xor edx, edx
mov eax, dword [esp + 0xa0]
mov ecx, dword [esp + 0x30]
cmp ecx, dword [esp + 0xa0]
mov dword [esp + 0x3c], edx
mov esi, ebx
mov dword [esp + 0x38], eax
sbb esi, edx
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edx
jb 0x4043d0
mov edx, dword [esp + 0x34]
mov esi, dword [esp + 0x3c]
mov eax, dword [esp + 0x30]
cmp dword [esp + 0xa0], eax
sbb esi, edx
jae 0x404041
mov ebx, dword [esp + 0xb4]
mov esi, 0x15
lea ebp, [esp + 0x78]
test ebx, ebx
mov ebx, 0x100000
setne byte [esp + 0x28]
mov dword [esp + 8], ebp
mov dword [esp + 4], ebx
mov dword [esp], 0
mov dword [esp + 0x78], 0
mov dword [esp + 0x7c], 0
call fcn.00427280
mov ecx, eax
or ecx, edx
jne 0x403d8d
cmp byte [esp + 0x28], 0
je 0x403d8d
lea eax, [esp + 0x7c]
mov dword [esp + 4], ebx
mov dword [esp + 8], eax
mov dword [esp], 0
call fcn.00427280
mov ecx, edx
or ecx, eax
jne 0x4041e1
mov eax, dword [esp + 0xa0]
xor edx, edx
mov dword [esp + 0x58], ebx
div ebx
sub dword [esp + 0xa0], edx
mov ebp, edx
jne 0x40409c
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 0
movzx esi, byte [esp + 0x50]
mov eax, dword [esp + 0x78]
mov dword [esp + 0x68], esi
test ebp, ebp
je 0x404073
mov edx, dword [esp + 0xa4]
add edx, dword [esp + 0xa0]
mov dword [esp + 8], ebp
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov eax, dword [esp + 0x58]
mov dword [esp + 4], esi
sub eax, ebp
mov dword [esp + 8], eax
mov eax, dword [esp + 0x78]
add eax, ebp
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x34]
sub eax, dword [esp + 0x28]
sbb edx, dword [esp + 0x2c]
mov ecx, edx
mov dword [esp + 0x38], eax
mov edx, ecx
mov dword [esp + 0x3c], ecx
or edx, eax
je 0x404190
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x48]
lea esi, [esp + 0x74]
mov dword [esp + 0x30], ebp
add ecx, dword [esp + 0x28]
mov ebx, dword [esp + 0x4c]
mov dword [esp + 0x48], esi
mov ebp, edi
adc ebx, dword [esp + 0x2c]
xor edx, edx
mov dword [esp + 0x50], ecx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], edx
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x60], eax
jmp 0x403f6a
mov edx, dword [esp + 0x78]
mov eax, dword [esp + 0x48]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x44]
mov dword [esp + 4], esi
mov dword [esp + 8], edi
mov dword [esp], eax
call fcn.00415e50
mov ecx, edx
or ecx, eax
jne 0x404205
mov eax, dword [esp + 0x74]
cmp eax, ebx
jne 0x4042b0
mov eax, dword [esp + 0x30]
test eax, eax
jne 0x404020
mov esi, dword [ebp + 0x18]
mov eax, dword [esp + 0x74]
xor edx, edx
mov edi, 0x64
add dword [esp + 0x28], eax
mov ebx, dword [ebp]
adc dword [esp + 0x2c], edx
add eax, dword [ebp + 8]
adc edx, dword [ebp + 0xc]
mov dword [ebp + 8], eax
mov dword [ebp + 0xc], edx
mov dword [esp + 8], esi
imul esi, edx, 0x64
mul edi
mov edi, dword [esp + 0xc]
mov dword [esp + 0x34], edi
mov edi, dword [ebp + 0x14]
add edx, esi
mov esi, dword [esp + 8]
mov dword [esp + 0x30], esi
mov esi, dword [ebp + 0x10]
mov dword [esp + 0xc], edi
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.004a0f50
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x34]
mov dword [esp + 4], eax
mov dword [esp + 8], esi
mov dword [esp + 0xc], edi
mov eax, dword [ebx + 0x10]
mov dword [esp], eax
call dword [ebx + 0x2c]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x30], 0
mov edx, dword [esp + 0x2c]
mov ebx, dword [esp + 0x3c]
cmp eax, ecx
mov eax, edx
sbb eax, ebx
jae 0x404190
mov ecx, dword [esp + 0x28]
mov esi, dword [esp + 0x50]
mov ebx, dword [esp + 0x2c]
mov edi, dword [esp + 0x54]
mov eax, dword [esp + 0x38]
add esi, ecx
mov edx, dword [esp + 0x3c]
adc edi, ebx
sub eax, ecx
mov ecx, dword [esp + 0x5c]
sbb edx, ebx
mov ebx, eax
mov eax, edx
mov edx, dword [esp + 0x58]
cmp edx, ebx
mov edx, dword [esp + 0xb4]
sbb ecx, eax
cmovb ebx, dword [esp + 0x60]
test edx, edx
je 0x403e85
mov eax, dword [esp + 0x48]
mov dword [esp + 0xc], ebx
mov dword [esp + 4], esi
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x7c]
mov dword [esp + 8], edi
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x44]
mov dword [esp], eax
call fcn.00415cf0
or edx, eax
mov edx, dword [esp + 0x78]
jne 0x403e89
cmp dword [esp + 0x74], ebx
jne 0x403e89
mov eax, dword [esp + 0x7c]
mov dword [esp + 4], edx
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 0x6c], edx
call sub.msvcrt.dll_memcmp
mov edx, dword [esp + 0x6c]
test eax, eax
jne 0x403e89
mov eax, dword [esp + 0x30]
test eax, eax
je 0x403ecf
lea esi, [esi]
mov eax, dword [esp + 0x30]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x68]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x78]
mov dword [esp], eax
call sub.msvcrt.dll_memset
jmp 0x403ecf
mov ecx, dword [esp + 0xa0]
test ecx, ecx
jne 0x404092
mov ebx, dword [esp + 0x34]
mov ecx, dword [esp + 0x30]
mov edx, ebx
or edx, ecx
je 0x404190
movzx eax, byte [esp + 0x50]
mov dword [esp + 0x58], 0x100000
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x78]
mov ebx, dword [esp + 0x58]
mov esi, dword [esp + 0x68]
mov dword [esp], eax
xor ebp, ebp
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
call sub.msvcrt.dll_memset
jmp 0x403e14
mov dword [esp + 0x58], 0x100000
xor ebp, ebp
lea eax, [esp + 0x74]
mov edx, dword [esp + 0x4c]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0xa4]
mov dword [esp + 8], edx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0xa0]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x44]
mov dword [esp], eax
call fcn.00415e50
mov esi, eax
mov eax, edx
or eax, esi
jne 0x404497
mov edx, dword [esp + 0x74]
cmp edx, dword [esp + 0xa0]
jne 0x4044d5
mov eax, dword [esp + 0xa0]
xor edx, edx
mov ebx, 0x64
mov esi, dword [edi]
mov ecx, dword [edi + 0x18]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x28], eax
add eax, dword [edi + 8]
adc edx, dword [edi + 0xc]
mov dword [edi + 8], eax
mov dword [edi + 0xc], edx
mov dword [esp + 8], ecx
imul ecx, edx, 0x64
mul ebx
mov ebx, dword [esp + 0xc]
mov dword [esp + 0x64], ebx
mov ebx, dword [edi + 0x14]
add edx, ecx
mov ecx, dword [esp + 8]
mov dword [esp + 0x60], ecx
mov ecx, dword [edi + 0x10]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], ecx
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.004a0f50
mov ecx, dword [esp + 0x60]
mov ebx, dword [esp + 0x64]
mov dword [esp + 4], eax
mov dword [esp + 8], ecx
mov dword [esp + 0xc], ebx
mov eax, dword [esi + 0x10]
mov dword [esp], eax
call dword [esi + 0x2c]
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x30]
mov ebx, dword [esp + 0x34]
mov edx, dword [esp + 0x3c]
xor eax, ecx
xor edx, ebx
or edx, eax
jne 0x403dc5
nop
lea esi, [esi]
xor esi, esi
xor edx, edx
mov eax, dword [esp + 0x7c]
test eax, eax
je 0x4041b4
lea ecx, [esp + 0x7c]
mov dword [esp], eax
mov dword [esp + 4], ecx
mov dword [esp + 0x28], edx
call fcn.0041d440
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x78]
test eax, eax
je 0x4041d4
lea ecx, [esp + 0x78]
mov dword [esp], eax
mov dword [esp + 4], ecx
mov dword [esp + 0x28], edx
call fcn.0041d440
mov edx, dword [esp + 0x28]
add esp, 0x8c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
sub esi, 1
je 0x404340
mov eax, dword [esp + 0x78]
test eax, eax
je 0x4041fe
mov dword [esp + 4], ebp
mov dword [esp], eax
call fcn.0041d440
shr ebx, 1
jmp 0x403d44
mov dword [esp + 4], edx
mov dword [esp], eax
mov dword [esp + 0x30], edx
mov dword [esp + 0x28], esi
mov esi, eax
mov dword [esp + 0x2c], edi
call fcn.0041d490
mov edi, dword [fcn.004a1b90]
mov dword [esp], 2
mov ebp, eax
call edi
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x18], esi
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], ecx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0x4a3b60
mov dword [esp + 4], 0x4a3c7c
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
call edi
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x4a3b9b
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call edi
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov edx, dword [esp + 0x30]
jmp 0x404194
mov dword [esp + 0x28], esi
mov esi, eax
mov dword [esp + 0x2c], edi
mov edi, dword [fcn.004a1b90]
mov dword [esp], 2
call edi
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], ebx
mov esi, 5
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], ecx
mov dword [esp + 8], 0x4a3b60
mov dword [esp + 4], 0x4a3cc4
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
call edi
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x4a3b9b
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call edi
mov dword [esp], eax
call sub.msvcrt.dll_fflush
xor edx, edx
jmp 0x404194
mov dword [esp + 4], edx
mov esi, eax
mov dword [esp], eax
mov dword [esp + 0x28], edx
call fcn.0041d490
mov dword [esp], 2
mov ebx, dword [fcn.004a1b90]
mov edi, eax
call ebx
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x4a3b60
mov dword [esp + 4], 0x4a3be8
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
call ebx
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x4a3b9b
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call ebx
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov edx, dword [esp + 0x28]
jmp 0x404194
mov dword [esp], 2
mov ebx, dword [fcn.004a1b90]
call ebx
mov edi, dword [esp + 0x30]
mov ebp, dword [esp + 0x34]
mov dword [esp + 8], 0x4a3b60
mov dword [esp + 4], 0x4a3ba0
mov dword [esp + 0x10], edi
mov edi, dword [esp + 0xa0]
mov dword [esp + 0x14], ebp
mov dword [esp + 0xc], edi
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
mov esi, 0x16
call ebx
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x4a3b9b
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call ebx
mov dword [esp], eax
call sub.msvcrt.dll_fflush
xor edx, edx
jmp 0x404194
mov dword [esp], 2
mov ebx, dword [fcn.004a1b90]
call ebx
mov edi, dword [esp + 0xa0]
mov dword [esp + 8], 0x4a3b60
mov dword [esp + 4], 0x4a3b68
mov dword [esp + 0xc], edi
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x404412
mov dword [esp + 4], edx
mov dword [esp], esi
mov dword [esp + 0x28], edx
call fcn.0041d490
mov dword [esp], 2
mov ebx, dword [fcn.004a1b90]
mov edi, eax
call ebx
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x4a3b60
mov dword [esp + 4], 0x4a3c20
jmp 0x40437b
mov esi, dword [fcn.004a1b90]
mov dword [esp + 0x28], edx
mov dword [esp], 2
call esi
mov edx, dword [esp + 0x28]
mov edi, dword [esp + 0xa0]
mov dword [esp + 8], 0x4a3b60
mov dword [esp + 4], 0x4a3c44
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], edi
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
call esi
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x4a3b9b
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call esi
mov esi, 5
mov dword [esp], eax
call sub.msvcrt.dll_fflush
xor edx, edx
jmp 0x404194