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

Disassembly:
mov eax, 0x4c
call fcn.004dd690
mov eax, dword [0x60aca0]
xor eax, esp
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x54]
xor edx, edx
movsd xmm3, qword [esp + 0x60]
mov ecx, 6
mov dword [esp + 0x14], eax
xorps xmm0, xmm0
mov eax, dword [esp + 0x58]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x5c]
push esi
mov dword [esp + 0x20], eax
xor esi, esi
mov eax, dword [esp + 0x70]
test eax, eax
push edi
mov edi, dword [esp + 0x58]
cmovs eax, ecx
comisd xmm0, xmm3
mov ecx, dword [esp + 0x78]
mov dword [esp + 8], edi
jbe 0x52176d
xorps xmm3, xmmword [0x5f7790]
mov dword [esp + 0xc], 0x2d
jmp 0x52178b
test cl, 2
je 0x52177c
mov dword [esp + 0xc], 0x2b
jmp 0x52178b
test cl, 4
mov ecx, 0x20
cmovne edx, ecx
mov dword [esp + 0xc], edx
movsd xmm2, qword [0x5f74a8]
mov edx, 9
movsd xmm4, qword [0x5f7548]
cmp eax, edx
cvttsd2si ecx, xmm3
cmovg eax, edx
mov dword [esp + 0x74], eax
movaps xmm1, xmm2
mov dword [esp + 0x10], ecx
cmp eax, esi
je 0x5217c9
nop dword [eax + eax]
mulsd xmm1, xmm4
sub eax, 1
jne 0x5217c0
movsd xmm5, qword [0x5f7478]
cvttsd2si edx, xmm1
movd xmm0, edx
cvtdq2pd xmm0, xmm0
subsd xmm1, xmm0
comisd xmm1, xmm5
jb 0x5217e8
inc edx
mov eax, dword [esp + 0x74]
cmp eax, esi
je 0x5217f9
mulsd xmm2, xmm4
sub eax, 1
jne 0x5217f0
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
subsd xmm3, xmm0
mulsd xmm3, xmm2
cvttsd2si eax, xmm3
mov dword [esp + 0x18], eax
movd xmm0, eax
cvtdq2pd xmm0, xmm0
subsd xmm3, xmm0
comisd xmm3, xmm5
jb 0x521828
inc eax
mov dword [esp + 0x18], eax
cmp eax, edx
jl 0x521837
inc ecx
sub eax, edx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x18], eax
mov esi, dword [esp + 0x10]
xor edi, edi
nop dword [eax]
mov eax, 0x66666667
imul esi
sar edx, 2
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
lea eax, [ecx + ecx*4]
add eax, eax
sub esi, eax
mov al, byte [esi + str.0123456789]
mov esi, ecx
mov byte [esp + edi + 0x3c], al
inc edi
test esi, esi
je 0x52186e
cmp edi, 0x14
jl 0x521840
mov dword [esp + 0x14], edi
mov esi, 0
cmp edi, 0x14
jne 0x521887
mov eax, 0x13
mov dword [esp + 0x14], eax
jmp 0x521894
mov eax, dword [esp + 0x14]
cmp eax, 0x14
jae 0x521abd
mov edi, dword [esp + 0x18]
mov byte [esp + eax + 0x3c], 0
nop dword [eax]
mov eax, 0x66666667
imul edi
sar edx, 2
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov edx, dword [esp + 0x74]
lea eax, [ecx + ecx*4]
add eax, eax
sub edi, eax
mov al, byte [edi + str.0123456789]
mov edi, ecx
mov byte [esp + esi + 0x28], al
inc esi
cmp esi, edx
jl 0x5218a0
mov edi, dword [esp + 8]
mov dword [esp + 0x18], esi
cmp esi, 0x14
jne 0x5218e5
mov esi, 0x13
mov dword [esp + 0x18], esi
jmp 0x5218eb
jae 0x521abd
mov ecx, dword [esp + 0xc]
xor eax, eax
mov byte [esp + esi + 0x28], 0
test ecx, ecx
mov esi, dword [esp + 0x70]
setne al
sub esi, eax
mov eax, edx
sub esi, dword [esp + 0x14]
sub esi, edx
sub eax, dword [esp + 0x18]
mov edx, 0
cmovs eax, edx
mov dword [esp + 0x10], eax
xor eax, eax
sub esi, 1
cmovs esi, eax
mov eax, dword [esp + 0x78]
mov dword [esp + 0x70], esi
test al, 1
je 0x521933
neg esi
mov dword [esp + 0x70], esi
test al, 0x10
je 0x521982
test esi, esi
jle 0x5219a6
test ecx, ecx
je 0x521960
push ecx
push dword [esp + 0x28]
push dword [esp + 0x28]
push dword [esp + 0x28]
push edi
call fcn.00521650
dec esi
add esp, 0x14
xor eax, eax
mov dword [esp + 0x70], esi
mov dword [esp + 0xc], eax
test esi, esi
jle 0x5219a6
push 0x30
push dword [esp + 0x28]
push dword [esp + 0x28]
push dword [esp + 0x28]
push edi
call fcn.00521650
dec esi
add esp, 0x14
test esi, esi
jg 0x521964
jmp 0x5219a2
test esi, esi
jle 0x5219a6
push 0x20
push dword [esp + 0x28]
push dword [esp + 0x28]
push dword [esp + 0x28]
push edi
call fcn.00521650
dec esi
add esp, 0x14
test esi, esi
jg 0x521986
mov dword [esp + 0x70], esi
mov eax, dword [esp + 0xc]
test eax, eax
je 0x5219c4
push eax
push dword [esp + 0x28]
push dword [esp + 0x28]
push dword [esp + 0x28]
push edi
call fcn.00521650
add esp, 0x14
mov eax, dword [esp + 0x14]
test eax, eax
jle 0x5219f9
mov esi, dword [esp + 0x1c]
dec eax
mov dword [esp + 0x14], eax
movsx eax, byte [esp + eax + 0x3c]
push eax
push dword [esp + 0x28]
push dword [esp + 0x28]
push esi
push edi
call fcn.00521650
mov eax, dword [esp + 0x28]
add esp, 0x14
test eax, eax
jg 0x5219d0
mov esi, dword [esp + 0x70]
cmp dword [esp + 0x74], 0
jg 0x521a07
test byte [esp + 0x78], 8
je 0x521a59
push 0x2e
push dword [esp + 0x28]
push dword [esp + 0x28]
push dword [esp + 0x28]
push edi
call fcn.00521650
mov eax, dword [esp + 0x2c]
add esp, 0x14
test eax, eax
jle 0x521a59
mov esi, dword [esp + 0x1c]
nop word [eax + eax]
dec eax
mov dword [esp + 0x18], eax
movsx eax, byte [esp + eax + 0x28]
push eax
push dword [esp + 0x28]
push dword [esp + 0x28]
push esi
push edi
call fcn.00521650
mov eax, dword [esp + 0x2c]
add esp, 0x14
test eax, eax
jg 0x521a30
mov esi, dword [esp + 0x70]
cmp dword [esp + 0x10], 0
jle 0x521a89
mov esi, dword [esp + 0x1c]
push 0x30
push dword [esp + 0x28]
push dword [esp + 0x28]
push esi
push edi
call fcn.00521650
mov eax, dword [esp + 0x24]
add esp, 0x14
dec eax
mov dword [esp + 0x10], eax
test eax, eax
jg 0x521a64
mov esi, dword [esp + 0x70]
test esi, esi
jns 0x521aac
neg esi
nop
push 0x20
push dword [esp + 0x28]
push dword [esp + 0x28]
push dword [esp + 0x28]
push edi
call fcn.00521650
add esp, 0x14
sub esi, 1
jne 0x521a90
mov ecx, dword [esp + 0x50]
pop edi
pop esi
xor ecx, esp
call fcn.004dcc5c
add esp, 0x4c
ret
call fcn.004dd0ee
int3