Function at 0x52fb20
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5e7dd3
mov eax, dword fs:[0]
push eax
sub esp, 0x78
mov eax, dword [0x638190]
xor eax, esp
mov dword [esp + 0x70], eax
push ebx
push esi
push edi
mov eax, dword [0x638190]
xor eax, esp
push eax
lea eax, [esp + 0x88]
mov dword fs:[0], eax
mov edi, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
mov ebx, dword [ebp + 0x14]
lea edx, [edi + edi*2 + 6]
add edx, edx
add edx, edx
add edx, edx
push edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x30], ecx
mov dword [esp + 0x4c], ebx
call dword [sym.imp.MSVCR90.dll_malloc]
mov esi, eax
add esp, 4
lea eax, [esp + 0x34]
push eax
mov ecx, ebx
mov dword [esp + 0x34], esi
call fcn.004f2ea0
fld qword [eax]
lea ecx, [ebx + 4]
fstp qword [esp + 0x4c]
fld qword [eax + 8]
push ecx
mov ecx, esi
fstp qword [esp + 0x58]
call fcn.00508610
lea edx, [ebx + 0xc]
lea eax, [edi + edi*2 + 3]
push edx
lea ecx, [esi + eax*8]
call fcn.00508610
lea ecx, [esp + 0x34]
push ecx
mov ecx, ebx
call fcn.004f1bd0
fld qword [eax]
mov dx, word [ebx + 0x20]
fstp qword [esp + 0x34]
and dx, 0xfff9
cmp edi, 1
movzx eax, dx
mov dword [esp + 0x1c], eax
jl 0x52fcc8
mov ecx, dword [esp + 0x18]
lea ebx, [esi + 0x28]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x20], edi
mov ecx, dword [esp + 0x14]
push esi
call fcn.00591190
lea ecx, [ebx - 0x10]
test eax, eax
je 0x52fc19
push esi
call fcn.004f7030
fldz
fstp qword [ebx]
jmp 0x52fcb5
mov edx, dword [esp + 0x14]
push edx
call fcn.004f7030
mov eax, dword [esp + 0x14]
mov edx, dword [eax + 4]
mov ecx, dword [eax]
mov dword [esp + 0x44], edx
fild dword [esp + 0x44]
mov dword [esp + 0x24], ecx
fsub qword [esp + 0x54]
fild dword [esp + 0x24]
fsub qword [esp + 0x4c]
fldz
fld st(0)
fucomp st(2)
fnstsw ax
test ah, 0x44
jp 0x52fc7f
fstp st(1)
fld st(0)
fucomp st(2)
fnstsw ax
test ah, 0x44
jp 0x52fc64
fstp st(1)
fld st(0)
jmp 0x52fc8a
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 5
jp 0x52fc77
fld qword [0x5f3de8]
jmp 0x52fc8a
fld qword [0x5f3de0]
jmp 0x52fc8a
fstp st(0)
call sub.MSVCR90.dll__CIatan2
fldz
fxch st(1)
cmp word [esp + 0x1c], 1
jne 0x52fc98
fsubr qword [esp + 0x34]
jmp 0x52fc9c
fsub qword [esp + 0x34]
fst qword [ebx]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 5
jp 0x52fcb3
fadd qword [0x601f78]
fstp qword [ebx]
jmp 0x52fcb5
fstp st(0)
add dword [esp + 0x14], 0x10
add ebx, 0x18
sub dword [esp + 0x20], 1
jne 0x52fbf9
push 0x52f410
push 0x18
lea eax, [esi + 0x18]
push edi
push eax
mov dword [esp + 0x2c], eax
call dword [sym.imp.MSVCR90.dll_qsort]
lea eax, [edi + 1]
add esp, 0x10
xor ebx, ebx
test eax, eax
jle 0x52fdd8
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
mov dword [esp + 0x14], eax
lea ebx, [ebx]
mov ecx, dword [esp + 0x48]
push ecx
lea ecx, [esp + 0x60]
call fcn.004f3d50
mov edx, dword [esi - 0x18]
mov eax, dword [esi - 0x14]
lea ecx, [esp + 0x34]
push ecx
lea ecx, [esp + 0x60]
mov dword [esp + 0x94], 0
mov dword [esp + 0x38], edx
mov dword [esp + 0x3c], eax
call fcn.004f42e0
mov edx, dword [esi]
mov eax, dword [esi + 4]
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x60]
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], eax
call fcn.004f4410
push 0x24
call sub.MSVCR90.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 0x1c], eax
mov byte [esp + 0x90], 1
test eax, eax
je 0x52fd7c
lea edx, [esp + 0x5c]
push edx
mov ecx, eax
call fcn.004f3d50
mov dword [esp + 0x18], eax
jmp 0x52fd84
mov dword [esp + 0x18], 0
mov ecx, dword [esp + 0x2c]
mov eax, dword [ecx]
push eax
mov byte [esp + 0x94], 0
call fcn.005c2c20
cmp ebx, edi
mov ecx, dword [esp + 0x18]
mov dword [eax], ecx
jge 0x52fdac
mov ecx, dword [esp + 0x14]
push esi
call fcn.004f7030
lea ecx, [esp + 0x5c]
mov dword [esp + 0x90], 0xffffffff
call fcn.004f1b60
add dword [esp + 0x14], 0x10
inc ebx
lea eax, [edi + 1]
add esi, 0x18
cmp ebx, eax
jl 0x52fd00
mov esi, dword [esp + 0x30]
push esi
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
mov ecx, dword [esp + 0x88]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x70]
xor ecx, esp
call fcn.005c3bb6
mov esp, ebp
pop ebp
ret