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

Disassembly:
push 0xffffffffffffffff
push 0x458e80
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x48
mov eax, dword [esp + 0x60]
push ebx
push ebp
push esi
mov edx, dword [eax]
mov esi, ecx
mov ecx, dword [esp + 0x68]
cmp edx, 1
push edi
mov ebp, dword [ecx]
mov dword [esp + 0x14], ebp
jne 0x40c7ae
mov eax, dword [esi + 0x34]
mov ebx, dword [esp + 0x74]
mov edx, ebp
and ebp, 0xffff
mov eax, dword [eax]
sar edx, 0x10
shl ebp, 5
mov edx, dword [eax + edx*4]
mov eax, dword [edx + ebp]
mov dword [ebx], eax
mov eax, dword [ecx]
mov edi, dword [esi + 0x34]
mov edx, eax
sar edx, 0x10
mov edi, dword [edi]
and eax, 0xffff
shl eax, 5
mov edx, dword [edi + edx*4]
mov eax, dword [edx + eax + 4]
mov edx, dword [esp + 0x78]
mov dword [edx], eax
mov eax, dword [ecx]
push eax
mov ecx, esi
call fcn.0040c0e0
mov ecx, esi
mov dword [esp + 0x14], eax
call fcn.0040c380
mov ebp, dword [esp + 0x14]
jmp 0x40c7b2
mov ebx, dword [esp + 0x74]
mov edi, dword [esp + 0x68]
mov dword [esp + 0x10], 0
test ebp, ebp
je 0x40c7e1
mov edx, dword [esi + 0x34]
mov ecx, ebp
sar ecx, 0x10
mov eax, dword [edx]
mov edx, ebp
and edx, 0xffff
mov eax, dword [eax + ecx*4]
shl edx, 5
add eax, edx
mov ecx, dword [eax + 4]
jmp 0x40c808
test edi, edi
je 0x40c80e
mov ecx, dword [esi + 0x34]
mov eax, edi
sar eax, 0x10
mov edx, dword [ecx]
mov ecx, edi
and ecx, 0xffff
mov eax, dword [edx + eax*4]
shl ecx, 5
add eax, ecx
mov ecx, dword [eax + 8]
and ecx, 0x3fffff
add ecx, dword [eax]
mov dword [esp + 0x10], ecx
mov edx, dword [esi + 0x28]
push 0
push edx
push ecx
mov ecx, esp
mov dword [esp + 0x74], esp
push esi
call fcn.00402fc0
lea ecx, [esp + 0x44]
call fcn.00408110
mov eax, dword [0x47407c]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x10]
xor ecx, ecx
mov dword [esp + 0x60], ecx
mov dword [esp + 0x68], ecx
mov ecx, dword [ebx]
mov dword [esp + 0x40], eax
cmp eax, ecx
jge 0x40c86b
lea ecx, [esp + 0x24]
mov dword [esp + 0x10], eax
push ecx
lea ecx, [esp + 0x3c]
call fcn.00404d30
mov ecx, dword [ebx]
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x40]
cmp eax, ecx
jl 0x40c84b
mov eax, dword [ebx]
mov ecx, dword [esp + 0x10]
mov ebx, eax
sub ebx, ecx
mov dword [esp + 0x1c], ebx
jne 0x40c88f
test ebp, ebp
mov dword [esp + 0x10], 0
je 0x40c88f
mov dword [esp + 0x68], 1
mov edx, dword [0x47407c]
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x78]
lea ecx, [esp + 0x18]
push ecx
mov byte [esp + 0x64], 1
mov ecx, dword [edx]
push ecx
push eax
mov ecx, esi
call fcn.0040ac10
lea ecx, [esp + 0x18]
mov byte [esp + 0x60], 0
call fcn.0043ef94
mov edx, dword [esp + 0x78]
mov ecx, esi
mov eax, dword [edx]
neg eax
push eax
push ebp
push edi
call fcn.0040c4a0
mov ecx, dword [esp + 0x70]
cmp dword [ecx], 0x80
jne 0x40c9b9
mov edx, dword [esi + 0x34]
mov ebx, edi
sar ebx, 0x10
mov eax, dword [edx]
and edi, 0xffff
shl ebx, 2
shl edi, 5
mov ecx, dword [ebx + eax]
mov dword [esp + 0x20], edi
mov eax, dword [ecx + edi + 8]
add ecx, edi
and eax, 0x3fffff
add eax, dword [ecx]
mov dword [esp + 0x40], eax
mov ecx, dword [edx]
mov edx, dword [ebx + ecx]
mov ecx, dword [edi + edx + 8]
add edi, edx
mov edx, ecx
shr edx, 0x16
mov ebp, dword [edi + 4]
mov edi, dword [edi + 0x14]
sub ebp, edx
and ecx, 0x3fffff
sub ebp, ecx
add ebp, eax
cmp eax, ebp
jge 0x40c993
lea eax, [esp + 0x24]
lea ecx, [esp + 0x38]
push eax
call fcn.00404d30
test eax, eax
jle 0x40c98d
cmp dword [esp + 0x24], 1
jne 0x40c983
mov eax, dword [esi + 0x34]
mov ecx, edi
sar ecx, 0x10
mov eax, dword [eax]
mov edx, edi
shl ecx, 2
and edx, 0xffff
mov edi, dword [ecx + eax]
shl edx, 5
add edi, edx
mov eax, dword [edi + 4]
add eax, dword [edi]
mov edi, dword [esi + 0x34]
mov dword [esp + 0x40], eax
mov edi, dword [edi]
mov ecx, dword [ecx + edi]
mov edi, dword [ecx + edx + 0x18]
jmp 0x40c987
mov eax, dword [esp + 0x40]
cmp eax, ebp
jl 0x40c936
jmp 0x40c991
mov eax, dword [esp + 0x40]
cmp eax, ebp
jne 0x40c9b1
mov edx, dword [esi + 0x34]
mov eax, dword [edx]
mov edx, dword [esp + 0x20]
mov ecx, dword [eax + ebx]
lea eax, [ecx + edx + 0xc]
mov ecx, dword [ecx + edx + 0xc]
and ecx, 0xffdfffff
mov dword [eax], ecx
mov ebp, dword [esp + 0x14]
mov ebx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x70]
mov eax, dword [esp + 0x68]
mov edx, dword [esp + 0x10]
mov dword [esp + 0x60], 0xffffffff
mov dword [ecx], eax
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x78]
mov dword [eax], edx
mov edx, dword [esp + 0x6c]
mov dword [ecx], ebx
lea ecx, [esp + 0x34]
mov dword [edx], ebp
call fcn.0043ef94
mov ecx, dword [esp + 0x58]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x54
ret 0x14