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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4dc0e9
mov eax, dword fs:[0]
push eax
sub esp, 0x78
mov eax, dword [0x5114a8]
xor eax, esp
mov dword [esp + 0x70], eax
push ebx
push esi
push edi
mov eax, dword [0x5114a8]
xor eax, esp
push eax
lea eax, [esp + 0x88]
mov dword fs:[0], eax
xor esi, esi
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], ecx
cmp dword [ecx + 0x3c], esi
je 0x407e5f
cmp byte [ecx + 0x42], 0
je 0x407e5f
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push 0xffff
call edx
movzx eax, ax
mov ecx, 0xffff
cmp cx, ax
je 0x407e47
push esi
lea edx, [esp + 0x64]
push edx
lea ecx, [esi + 8]
call fcn.004076b0
mov dword [esp + 0x90], esi
lea esp, [esp]
lea esi, [esp + 0x54]
lea ecx, [esp + 0x60]
call fcn.004077b0
mov edi, eax
lea esi, [esp + 0x30]
lea ecx, [esp + 0x60]
mov byte [esp + 0x90], 1
call fcn.004077b0
mov ebx, eax
mov esi, edi
mov byte [esp + 0x90], 2
call fcn.00408b90
mov edi, eax
mov eax, dword [esp + 0x78]
mov esi, ebx
mov dword [esp + 0x24], eax
call fcn.00408b90
mov ebx, dword [esp + 0x1c]
mov ecx, dword [ebx + 0x3c]
mov edx, dword [ecx]
lea esi, [esp + 0x2c]
push esi
mov esi, dword [esp + 0x28]
add esi, edi
push esi
push eax
lea eax, [ebx + 0x44]
push eax
mov eax, dword [edx + 0x18]
call eax
push 3
lea ecx, [esp + 0x2c]
mov esi, eax
mov byte [esp + 0x94], 1
call fcn.0045cad0
lea edi, [esp + 0x30]
mov byte [esp + 0x90], 3
call fcn.00402740
lea ecx, [esp + 0x28]
mov byte [esp + 0x90], 1
call fcn.0045cb10
push 3
lea ecx, [esp + 0x24]
mov byte [esp + 0x94], 0
call fcn.0045cad0
lea edi, [esp + 0x54]
mov byte [esp + 0x90], 4
call fcn.00402740
lea ecx, [esp + 0x20]
mov byte [esp + 0x90], 0
call fcn.0045cb10
mov eax, esi
sub eax, 0
je 0x407d6a
sub eax, 1
je 0x407d6e
sub eax, 2
mov dword [esp + 0x90], 0xffffffff
lea ecx, [esp + 0x60]
jne 0x407e42
jmp 0x407e5a
mov byte [ebx + 0x42], 0
lea esi, [esp + 0x3c]
lea ecx, [esp + 0x60]
call fcn.004077b0
mov esi, eax
mov byte [esp + 0x90], 5
call fcn.00408b90
mov ebx, dword [esp + 0x2c]
lea edi, [esp + 0x3c]
sub ebx, eax
mov byte [esp + 0x90], 0
call fcn.00402660
test ebx, ebx
jbe 0x407de3
lea esi, [esp + 0x48]
lea ecx, [esp + 0x60]
call fcn.004077b0
mov byte [esp + 0x90], 6
or dword [esp + 0x18], 1
mov esi, eax
call fcn.00408b90
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx + 0x4c]
push edx
push ebx
push 1
push eax
call fcn.00466690
add esp, 0x10
mov byte [esp + 0x17], 1
cmp ebx, eax
jne 0x407de8
mov byte [esp + 0x17], 0
mov dword [esp + 0x90], 0
test byte [esp + 0x18], 1
je 0x407e08
and dword [esp + 0x18], 0xfffffffe
lea edi, [esp + 0x48]
call fcn.00402660
cmp byte [esp + 0x17], 0
jne 0x407e33
mov eax, dword [esp + 0x1c]
cmp byte [eax + 0x42], 0
je 0x407e4b
test ebx, ebx
jne 0x407c70
push ebx
lea eax, [ebx + 8]
lea edi, [esp + 0x64]
call fcn.00407710
jmp 0x407c70
mov dword [esp + 0x90], 0xffffffff
lea ecx, [esp + 0x60]
call fcn.00401740
xor al, al
jmp 0x407e61
mov dword [esp + 0x90], 0xffffffff
lea ecx, [esp + 0x60]
call fcn.00401740
mov al, 1
mov ecx, dword [esp + 0x88]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x70]
xor ecx, esp
call fcn.0045ef20
mov esp, ebp
pop ebp
ret