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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
push 0xffffffffffffffff
push 0x5e7d9b
mov eax, dword fs:[0]
push eax
sub esp, 0xa8
push ebx
push esi
push edi
mov eax, dword [0x638190]
xor eax, esp
push eax
lea eax, [esp + 0xb8]
mov dword fs:[0], eax
mov esi, dword [ebp + 0xc]
lea edi, [esi + 2]
cmp dword [0x638f50], edi
jge 0x52f86d
mov eax, dword [0x638f4c]
test eax, eax
je 0x52f853
push eax
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
mov eax, edi
shl eax, 4
push eax
call dword [sym.imp.MSVCR90.dll_malloc]
add esp, 4
mov dword [0x638f4c], eax
mov dword [0x638f50], edi
mov edi, dword [ebp + 0x14]
lea ecx, [esp + 0x5c]
push ecx
mov ecx, edi
call fcn.004f2ea0
fld qword [eax]
mov edx, dword [edi + 4]
fstp qword [esp + 0x74]
fld qword [eax + 8]
mov eax, dword [0x638f4c]
mov dword [eax], edx
fstp qword [esp + 0x7c]
mov ecx, dword [edi + 8]
mov dword [eax + 4], ecx
mov ecx, dword [edi + 0xc]
mov ebx, esi
shl ebx, 4
mov dword [ebx + eax + 0x10], ecx
mov ecx, dword [edi + 0x10]
lea edx, [esp + 0x5c]
mov dword [ebx + eax + 0x14], ecx
push edx
mov ecx, edi
call fcn.004f1bd0
fld qword [eax]
mov ax, word [edi + 0x20]
fstp qword [esp + 0x54]
and ax, 0xfff9
cmp esi, 1
movzx ecx, ax
mov dword [esp + 0x40], ecx
jl 0x52fa05
mov edx, dword [ebp + 8]
mov dword [esp + 0x3c], esi
mov esi, dword [0x638f4c]
mov edi, 0x10
mov dword [esp + 0x38], edx
mov eax, dword [esp + 0x38]
push esi
push eax
call fcn.004fa8a0
add esp, 8
test eax, eax
je 0x52f91b
mov esi, dword [0x638f4c]
fldz
mov ecx, dword [esi]
mov dword [edi + esi], ecx
mov eax, dword [esi + 4]
mov dword [edi + esi + 4], eax
fstp qword [edi + esi + 8]
jmp 0x52f9f0
mov edx, dword [0x638f4c]
mov ecx, dword [esp + 0x38]
lea eax, [ebx + edx + 0x10]
push eax
push ecx
call fcn.004fa8a0
mov esi, dword [0x638f4c]
add esp, 8
test eax, eax
je 0x52f94a
mov edx, dword [ebx + esi + 0x10]
mov dword [edi + esi], edx
mov eax, dword [ebx + esi + 0x14]
jmp 0x52f956
mov eax, dword [esp + 0x38]
mov ecx, dword [eax]
mov dword [edi + esi], ecx
mov eax, dword [eax + 4]
mov dword [edi + esi + 4], eax
mov eax, dword [esp + 0x38]
mov edx, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp + 0x44], eax
fild dword [esp + 0x44]
mov dword [esp + 0x50], edx
fsub qword [esp + 0x7c]
fild dword [esp + 0x50]
fsub qword [esp + 0x74]
fldz
fld st(0)
fucomp st(2)
fnstsw ax
test ah, 0x44
jp 0x52f9b6
fstp st(1)
fld st(0)
fucomp st(2)
fnstsw ax
test ah, 0x44
jp 0x52f99b
fstp st(1)
fld st(0)
jmp 0x52f9c1
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 5
jp 0x52f9ae
fld qword [0x5f3de8]
jmp 0x52f9c1
fld qword [0x5f3de0]
jmp 0x52f9c1
fstp st(0)
call sub.MSVCR90.dll__CIatan2
fldz
fxch st(1)
cmp word [esp + 0x40], 1
jne 0x52f9cf
fsubr qword [esp + 0x54]
jmp 0x52f9d3
fsub qword [esp + 0x54]
fst qword [edi + esi + 8]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 5
jp 0x52f9ee
fadd qword [0x601f78]
fstp qword [edi + esi + 8]
jmp 0x52f9f0
fstp st(0)
add dword [esp + 0x38], 8
add edi, 0x10
sub dword [esp + 0x3c], 1
jne 0x52f8ec
jmp 0x52fa0b
mov esi, dword [0x638f4c]
mov edi, dword [ebp + 0xc]
push 0x52f3d0
push 0x10
push edi
add esi, 0x10
push esi
call dword [sym.imp.MSVCR90.dll_qsort]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ecx + 0x1c]
lea eax, [edi + 1]
add esp, 0x10
mov dword [esp + 0x3c], edx
test eax, eax
jle 0x52fb07
mov ebx, dword [ebp + 0x10]
xor esi, esi
mov dword [esp + 0x38], eax
mov eax, dword [0x638f4c]
mov ecx, dword [esi + eax]
mov edx, dword [esi + eax + 4]
mov dword [esp + 0x50], ecx
fild dword [esp + 0x50]
mov dword [esp + 0x50], edx
push 0x24
fsubr qword [esp + 0x78]
fstp qword [esp + 0x48]
fild dword [esp + 0x54]
fsubr qword [esp + 0x80]
fstp qword [esp + 0x58]
call sub.MSVCR90.dll_void____cdecl_operator_new_unsigned_int_
mov edi, eax
add esp, 4
mov dword [esp + 0x50], edi
mov dword [esp + 0xc0], 0
test edi, edi
je 0x52fae0
mov eax, dword [esp + 0x40]
fild dword [esp + 0x3c]
mov ecx, dword [esp + 0x3c]
mov edx, dword [0x638f4c]
push eax
push ecx
lea eax, [esi + edx + 0x10]
push eax
sub esp, 0x18
fstp qword [esp + 0x10]
lea ecx, [esp + 0x90]
fld qword [esp + 0x78]
fstp qword [esp + 8]
fld qword [esp + 0x68]
fstp qword [esp]
call fcn.004f0f80
mov ecx, dword [0x638f4c]
lea edx, [esi + ecx]
push eax
push edx
mov ecx, edi
call fcn.004f3630
mov edi, eax
jmp 0x52fae2
xor edi, edi
mov eax, dword [ebx]
push eax
mov ecx, ebx
mov dword [esp + 0xc4], 0xffffffff
call fcn.005c2c20
add esi, 0x10
sub dword [esp + 0x38], 1
mov dword [eax], edi
jne 0x52fa41
mov ecx, dword [esp + 0xb8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret