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

Disassembly:
sub esp, 0x58
push ebx
push ebp
push esi
push edi
mov ebx, eax
call fcn.00562de0
mov esi, dword [esp + 0x6c]
cmp esi, 4
mov dword [esp + 0x10], eax
mov edi, esi
jl 0x511eb9
call fcn.004daf30
mov ebp, dword [ebx + 0x18f4]
xor edx, edx
test ebp, ebp
mov dword [esp + 0x14], eax
jbe 0x512024
lea esi, [ebx + 0x18fc]
lea esp, [esp]
mov ecx, dword [esp + 0x6c]
mov eax, dword [esp + 0x14]
add ecx, 0xfffffffc
call fcn.004db620
cmp dword [esi], eax
je 0x511eb1
inc edx
add esi, 8
cmp edx, ebp
jb 0x511e90
jmp 0x512020
lea edi, [edx + 4]
jmp 0x512020
call fcn.004d7dd0
mov ecx, eax
mov eax, esi
call fcn.004d82e0
call fcn.004c7bc0
test eax, eax
je 0x512024
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x58]
mov eax, dword [eax + 0x74]
mov ecx, dword [eax + 0x20]
push 1
push 0
call fcn.0051a840
mov esi, eax
mov eax, dword [esi + 0x24]
cmp eax, 3
mov dword [0x6c83c8], eax
jne 0x512020
fld dword [esi + 0x70]
fchs
fstp dword [0x6c9150]
fld dword [esi + 0x74]
fchs
fstp dword [0x6c9154]
fld dword [esi + 0x78]
fchs
fstp dword [0x6c9158]
mov ecx, dword [esi + 0x70]
mov dword [0x6c915c], ecx
fld dword [esi + 0x74]
fchs
fstp dword [0x6c9160]
fld dword [esi + 0x78]
fchs
fstp dword [0x6c9164]
mov edx, dword [esi + 0x70]
mov dword [0x6c9168], edx
mov eax, dword [esi + 0x74]
mov dword [0x6c916c], eax
mov ecx, dword [esi + 0x78]
mov dword [0x6c9170], ecx
fld dword [esi + 0x70]
fchs
lea ecx, [esp + 0x28]
fstp dword [0x6c9174]
mov edx, dword [esi + 0x74]
mov dword [0x6c9178], edx
mov eax, dword [esi + 0x78]
mov dword [0x6c917c], eax
call fcn.0055fd80
lea ecx, [esi + 0x4c]
mov edx, dword [ecx]
mov eax, dword [ecx + 4]
mov ecx, dword [ecx + 8]
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], ecx
lea edx, [esi + 0x58]
mov eax, dword [edx]
mov ecx, dword [edx + 4]
mov edx, dword [edx + 8]
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], ecx
lea eax, [esi + 0x64]
mov ecx, dword [eax]
mov dword [esp + 0x48], ecx
mov dword [esp + 0x40], edx
mov edx, dword [eax + 4]
mov eax, dword [eax + 8]
mov dword [esp + 0x4c], edx
lea ecx, [esi + 8]
mov edx, dword [ecx]
mov dword [esp + 0x50], eax
mov eax, dword [ecx + 4]
mov ecx, dword [ecx + 8]
mov dword [esp + 0x58], edx
lea edx, [esp + 0x28]
mov dword [esp + 0x60], ecx
push edx
mov ecx, 0x6c9150
mov dword [esp + 0x60], eax
call fcn.00560c60
lea eax, [esp + 0x28]
push eax
mov ecx, 0x6c915c
call fcn.00560c60
lea ecx, [esp + 0x28]
push ecx
mov ecx, 0x6c9168
call fcn.00560c60
lea edx, [esp + 0x28]
push edx
mov ecx, 0x6c9174
call fcn.00560c60
fld dword [esi + 0x74]
fadd dword [esi + 0x70]
fsqrt
fstp dword [esp + 0x74]
mov esi, dword [esp + 0x6c]
mov eax, dword [ebx + 8]
xor ebp, ebp
test eax, eax
jbe 0x5120da
lea esi, [ebx + 0xc]
jmp 0x512040
mov ecx, dword [esi]
lea edx, [esp + 0x18]
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0x3f800000
mov eax, dword [ecx]
push edx
call dword [eax + 0x18]
fld dword [esp + 0x18]
mov ecx, dword [esp + 0x70]
fsub dword [ecx]
fld dword [esp + 0x1c]
fsub dword [ecx + 4]
fld dword [esp + 0x20]
fsub dword [ecx + 8]
fld dword [esp + 0x24]
fadd dword [esp + 0x74]
fld st(1)
fmul st(2)
fld st(3)
fmul st(4)
faddp st(1)
fld st(4)
fmul st(5)
faddp st(1)
fld st(1)
fmul st(2)
fcompp
fstp st(0)
fstp st(0)
fnstsw ax
fstp st(0)
test ah, 0x41
fstp st(0)
jne 0x5120c7
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x74]
push eax
push edx
push ecx
mov ecx, dword [esi]
mov eax, edi
mov edx, ebx
call fcn.00512320
mov eax, dword [ebx + 8]
inc ebp
add esi, 4
cmp ebp, eax
jb 0x512040
mov esi, dword [esp + 0x6c]
cmp esi, 4
jge 0x512141
mov eax, dword [ebx + esi*4 + 0x7dc]
xor edi, edi
test eax, eax
jbe 0x51218b
lea eax, [esi + esi*4]
shl eax, 4
lea ebp, [eax + ebx + 0x7ec]
lea ecx, [ecx]
mov ecx, dword [ebp]
mov eax, dword [ecx + 0x28]
test eax, eax
je 0x512110
test byte [eax + 0x1c], 1
jbe 0x512119
mov edx, dword [esp + 0x10]
cmp dword [ecx + 0x3c], edx
je 0x512124
mov esi, dword [esp + 0x6c]
mov eax, edi
call fcn.005121a0
mov eax, dword [esp + 0x6c]
mov ecx, dword [ebx + eax*4 + 0x7dc]
inc edi
add ebp, 4
cmp edi, ecx
jb 0x512100
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x58
ret 0xc
mov eax, dword [ebx + edi*4 + 0x91c]
sub edi, 4
xor esi, esi
test eax, eax
jbe 0x51218b
mov ecx, edi
imul ecx, ecx, 0x190
lea ebp, [ecx + ebx + 0x954]
mov eax, dword [ebp]
mov edx, dword [eax + 0x28]
test byte [edx + 0x1c], 1
jbe 0x512175
mov ecx, dword [esp + 0x10]
cmp dword [eax + 0x3c], ecx
je 0x51217c
mov eax, esi
call fcn.00512290
mov eax, dword [ebx + edi*4 + 0x92c]
inc esi
add ebp, 4
cmp esi, eax
jb 0x512160
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x58
ret 0xc