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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x7c
mov eax, dword [0x52de80]
xor eax, esp
mov dword [esp + 0x78], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, ecx
mov dword [esp + 0x14], 0
test edi, edi
je 0x408a61
push dword [esp + 0x14]
lea eax, [esp + 0x17]
push eax
push dword [edi + 4]
push dword [edi]
call fcn.00409ea0
mov eax, dword [edi]
add esp, 0x10
mov dword [edi + 4], eax
cmp dword [esi + 0x10], 0
je 0x408a61
xor eax, eax
mov dword [esp + 0x18], 0
push 0xffffffffffffffff
push eax
push esi
lea ecx, [esp + 0x48]
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x5c], 7
mov dword [esp + 0x58], 0
mov word [esp + 0x48], ax
call fcn.004055a0
xor eax, eax
mov dword [esp + 0x68], 7
mov dword [esp + 0x64], 0
mov word [esp + 0x54], ax
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x40]
call fcn.00408c20
mov edx, eax
lea ecx, [esp + 0x3c]
call fcn.00408380
test al, al
sete bl
cmp dword [esp + 0x38], 8
jb 0x4087e5
push dword [esp + 0x24]
call fcn.004814b9
add esp, 4
lea eax, [esp + 0x24]
lea ecx, [esp + 0x3c]
push eax
call fcn.00408d30
lea ecx, [esp + 0x54]
test bl, bl
je 0x408873
cmp ecx, eax
je 0x408809
push 0xffffffffffffffff
push 0
push eax
call fcn.004055a0
cmp dword [esp + 0x38], 8
jb 0x40881c
push dword [esp + 0x24]
call fcn.004814b9
add esp, 4
lea ecx, [esp + 0x54]
call fcn.004085c0
test al, al
jne 0x408837
lea eax, [esp + 0x54]
push eax
lea ecx, [esp + 0x1c]
call fcn.00409800
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x40]
call fcn.00408c20
lea ecx, [esp + 0x3c]
cmp ecx, eax
je 0x408857
push 0xffffffffffffffff
push 0
push eax
call fcn.004055a0
cmp dword [esp + 0x38], 8
jb 0x4087b4
push dword [esp + 0x24]
call fcn.004814b9
add esp, 4
jmp 0x4087b4
cmp ecx, eax
je 0x408885
push 0xffffffffffffffff
push 0
push eax
lea ecx, [esp + 0x60]
call fcn.004055a0
cmp dword [esp + 0x38], 8
jb 0x408898
push dword [esp + 0x24]
call fcn.004814b9
add esp, 4
cmp dword [esp + 0x64], 0
je 0x4088d2
mov edx, 0x50cd9c
lea ecx, [esp + 0x54]
call fcn.00409e30
test al, al
je 0x4088d2
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x40]
call fcn.00408d30
push eax
lea ecx, [esp + 0x1c]
call fcn.00409800
lea ecx, [esp + 0x24]
call fcn.004086c0
lea eax, [esp + 0x6c]
push eax
lea ecx, [esp + 0x40]
call fcn.00408c20
lea ecx, [esp + 0x6c]
call fcn.00408310
cmp eax, 0xffffffff
je 0x408937
inc eax
mov dword [esp + 0x38], 7
xor ecx, ecx
mov dword [esp + 0x34], 0
push eax
push ecx
lea eax, [esp + 0x74]
mov word [esp + 0x2c], cx
push eax
lea ecx, [esp + 0x30]
call fcn.004055a0
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x1c]
call fcn.00409730
cmp dword [esp + 0x38], 8
jb 0x408937
push dword [esp + 0x24]
call fcn.004814b9
add esp, 4
mov ebx, dword [esp + 0x1c]
mov eax, 0x2aaaaaab
mov esi, dword [esp + 0x18]
mov ecx, ebx
sub ecx, esi
mov dword [esp + 0x24], 0
imul ecx
lea ecx, [esp + 0x24]
mov dword [esp + 0x28], 0
sar edx, 2
mov eax, edx
mov dword [esp + 0x2c], 0
shr eax, 0x1f
add eax, edx
push eax
call fcn.00409ee0
test al, al
je 0x408990
push dword [esp + 0x14]
mov ecx, dword [esp + 0x28]
push esi
push ebx
call fcn.0040a020
add esp, 0xc
mov dword [esp + 0x28], eax
lea eax, [esp + 0x24]
mov ecx, edi
push eax
call fcn.004096c0
mov edi, dword [esp + 0x24]
test edi, edi
je 0x4089c0
push dword [esp + 0x14]
lea eax, [esp + 0x17]
push eax
push dword [esp + 0x30]
push edi
call fcn.00409ea0
push edi
call fcn.004814b9
add esp, 0x14
cmp dword [esp + 0x80], 8
jb 0x4089d6
push dword [esp + 0x6c]
call fcn.004814b9
add esp, 4
xor eax, eax
mov dword [esp + 0x80], 7
cmp dword [esp + 0x68], 8
mov dword [esp + 0x7c], 0
mov word [esp + 0x6c], ax
jb 0x408a03
push dword [esp + 0x54]
call fcn.004814b9
add esp, 4
xor eax, eax
mov dword [esp + 0x68], 7
cmp dword [esp + 0x50], 8
mov dword [esp + 0x64], 0
mov word [esp + 0x54], ax
jb 0x408a2d
push dword [esp + 0x3c]
call fcn.004814b9
add esp, 4
xor eax, eax
mov dword [esp + 0x50], 7
mov dword [esp + 0x4c], 0
mov word [esp + 0x3c], ax
test esi, esi
je 0x408a61
push dword [esp + 0x14]
lea eax, [esp + 0x17]
push eax
push ebx
push esi
call fcn.00409ea0
push esi
call fcn.004814b9
add esp, 0x14
mov ecx, dword [esp + 0x84]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004bc45f
mov esp, ebp
pop ebp
ret 4