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

Disassembly:
push 0xffffffffffffffff
push 0x499f70
mov eax, dword fs:[0]
push eax
sub esp, 0x54
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4be0a0]
xor eax, esp
push eax
lea eax, [esp + 0x68]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x7c]
mov esi, ecx
mov eax, dword [esp + 0x78]
cmp byte [eax + 8], 7
jne 0x408963
push eax
lea eax, [esp + 0x20]
push eax
call fcn.00469282
mov dword [esp + 0x70], 0
cmp dword [esi + 0x18], 0x10
jb 0x408779
mov eax, dword [esi + 4]
jmp 0x40877c
lea eax, [esi + 4]
push eax
lea ecx, [esp + 0x54]
push ecx
mov edi, 0x4a1958
call fcn.0045e66b
add esp, 8
mov byte [esp + 0x70], 1
mov ecx, dword [esp + 0x60]
mov esi, dword [esp + 0x5c]
sub ecx, esi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x4088f4
mov ebx, dword [esp + 0x24]
jmp 0x4087c0
cmp bl, 7
jne 0x408949
test eax, eax
ja 0x4087d6
call fcn.0047db04
mov esi, dword [esp + 0x5c]
mov edi, dword [esi + 0x18]
lea eax, [esi + 4]
cmp edi, 0x10
jb 0x4087e5
mov edx, dword [eax]
jmp 0x4087e7
mov edx, eax
mov ecx, dword [esi + 0x14]
cmp edi, 0x10
jb 0x4087f1
mov eax, dword [eax]
add ecx, edx
push eax
lea edx, [esp + 0x20]
push edx
call fcn.0046a0e5
push eax
lea eax, [esp + 0x38]
push eax
call fcn.00469282
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x24]
movsx edx, al
and eax, 0xffffff00
movzx esi, cl
or eax, esi
mov esi, dword [esp + 0x34]
mov ebx, eax
mov eax, ecx
xor eax, edx
mov edx, dword [esp + 0x20]
and eax, 0xff
xor ecx, eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x34], eax
mov eax, ebx
shr eax, 8
and eax, 1
shl eax, 8
xor eax, ecx
mov dword [esp + 0x1c], esi
mov esi, dword [esp + 0x38]
mov dword [esp + 0x38], edx
and eax, 0x100
mov edx, ebx
xor edx, ecx
xor ecx, eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x3c], ecx
mov ecx, dword [esp + 0x40]
and edx, 0x100
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x2c]
xor ebx, edx
mov edx, dword [esp + 0x44]
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x48]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x20], esi
lea esi, [esp + 0x34]
mov dword [esp + 0x24], ebx
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], ecx
mov dword [esp + 0x48], eax
call fcn.0046941b
mov eax, dword [esp + 0x5c]
mov esi, eax
cmp eax, dword [esp + 0x60]
jbe 0x4088bd
call fcn.0047db04
mov eax, dword [esp + 0x50]
push esi
push eax
lea edx, [esp + 0x1c]
push edx
lea esi, [esp + 0x5c]
call fcn.00411610
mov ecx, dword [esp + 0x60]
mov esi, dword [esp + 0x5c]
sub ecx, esi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
jne 0x4087c0
sub esp, 0x18
mov eax, esp
mov dword [esp + 0x90], esp
lea ecx, [esp + 0x34]
push ecx
push eax
call fcn.00469282
mov edi, ebp
call fcn.0046949e
cmp byte [ebp + 8], 0
lea esi, [esp + 0x50]
setne bl
call fcn.00403e20
lea esi, [esp + 0x1c]
mov dword [esp + 0x70], 0xffffffff
call fcn.0046941b
mov al, bl
mov ecx, dword [esp + 0x68]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret
lea esi, [esp + 0x50]
call fcn.00403e20
lea esi, [esp + 0x1c]
mov dword [esp + 0x70], 0xffffffff
call fcn.0046941b
xor al, al
mov ecx, dword [esp + 0x68]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret