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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x431c53
mov eax, dword fs:[0]
push eax
sub esp, 0x60
mov eax, dword [0x4431c0]
xor eax, esp
mov dword [esp + 0x58], eax
push ebx
push esi
push edi
mov eax, dword [0x4431c0]
xor eax, esp
push eax
lea eax, [esp + 0x70]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov ebx, 0xffff
mov eax, ebx
mov edi, ecx
mov dword [esp + 0x28], edi
cmp ax, si
jne 0x409485
xor eax, eax
jmp 0x409655
mov eax, dword [edi + 0x24]
mov ecx, dword [eax]
test ecx, ecx
je 0x4094b1
mov eax, dword [edi + 0x34]
mov edx, dword [eax]
lea edx, [ecx + edx*2]
cmp ecx, edx
jae 0x4094b1
dec dword [eax]
mov edi, dword [edi + 0x24]
mov eax, dword [edi]
lea ecx, [eax + 2]
mov dword [edi], ecx
mov word [eax], si
mov ax, si
jmp 0x409655
mov eax, dword [edi + 0x4c]
test eax, eax
jne 0x4094bf
mov eax, ebx
jmp 0x409655
cmp dword [edi + 0x3c], 0
jne 0x4094de
push eax
push esi
call fcn.0041afc1
pop ecx
pop ecx
mov ecx, ebx
cmp ax, cx
movzx eax, si
jne 0x409655
jmp 0x4094b8
movzx eax, si
lea esi, [esp + 0x4c]
mov dword [esp + 0x18], eax
call fcn.00409cb0
and dword [esp + 0x78], 0
mov eax, dword [esp + 0x60]
lea ebx, [esp + 0x34]
mov dword [esp + 0x14], eax
call fcn.00409d2c
mov esi, eax
call fcn.0040a8f0
add eax, dword [esp + 0x14]
lea ebx, [esp + 0x2c]
lea esi, [esp + 0x4c]
mov dword [esp + 0x14], eax
call fcn.00409d2c
mov esi, eax
call fcn.0040a8f0
mov ecx, dword [edi + 0x3c]
mov esi, dword [ecx]
lea ebx, [esp + 0x1c]
push ebx
push dword [esp + 0x18]
lea edx, [edi + 0x44]
push eax
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x2a]
push eax
lea eax, [esp + 0x2c]
push eax
push edx
mov dword [esp + 0x40], edx
call dword [esi + 0x14]
jmp 0x40963b
cmp eax, 1
jg 0x409675
lea ebx, [esp + 0x3c]
lea esi, [esp + 0x4c]
call fcn.00409d2c
mov esi, eax
call fcn.0040a8f0
mov ecx, dword [esp + 0x1c]
sub ecx, eax
mov dword [esp + 0x14], ecx
je 0x4095af
push dword [edi + 0x4c]
lea ebx, [esp + 0x48]
push ecx
push 1
lea esi, [esp + 0x58]
call fcn.00409d2c
mov esi, eax
call fcn.0040a8f0
push eax
call fcn.0041ad15
add esp, 0x10
cmp dword [esp + 0x14], eax
jne 0x409643
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x18]
mov byte [edi + 0x42], 1
cmp dword [esp + 0x20], eax
jne 0x4096ac
test ecx, ecx
ja 0x4095de
cmp dword [esp + 0x60], 0x20
push 0
jae 0x409645
push 8
pop ebx
lea edi, [esp + 0x50]
call fcn.00409ce8
mov edi, dword [esp + 0x28]
mov eax, dword [esp + 0x60]
lea ebx, [esp + 0x34]
lea esi, [esp + 0x4c]
mov dword [esp + 0x14], eax
call fcn.00409d2c
mov esi, eax
call fcn.0040a8f0
add eax, dword [esp + 0x14]
lea ebx, [esp + 0x2c]
lea esi, [esp + 0x4c]
mov dword [esp + 0x14], eax
call fcn.00409d2c
mov esi, eax
call fcn.0040a8f0
mov ecx, dword [edi + 0x3c]
mov edx, dword [ecx]
lea esi, [esp + 0x1c]
push esi
push dword [esp + 0x18]
push eax
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x2a]
push eax
lea eax, [esp + 0x2c]
push eax
push dword [esp + 0x3c]
call dword [edx + 0x14]
test eax, eax
jge 0x409555
push 0
push 1
lea ecx, [esp + 0x54]
call fcn.004059be
mov eax, 0xffff
mov ecx, dword [esp + 0x70]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x58]
xor ecx, esp
call fcn.004195bf
mov esp, ebp
pop ebp
ret 4
cmp eax, 3
jne 0x409643
push dword [edi + 0x4c]
push dword [esp + 0x1c]
call fcn.0041afc1
movzx esi, word [ebp + 8]
pop ecx
pop ecx
mov ecx, 0xffff
mov edx, ecx
cmp ax, dx
jne 0x40969a
mov esi, ecx
push 0
push 1
lea ecx, [esp + 0x54]
call fcn.004059be
jmp 0x4094a9
push 0
push 1
lea ecx, [esp + 0x54]
call fcn.004059be
mov ax, word [ebp + 8]
jmp 0x409655