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

Disassembly:
sub esp, 0x10
cmp dword [0x7cf900], 0
push ebx
mov ebx, dword [esp + 0x20]
push ebp
mov ebp, dword [esp + 0x2c]
jne 0x5008df
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x10
ret
call fcn.004e8580
cmp dword [0x7cf900], 0
je 0x500926
cmp dword [0x80f6f8], 0
jne 0x5008ff
cmp dword [0x89f1c4], 0
je 0x500926
call fcn.004ea2c0
cmp dword [0x80f6f8], 0
mov eax, 1
mov dword [0x8168b4], eax
je 0x50091c
mov dword [0x8168b0], eax
mov dword [0x80f6f8], 0
push esi
push edi
push 0x20
push 0
push 0
call fcn.004f7cd0
mov eax, dword [0x8e80b0]
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x40]
lea edx, [esp + 0x1c]
mov dword [esp + 0x14], eax
push edx
lea eax, [esp + 0x1c]
push eax
push ecx
call fcn.004eb0f0
movzx edx, byte [0x7cfae2]
imul edx, dword [esp + 0x24]
mov ecx, dword [0x7cfae0]
mov eax, 0x80808081
mul edx
shr edx, 7
mov esi, edx
movzx edx, ch
imul edx, dword [esp + 0x28]
mov eax, 0x80808081
mul edx
shr edx, 7
shl esi, 8
or esi, edx
movzx edx, cl
imul edx, dword [esp + 0x2c]
mov eax, 0x80808081
mul edx
shl esi, 8
shr edx, 7
or esi, edx
and ecx, 0xff000000
add esp, 0x10
or esi, ecx
cmp dword [esp + 0x40], 0
je 0x500c23
cmp dword [0x8168b0], 0
jne 0x5009c9
cmp dword [0x8168b4], 0
je 0x5009da
push 0
mov eax, 1
xor ecx, ecx
call fcn.004f5fe0
add esp, 4
mov edi, dword [0x7cfac0]
cmp edi, 1
mov eax, dword [0x7cfacc]
mov ecx, dword [0x7cfac4]
je 0x500a14
cmp eax, 4
jne 0x500a14
mov eax, dword [0x7cfac8]
lea edx, [eax + edi*2]
add edx, edi
lea eax, [ecx + 3]
cmp eax, dword [edx*4 + 0x6a2948]
jl 0x500b43
mov eax, dword [0x7cfacc]
test ecx, ecx
je 0x500b27
mov edx, dword [0x7cfac8]
lea edx, [edx + edi*2]
add edx, edi
mov edx, dword [edx*4 + 0x6a2960]
cmp dword [0x8168e0], edx
je 0x500a6f
mov eax, dword [0x7cf900]
mov ecx, dword [eax]
push edx
mov edx, dword [ecx + 0x164]
push eax
call edx
mov edi, dword [0x7cfac0]
mov eax, dword [0x7cfac8]
lea ecx, [eax + edi*2]
mov eax, dword [0x7cfacc]
add ecx, edi
mov edx, dword [ecx*4 + 0x6a2960]
mov ecx, dword [0x7cfac4]
mov dword [0x8168e0], edx
test edi, edi
je 0x500a8e
mov edx, 0x6cf538
call fcn.004ea160
mov eax, dword [0x7cfacc]
mov ecx, dword [0x7cfac4]
mov edi, dword [0x7cfac0]
cmp eax, 4
jne 0x500aa3
mov eax, 0x55555556
imul ecx
mov eax, edx
shr eax, 0x1f
add eax, edx
jmp 0x500ada
cmp eax, 2
jne 0x500ab1
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
jmp 0x500ada
cmp eax, 6
jne 0x500abb
lea eax, [ecx - 2]
jmp 0x500ada
cmp eax, 5
jne 0x500ac5
lea eax, [ecx - 2]
jmp 0x500ada
cmp eax, 3
jne 0x500acf
lea eax, [ecx - 1]
jmp 0x500ada
sub eax, 1
neg eax
sbb eax, eax
not eax
and eax, ecx
mov ecx, dword [0x7cfac8]
mov edx, dword [0x7cf900]
lea ecx, [ecx + edi*2]
add ecx, edi
mov edi, dword [edx]
add ecx, ecx
mov ebp, dword [ecx + ecx + 0x6a2978]
add ecx, ecx
mov ecx, dword [ecx + 0x7cfaa8]
push ebp
push ecx
mov ecx, dword [edi + 0x14c]
push eax
mov eax, dword [0x7cfacc]
push eax
push edx
call ecx
cmp dword [0x7cfac0], 0
je 0x500b23
mov edx, 0x8e8170
call fcn.004ea160
mov ebp, dword [esp + 0x34]
mov edx, dword [0x7cfac8]
mov dword [0x7cfac4], 0
mov eax, dword [edx*4 + 0x7cfaa8]
mov dword [0x7cfaf4], eax
mov eax, dword [0x7cfaf4]
fild dword [esp + 0x24]
mov dword [0x7cfac0], 0
mov dword [0x7cfacc], 4
fstp dword [eax]
mov dword [eax + 0x10], esi
fild dword [esp + 0x28]
fstp dword [eax + 4]
mov ecx, dword [0x8e8034]
sub ecx, 0
je 0x500be2
sub ecx, 1
je 0x500bbe
sub ecx, 1
jne 0x500bfe
mov esi, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x30]
sub ecx, edx
sub ebp, esi
imul ebp, ecx
mov ecx, dword [esp + 0x38]
sub ebx, esi
sub ecx, edx
imul ebx, ecx
sub ebx, ebp
js 0x500be2
fild dword [esp + 0x34]
fstp dword [eax + 0x14]
fild dword [esp + 0x38]
fstp dword [eax + 0x18]
fild dword [esp + 0x2c]
fstp dword [eax + 0x28]
fild dword [esp + 0x30]
jmp 0x500bfb
mov esi, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x30]
sub ecx, edx
sub ebp, esi
imul ebp, ecx
mov ecx, dword [esp + 0x38]
sub ebx, esi
sub ecx, edx
imul ebx, ecx
sub ebx, ebp
test ebx, ebx
jle 0x500ba3
fild dword [esp + 0x2c]
fstp dword [eax + 0x14]
fild dword [esp + 0x30]
fstp dword [eax + 0x18]
fild dword [esp + 0x34]
fstp dword [eax + 0x28]
fild dword [esp + 0x38]
fstp dword [eax + 0x2c]
mov ecx, dword [esp + 0x10]
pop edi
pop esi
mov dword [eax + 0x30], ecx
mov dword [eax + 0x1c], ecx
mov dword [eax + 8], ecx
add dword [0x7cfaf4], 0x3c
add dword [0x7cfac4], 3
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret
cmp dword [0x8168b0], 0
jne 0x500c35
cmp dword [0x8168b4], 0
je 0x500c46
push 0
mov eax, 1
xor ecx, ecx
call fcn.004f5fe0
add esp, 4
mov edi, dword [0x7cfac0]
cmp edi, 1
mov ebx, dword [0x7cfacc]
mov eax, dword [0x7cfac8]
mov ecx, dword [0x7cfac4]
je 0x500c7c
cmp ebx, 2
jne 0x500c7c
lea edx, [eax + edi*2]
add edx, edi
lea ebp, [ecx + 6]
cmp ebp, dword [edx*4 + 0x6a2948]
jl 0x500da0
test ecx, ecx
je 0x500d84
lea eax, [eax + edi*2]
add eax, edi
mov edx, dword [eax*4 + 0x6a2960]
cmp dword [0x8168e0], edx
je 0x500cd2
mov eax, dword [0x7cf900]
mov ecx, dword [eax]
push edx
mov edx, dword [ecx + 0x164]
push eax
call edx
mov edi, dword [0x7cfac0]
mov eax, dword [0x7cfac8]
mov ebx, dword [0x7cfacc]
lea ecx, [eax + edi*2]
add ecx, edi
mov edx, dword [ecx*4 + 0x6a2960]
mov ecx, dword [0x7cfac4]
mov dword [0x8168e0], edx
test edi, edi
je 0x500cf2
mov edx, 0x6cf538
call fcn.004ea160
mov ebx, dword [0x7cfacc]
mov ecx, dword [0x7cfac4]
mov edi, dword [0x7cfac0]
cmp ebx, 4
jne 0x500d07
mov eax, 0x55555556
imul ecx
mov eax, edx
shr eax, 0x1f
add eax, edx
jmp 0x500d40
cmp ebx, 2
jne 0x500d15
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
jmp 0x500d40
cmp ebx, 6
jne 0x500d1f
lea eax, [ecx - 2]
jmp 0x500d40
cmp ebx, 5
jne 0x500d29
lea eax, [ecx - 2]
jmp 0x500d40
cmp ebx, 3
jne 0x500d33
lea eax, [ecx - 1]
jmp 0x500d40
mov eax, ebx
sub eax, 1
neg eax
sbb eax, eax
not eax
and eax, ecx
mov ecx, dword [0x7cfac8]
mov edx, dword [0x7cf900]
lea ecx, [ecx + edi*2]
add ecx, edi
mov edi, dword [edx]
add ecx, ecx
mov ebp, dword [ecx + ecx + 0x6a2978]
add ecx, ecx
mov ecx, dword [ecx + 0x7cfaa8]
push ebp
push ecx
push eax
push ebx
push edx
mov edx, dword [edi + 0x14c]
call edx
cmp dword [0x7cfac0], 0
je 0x500d84
mov edx, 0x8e8170
call fcn.004ea160
mov eax, dword [0x7cfac8]
mov dword [0x7cfac4], 0
mov ecx, dword [eax*4 + 0x7cfaa8]
mov dword [0x7cfaf4], ecx
mov eax, dword [0x7cfaf4]
fild dword [esp + 0x24]
mov dword [0x7cfac0], 0
mov dword [0x7cfacc], 2
fstp dword [esp + 0x1c]
mov ecx, dword [esp + 0x10]
fld dword [esp + 0x1c]
mov dword [eax + 0x74], esi
fst dword [eax]
mov dword [eax + 0x60], esi
fild dword [esp + 0x28]
mov dword [eax + 0x4c], esi
mov dword [eax + 0x38], esi
mov dword [eax + 0x24], esi
fstp dword [esp + 0x1c]
mov dword [eax + 0x10], esi
fld dword [esp + 0x1c]
pop edi
fst dword [eax + 4]
pop esi
fild dword [esp + 0x24]
mov dword [eax + 0x6c], ecx
mov dword [eax + 0x58], ecx
mov dword [eax + 0x44], ecx
fstp dword [esp + 0x14]
mov dword [eax + 0x30], ecx
fld dword [esp + 0x14]
mov dword [eax + 0x1c], ecx
fst dword [eax + 0x14]
mov dword [eax + 8], ecx
fild dword [esp + 0x28]
pop ebp
pop ebx
fstp dword [esp + 0xc]
fld dword [esp + 0xc]
fst dword [eax + 0x18]
fstp dword [eax + 0x2c]
fstp dword [eax + 0x28]
fild dword [esp + 0x24]
fstp dword [esp + 0xc]
fld dword [esp + 0xc]
fst dword [eax + 0x3c]
fild dword [esp + 0x28]
fstp dword [esp + 0xc]
fld dword [esp + 0xc]
fst dword [eax + 0x40]
fstp dword [eax + 0x54]
fstp dword [eax + 0x50]
fxch st(1)
fstp dword [eax + 0x64]
fstp dword [eax + 0x68]
add dword [0x7cfaf4], 0x78
add dword [0x7cfac4], 6
xor eax, eax
add esp, 0x10
ret