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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x455f4f
mov eax, dword fs:[0]
push eax
sub esp, 0x80
mov eax, dword [0x4754f4]
xor eax, esp
mov dword [esp + 0x78], eax
push ebx
push esi
push edi
mov eax, dword [0x4754f4]
xor eax, esp
push eax
lea eax, [esp + 0x90]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor esi, esi
mov ebx, ecx
mov dword [esp + 0x18], esi
cmp eax, 0xffffffff
jne 0x407384
xor eax, eax
jmp 0x407727
mov ecx, dword [ebx + 0x24]
cmp dword [ecx], esi
je 0x4073ab
mov edx, dword [ecx]
mov ecx, dword [ebx + 0x34]
mov edi, dword [ecx]
add edi, edx
cmp edx, edi
jae 0x4073ab
dec dword [ecx]
mov ebx, dword [ebx + 0x24]
mov ecx, dword [ebx]
lea edx, [ecx + 1]
mov dword [ebx], edx
mov byte [ecx], al
jmp 0x407727
cmp dword [ebx + 0x54], esi
je 0x407724
mov edx, dword [ebx + 0x10]
lea edi, [ebx + 0x48]
cmp dword [edx], edi
jne 0x4073d2
mov ecx, dword [ebx + 0x40]
mov edi, dword [ebx + 0x3c]
mov dword [edx], edi
mov edx, dword [ebx + 0x20]
mov dword [edx], ecx
mov edx, dword [ebx + 0x30]
sub ecx, ecx
mov dword [edx], ecx
cmp dword [ebx + 0x44], esi
jne 0x4073f8
mov ebx, dword [ebx + 0x54]
movsx eax, al
push ebx
push eax
call fcn.00420d10
add esp, 8
cmp eax, 0xffffffff
je 0x407724
mov eax, dword [ebp + 8]
jmp 0x407727
push esi
push 8
lea ecx, [esp + 0x70]
push ecx
mov byte [esp + 0x1e], al
call fcn.00408550
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x6c]
push eax
mov dword [esp + 0xa0], esi
call fcn.004088a0
mov esi, eax
lea ecx, [esp + 0x38]
push ecx
lea edx, [esp + 0x6c]
push edx
mov byte [esp + 0xa0], 1
call fcn.004088a0
mov edi, eax
mov byte [esp + 0x98], 2
call fcn.0040a150
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x7c]
mov esi, edi
mov dword [esp + 0x14], eax
call fcn.0040a150
mov ecx, dword [ebx + 0x44]
mov edx, dword [ecx]
mov edx, dword [edx + 0x14]
lea esi, [esp + 0x28]
push esi
mov esi, dword [esp + 0x18]
add esi, dword [esp + 0x20]
push esi
push eax
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0x23]
push eax
lea eax, [esp + 0x26]
push eax
lea eax, [ebx + 0x4c]
push eax
call edx
push 3
lea ecx, [esp + 0x24]
mov esi, eax
mov byte [esp + 0x9c], 1
call fcn.0044fc00
lea edi, [esp + 0x38]
mov byte [esp + 0x98], 3
call fcn.004013e0
lea ecx, [esp + 0x20]
mov byte [esp + 0x98], 1
call fcn.0044fc40
push 3
lea ecx, [esp + 0x28]
mov byte [esp + 0x9c], 0
call fcn.0044fc00
lea edi, [esp + 0x44]
mov byte [esp + 0x98], 4
call fcn.004013e0
lea ecx, [esp + 0x24]
mov byte [esp + 0x98], 0
call fcn.0044fc40
test esi, esi
js 0x407710
cmp esi, 1
jg 0x40774a
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x6c]
push ecx
call fcn.004088a0
mov esi, eax
mov byte [esp + 0x98], 5
call fcn.0040a150
mov esi, dword [esp + 0x28]
sub esi, eax
push 3
lea ecx, [esp + 0x34]
mov dword [esp + 0x18], esi
mov byte [esp + 0x9c], 0
call fcn.0044fc00
lea edi, [esp + 0x50]
mov byte [esp + 0x98], 6
call fcn.004013e0
lea ecx, [esp + 0x30]
mov byte [esp + 0x98], 0
call fcn.0044fc40
test esi, esi
je 0x4075a4
lea edx, [esp + 0x5c]
push edx
lea eax, [esp + 0x6c]
push eax
call fcn.004088a0
mov byte [esp + 0x98], 7
or dword [esp + 0x18], 1
mov esi, eax
call fcn.0040a150
mov ecx, dword [ebx + 0x54]
mov esi, dword [esp + 0x14]
push ecx
push esi
push 1
push eax
call fcn.004259f0
add esp, 0x10
mov byte [esp + 0x13], 1
cmp esi, eax
jne 0x4075a9
mov byte [esp + 0x13], 0
mov dword [esp + 0x98], 0
test byte [esp + 0x18], 1
je 0x4075ed
and dword [esp + 0x18], 0xfffffffe
push 3
lea ecx, [esp + 0x38]
call fcn.0044fc00
lea edi, [esp + 0x5c]
mov byte [esp + 0x98], 8
call fcn.004013e0
lea ecx, [esp + 0x34]
mov byte [esp + 0x98], 0
call fcn.0044fc40
cmp byte [esp + 0x13], 0
jne 0x407710
lea edx, [esp + 0x12]
mov byte [ebx + 0x49], 1
cmp dword [esp + 0x2c], edx
jne 0x407786
test esi, esi
jne 0x407626
cmp dword [esp + 0x7c], 0x20
jae 0x407710
push esi
lea eax, [esi + 8]
lea edi, [esp + 0x6c]
call fcn.00408680
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x6c]
push ecx
call fcn.004088a0
mov esi, eax
lea edx, [esp + 0x38]
push edx
lea eax, [esp + 0x6c]
push eax
mov byte [esp + 0xa0], 1
call fcn.004088a0
mov edi, eax
mov byte [esp + 0x98], 2
call fcn.0040a150
mov ecx, dword [esp + 0x7c]
mov esi, edi
mov dword [esp + 0x1c], eax
mov dword [esp + 0x14], ecx
call fcn.0040a150
mov ecx, dword [ebx + 0x44]
mov edx, dword [ecx]
mov edx, dword [edx + 0x14]
lea esi, [esp + 0x28]
push esi
mov esi, dword [esp + 0x18]
add esi, dword [esp + 0x20]
push esi
push eax
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0x23]
push eax
lea eax, [esp + 0x26]
push eax
lea eax, [ebx + 0x4c]
push eax
call edx
push 3
lea ecx, [esp + 0x24]
mov esi, eax
mov byte [esp + 0x9c], 1
call fcn.0044fc00
lea edi, [esp + 0x38]
mov byte [esp + 0x98], 3
call fcn.004013e0
lea ecx, [esp + 0x20]
mov byte [esp + 0x98], 1
call fcn.0044fc40
push 3
lea ecx, [esp + 0x28]
mov byte [esp + 0x9c], 0
call fcn.0044fc00
lea edi, [esp + 0x44]
mov byte [esp + 0x98], 4
call fcn.004013e0
lea ecx, [esp + 0x24]
mov byte [esp + 0x98], 0
call fcn.0044fc40
test esi, esi
jns 0x4074fa
lea esi, [esp + 0x68]
mov dword [esp + 0x98], 0xffffffff
call fcn.00406960
or eax, 0xffffffff
mov ecx, dword [esp + 0x90]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x78]
xor ecx, esp
call fcn.00420d00
mov esp, ebp
pop ebp
ret 4
cmp esi, 3
jne 0x407710
mov ebx, dword [ebx + 0x54]
movsx eax, byte [esp + 0x12]
push ebx
push eax
call fcn.00420d10
add esp, 8
cmp eax, 0xffffffff
je 0x40776b
mov edi, dword [ebp + 8]
jmp 0x40776e
or edi, 0xffffffff
lea esi, [esp + 0x68]
mov dword [esp + 0x98], 0xffffffff
call fcn.00406960
mov eax, edi
jmp 0x407727
lea esi, [esp + 0x68]
mov dword [esp + 0x98], 0xffffffff
call fcn.00406960
mov eax, dword [ebp + 8]
jmp 0x407727