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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
sub esp, 0x74
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi + 8]
push 0x10
push eax
mov esi, ecx
call fcn.00497310
xor ecx, ecx
add esp, 8
cmp dword [edi + 8], ecx
mov ebx, eax
mov dword [esp + 0x38], ecx
jle 0x503030
fld qword [0x5c6ab0]
mov edx, dword [ebp + 0xc]
fld qword [0x5c6ab8]
jmp 0x502fa3
fxch st(1)
mov eax, dword [edi]
fld qword [eax + ecx]
add eax, ecx
fld qword [eax + 8]
fld qword [edx]
fmul st(2)
fld qword [edx + 0x10]
fmul st(2)
faddp st(1)
fadd qword [edx + 0x20]
fstp qword [ecx + ebx]
fld qword [edx + 8]
fmulp st(2)
fmul qword [edx + 0x18]
faddp st(1)
fadd qword [edx + 0x28]
fstp qword [ecx + ebx + 8]
fxch st(1)
fcom qword [ecx + ebx]
fnstsw ax
test ah, 5
jp 0x502fe0
fst qword [ecx + ebx]
jmp 0x502ff1
fxch st(1)
fcom qword [ecx + ebx]
fnstsw ax
test ah, 0x41
jne 0x502fef
fst qword [ecx + ebx]
fxch st(1)
fcom qword [ecx + ebx + 8]
fnstsw ax
test ah, 5
jp 0x503002
fst qword [ecx + ebx + 8]
jmp 0x503015
fxch st(1)
fcom qword [ecx + ebx + 8]
fnstsw ax
test ah, 0x41
jne 0x503013
fst qword [ecx + ebx + 8]
fxch st(1)
mov eax, dword [esp + 0x38]
inc eax
add ecx, 0x10
cmp eax, dword [edi + 8]
mov dword [esp + 0x38], eax
jl 0x502fa1
fstp st(0)
xor ecx, ecx
fstp st(0)
mov eax, dword [edi + 0x14]
cmp eax, ecx
je 0x503050
mov ecx, dword [ebp + 0x20]
mov edx, dword [edi + 0x18]
push ecx
push edx
push eax
push ebx
mov ecx, esi
call fcn.005023f0
mov dword [esp + 0x50], eax
xor ecx, ecx
jmp 0x503054
mov dword [esp + 0x50], ecx
fldz
xor edx, edx
fst qword [esp + 0x68]
mov dword [esi], ecx
fst qword [esp + 0x60]
mov dword [esi + 8], ecx
fld st(0)
mov dword [esi + 4], ecx
cmp dword [edi + 8], ecx
fst qword [esp + 0x40]
fxch st(1)
mov dword [esp + 0x54], ecx
fst qword [esp + 0x58]
mov dword [esp + 0x38], edx
jle 0x50344e
lea eax, [ebx + 0x20]
mov dword [esp + 0x4c], ecx
xor edi, edi
mov dword [esp + 0x3c], eax
jmp 0x503096
fxch st(1)
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 4]
lea ecx, [edx + eax]
mov al, byte [ecx]
test al, 1
je 0x503199
fstp st(0)
inc edx
fstp st(0)
mov dword [esp + 0x4c], edi
fld qword [edi + ebx]
add edi, 0x10
add dword [esp + 0x3c], 0x10
fst qword [esp + 0x58]
fld qword [edi + ebx - 8]
mov dword [esp + 0x38], edx
fst qword [esp + 0x40]
fst qword [esp + 0x68]
fxch st(1)
fst qword [esp + 0x60]
fxch st(1)
mov ecx, dword [ebp + 8]
cmp edx, dword [ecx + 8]
jl 0x503094
fstp st(1)
push ebx
fstp st(0)
call fcn.00497230
add esp, 4
mov ecx, esi
call fcn.00502a00
fldz
cmp dword [esi + 4], 4
fst qword [esi + 0x38]
fst qword [esi + 0x30]
mov dword [esi + 0x1c], 0
fst qword [esi + 0x28]
fstp qword [esi + 0x20]
jne 0x503554
mov edx, dword [esi]
push 0x502360
push 0x58
push 4
push edx
call dword [sym.imp.MSVCR90.dll_qsort]
mov ecx, dword [esi]
fld qword [ecx + 0x18]
add esp, 0x10
fcomp qword [ecx + 8]
fnstsw ax
test ah, 0x44
jp 0x503455
fld qword [ecx + 0x68]
fcomp qword [ecx + 0x58]
fnstsw ax
test ah, 0x44
jp 0x503455
fld qword [ecx + 0xc0]
fcomp qword [ecx + 0xb0]
fnstsw ax
test ah, 0x44
jp 0x503455
fld qword [ecx + 0x120]
fcomp qword [ecx + 0x110]
fnstsw ax
test ah, 0x44
jp 0x503455
mov dword [esi + 0x1c], 1
fld qword [ecx + 0x58]
fstp qword [esi + 0x20]
fld qword [ecx + 0xb0]
fstp qword [esi + 0x30]
fld qword [ecx + 8]
jmp 0x503505
fld qword [edi + ebx]
test al, 8
je 0x50327d
fld qword [edi + ebx + 8]
mov edx, dword [esp + 0x3c]
fld qword [edi + ebx + 0x10]
fld qword [edi + ebx + 0x18]
fstp qword [esp + 0x58]
fld qword [edx]
mov edx, dword [ebp + 0x18]
fst qword [esp + 0x70]
fld qword [edi + ebx + 0x28]
fst qword [esp + 0x78]
test edx, edx
jne 0x5031e2
mov al, byte [ecx + 2]
test al, 2
je 0x5031e2
test al, 4
jne 0x5031e2
mov dword [esp + 0x40], 1
jmp 0x5031ee
mov dword [esp + 0x40], 0
test edx, edx
jne 0x503202
mov cl, byte [ecx - 1]
test cl, 1
je 0x503202
test cl, 4
jne 0x503202
mov ecx, 1
jmp 0x503204
xor ecx, ecx
mov eax, dword [ebp + 8]
fld qword [ebp + 0x10]
mov edx, dword [eax + 4]
mov eax, dword [esp + 0x38]
add eax, edx
mov edx, dword [esp + 0x40]
push edx
movzx edx, byte [eax - 1]
push ecx
movzx ecx, byte [eax + 2]
and ecx, 2
push ecx
and edx, 1
push edx
sub esp, 0x48
mov ecx, esi
fstp qword [esp + 0x40]
fstp qword [esp + 0x38]
fstp qword [esp + 0x30]
fld qword [esp + 0xb0]
fstp qword [esp + 0x28]
fstp qword [esp + 0x20]
fstp qword [esp + 0x18]
fstp qword [esp + 0x10]
fxch st(1)
fstp qword [esp + 8]
fstp qword [esp]
call fcn.00502c60
fld qword [esp + 0x70]
add dword [esp + 0x38], 3
fst qword [esp + 0x58]
add edi, 0x30
fld qword [esp + 0x78]
add dword [esp + 0x3c], 0x30
jmp 0x503341
mov eax, dword [esi + 4]
fst qword [esp + 0x70]
fld qword [edi + ebx + 8]
lea ecx, [eax + 1]
mov eax, dword [esi + 8]
fst qword [esp + 0x78]
cmp ecx, eax
jle 0x5032ee
fstp st(2)
fstp st(2)
fstp st(1)
fstp st(0)
test eax, eax
jne 0x5032a9
mov dword [esi + 8], 0x20
cmp dword [esi + 8], ecx
jge 0x5032c0
mov edi, edi
mov eax, dword [esi + 8]
add eax, eax
mov dword [esi + 8], eax
mov ecx, dword [esi + 4]
inc ecx
cmp eax, ecx
jl 0x5032b0
mov edx, dword [esi + 8]
mov eax, dword [esi]
push 0x58
push edx
push eax
call fcn.00497350
fld qword [esp + 0x84]
fld qword [esp + 0x7c]
add esp, 0xc
fld qword [esp + 0x58]
mov dword [esi], eax
fld qword [esp + 0x40]
fxch st(3)
fxch st(1)
fxch st(2)
fxch st(1)
mov ecx, dword [esi + 4]
fxch st(2)
mov edx, dword [esi]
imul ecx, ecx, 0x58
add edi, 0x10
fstp qword [ecx + edx]
mov eax, dword [esi + 4]
mov ecx, dword [esi]
imul eax, eax, 0x58
fxch st(2)
fstp qword [eax + ecx + 8]
mov edx, dword [esi + 4]
mov eax, dword [esi]
imul edx, edx, 0x58
fxch st(1)
fst qword [edx + eax + 0x10]
mov ecx, dword [esi + 4]
mov edx, dword [esi]
imul ecx, ecx, 0x58
fxch st(1)
mov eax, 1
add dword [esp + 0x38], eax
fst qword [ecx + edx + 0x18]
add dword [esi + 4], eax
fxch st(1)
add dword [esp + 0x3c], 0x10
fst qword [esp + 0x58]
fxch st(1)
mov eax, dword [ebp + 8]
fst qword [esp + 0x40]
mov ecx, dword [eax + 4]
mov edx, dword [esp + 0x38]
test byte [edx + ecx - 1], 2
je 0x5030d9
cmp dword [ebp + 0x18], 0
je 0x503419
mov ecx, dword [esp + 0x4c]
fld qword [ecx + ebx]
fcomp qword [edi + ebx - 0x10]
fnstsw ax
test ah, 0x44
jp 0x503389
fld qword [ecx + ebx + 8]
fcomp qword [edi + ebx - 8]
fnstsw ax
test ah, 0x44
jnp 0x503419
mov eax, dword [esi + 4]
lea ecx, [eax + 1]
mov eax, dword [esi + 8]
cmp ecx, eax
jle 0x5033db
fstp st(1)
fstp st(0)
test eax, eax
jne 0x5033a5
mov dword [esi + 8], 0x20
cmp dword [esi + 8], ecx
jge 0x5033c0
lea ebx, [ebx]
mov edx, dword [esi + 8]
add edx, edx
mov dword [esi + 8], edx
mov eax, dword [esi + 4]
inc eax
cmp edx, eax
jl 0x5033b0
mov ecx, dword [esi + 8]
mov edx, dword [esi]
push 0x58
push ecx
push edx
call fcn.00497350
fld qword [esp + 0x64]
fld qword [esp + 0x4c]
add esp, 0xc
mov dword [esi], eax
mov eax, dword [esi + 4]
fxch st(1)
mov ecx, dword [esi]
imul eax, eax, 0x58
fst qword [eax + ecx]
mov edx, dword [esi + 4]
mov eax, dword [esi]
imul edx, edx, 0x58
fxch st(1)
fst qword [edx + eax + 8]
mov ecx, dword [esi + 4]
mov edx, dword [esi]
fld qword [esp + 0x60]
imul ecx, ecx, 0x58
fstp qword [ecx + edx + 0x10]
mov eax, dword [esi + 4]
mov ecx, dword [esi]
fld qword [esp + 0x68]
imul eax, eax, 0x58
fstp qword [eax + ecx + 0x18]
inc dword [esi + 4]
cmp dword [ebp + 0x1c], 0
je 0x50343e
cmp dword [esp + 0x50], 0
jne 0x50343e
mov edx, dword [esp + 0x54]
fstp st(1)
push edx
fstp st(0)
mov ecx, esi
call fcn.00502790
fld qword [esp + 0x58]
fld qword [esp + 0x40]
mov eax, dword [esi + 4]
mov edx, dword [esp + 0x38]
mov dword [esp + 0x54], eax
jmp 0x5030d9
fstp st(0)
jmp 0x5030e3
fld qword [ecx + 0x10]
fcomp qword [ecx]
fnstsw ax
test ah, 0x44
jp 0x5034ae
fld qword [ecx + 0x70]
fcomp qword [ecx + 0x60]
fnstsw ax
test ah, 0x44
jp 0x5034ae
fld qword [ecx + 0xc0]
fcomp qword [ecx + 0xb0]
fnstsw ax
test ah, 0x44
jp 0x5034ae
fld qword [ecx + 0x120]
fcomp qword [ecx + 0x110]
fnstsw ax
test ah, 0x44
jp 0x5034ae
mov dword [esi + 0x1c], 1
fld qword [ecx]
fstp qword [esi + 0x20]
fld qword [ecx + 0xb0]
fstp qword [esi + 0x30]
fld qword [ecx + 0x60]
jmp 0x503505
fld qword [ecx + 0x10]
fcomp qword [ecx]
fnstsw ax
test ah, 0x44
jp 0x503511
fld qword [ecx + 0x68]
fcomp qword [ecx + 0x58]
fnstsw ax
test ah, 0x44
jp 0x503511
fld qword [ecx + 0xc8]
fcomp qword [ecx + 0xb8]
fnstsw ax
test ah, 0x44
jp 0x503511
fld qword [ecx + 0x120]
fcomp qword [ecx + 0x110]
fnstsw ax
test ah, 0x44
jp 0x503511
mov dword [esi + 0x1c], 1
fld qword [ecx]
fstp qword [esi + 0x20]
fld qword [ecx + 0x58]
fstp qword [esi + 0x30]
fld qword [ecx + 0xb8]
fstp qword [esi + 0x28]
fld qword [ecx + 0x110]
fstp qword [esi + 0x38]
cmp dword [esi + 0x1c], 0
je 0x503554
fld qword [esi + 0x30]
fcomp qword [esi + 0x20]
fnstsw ax
test ah, 5
jp 0x503530
fld qword [esi + 0x20]
fld qword [esi + 0x30]
fstp qword [esi + 0x20]
fstp qword [esi + 0x30]
fld qword [esi + 0x38]
fcomp qword [esi + 0x28]
fnstsw ax
test ah, 5
mov eax, esi
jp 0x503556
fld qword [esi + 0x28]
fld qword [esi + 0x38]
fstp qword [esi + 0x28]
fstp qword [esi + 0x38]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c