Function at 0x404d40
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x430ba9
mov eax, dword fs:[0]
push eax
sub esp, 0xa0
mov eax, dword [0x43b0c0]
xor eax, esp
mov dword [esp + 0x98], eax
push ebx
push esi
push edi
mov eax, dword [0x43b0c0]
xor eax, esp
push eax
lea eax, [esp + 0xb0]
mov dword fs:[0], eax
mov edi, ecx
mov dword [esp + 0x20], edi
call fcn.00401000
mov edx, dword [eax + 0xc4]
sub edx, dword [eax + 0xc0]
mov eax, 0x38e38e39
imul edx
sar edx, 4
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
mov dword [esp + 0x1c], ebx
test ebx, ebx
jle 0x40500f
lea ecx, [esp + 0x24]
call fcn.00405d90
sub esp, 0x18
mov edx, eax
mov ecx, esp
mov dword [esp + 0xd0], 0
call fcn.004059d0
call fcn.00405a80
add esp, 0x18
mov dword [esp + 0xb8], 0xffffffff
cmp dword [esp + 0x38], 8
jb 0x404dfa
push dword [esp + 0x24]
call fcn.00424a34
add esp, 4
xor eax, eax
mov dword [esp + 0x38], 7
mov dword [esp + 0x34], 0
mov word [esp + 0x24], ax
test ebx, ebx
jle 0x40500f
xor esi, esi
mov dword [esp + 0x14], esi
nop
mov eax, dword [0x43d9b8]
test eax, eax
jne 0x404e82
push 0xcc
call fcn.004249e5
add esp, 4
mov dword [esp + 0x18], eax
mov dword [esp + 0xb8], 1
test eax, eax
je 0x404e70
mov ecx, eax
mov dword [eax + 0xc0], 0
mov dword [eax + 0xc4], 0
mov dword [eax + 0xc8], 0
call fcn.004010a0
jmp 0x404e72
xor eax, eax
mov dword [esp + 0xb8], 0xffffffff
mov dword [0x43d9b8], eax
mov ebx, dword [eax + 0xc0]
add ebx, esi
mov edx, ebx
lea ecx, [esp + 0x3c]
call fcn.00405ef0
sub esp, 0x18
mov edx, eax
mov ecx, esp
mov dword [esp + 0xd0], 2
call fcn.004059d0
call fcn.00405a80
add esp, 0x18
mov dword [esp + 0xb8], 0xffffffff
cmp dword [esp + 0x50], 8
jb 0x404ed2
push dword [esp + 0x3c]
call fcn.00424a34
add esp, 4
lea eax, [ebx + 0x18]
push eax
mov edx, edi
lea ecx, [esp + 0x40]
call fcn.00405650
add esp, 4
mov esi, eax
push 0x38
lea eax, [esp + 0x74]
push 0
push eax
lea edi, [ebx + 0x30]
mov dword [esp + 0x78], 0
call fcn.0042cd00
add esp, 0xc
cmp dword [esi + 0x14], 8
jb 0x404f0c
mov eax, dword [esi]
jmp 0x404f0e
mov eax, esi
test eax, eax
je 0x404f84
cmp word [eax], 0
je 0x404f84
push eax
call dword [0x431084]
cmp eax, 0xffffffff
je 0x404f84
cmp dword [esi + 0x14], 8
mov dword [esp + 0x6c], 0x3c
mov dword [esp + 0x74], 0
mov dword [esp + 0x78], str.open
jb 0x404f44
mov esi, dword [esi]
cmp dword [edi + 0x14], 8
mov dword [esp + 0x7c], esi
mov dword [esp + 0x88], 0
mov dword [esp + 0x70], 0x40
jb 0x404f63
mov edi, dword [edi]
lea eax, [esp + 0x6c]
push eax
mov dword [esp + 0x84], edi
call dword [0x4311ac]
push 0xffffffffffffffff
push dword [esp + 0xa8]
call dword [0x431068]
cmp dword [esp + 0x50], 8
jb 0x404f97
push dword [esp + 0x3c]
call fcn.00424a34
add esp, 4
mov edx, ebx
lea ecx, [esp + 0x54]
call fcn.00405fc0
sub esp, 0x18
mov edx, eax
mov ecx, esp
mov dword [esp + 0xd0], 3
call fcn.004059d0
call fcn.00405a80
add esp, 0x18
mov dword [esp + 0xb8], 0xffffffff
cmp dword [esp + 0x68], 8
jb 0x404fdf
push dword [esp + 0x54]
call fcn.00424a34
add esp, 4
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x20]
xor eax, eax
add esi, 0x48
dec dword [esp + 0x1c]
mov dword [esp + 0x68], 7
mov dword [esp + 0x64], 0
mov word [esp + 0x54], ax
mov dword [esp + 0x14], esi
jne 0x404e20
mov ecx, dword [esp + 0xb0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x98]
xor ecx, esp
call fcn.004249d6
mov esp, ebp
pop ebp
ret