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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x68
mov eax, dword [0x5f3008]
xor eax, esp
mov dword [esp + 0x64], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x20], eax
push esi
mov esi, ecx
mov edx, dword [ebp + 0xc]
push edi
mov dword [esp + 8], edx
mov eax, dword [esi + 0x217f8]
add eax, dword [esi + 0x217e8]
mov ecx, dword [esi + 0x217e4]
mov edi, dword [esi + 0x217f0]
mov dword [esp + 0x14], eax
mov eax, dword [esi + 0x217fc]
add eax, dword [esi + 0x217ec]
sub edi, dword [esi + 0x21800]
mov dword [esp + 0xc], eax
mov eax, dword [esi + 0x217f4]
sub eax, dword [esi + 0x21804]
mov dword [esp + 0x24], eax
mov eax, dword [ecx + 0x88]
movups xmm0, xmmword [eax + 0x20c]
mov eax, dword [ecx + 0x8c]
xor ecx, ecx
mov dword [esp + 0x1c], ecx
movups xmmword [esp + 0x40], xmm0
movups xmm0, xmmword [eax + 0x20c]
mov eax, dword [esi + 0x48]
movups xmmword [esp + 0x30], xmm0
cmp byte [eax + 0x53c3], cl
jne 0x5205e9
cmp byte [esi + 0x21824], cl
jne 0x5205e9
mov ecx, dword [esi + 0x2181c]
cmp byte [esi + 0x21825], 0
je 0x5205fc
mov eax, dword [esi + 0x21820]
mov dword [esp + 0x1c], eax
mov eax, dword [esi + 0x2182c]
movsd xmm2, qword [0x5ea6a8]
mov eax, dword [eax + 0x28]
movups xmm0, xmmword [eax + 0x110]
mov eax, dword [esi + 0x217e4]
movups xmmword [eax + 0x28], xmm0
mov eax, dword [esi + 0x2182c]
movsd xmm0, qword [0x5ea530]
mov eax, dword [eax + 0x28]
mov dword [esp + 0x10], eax
movzx eax, word [eax + 0x98]
mov dword [esp + 0x18], eax
mov eax, dword [esi + 0x217f0]
sub eax, dword [esi + 0x2185c]
sub eax, dword [esi + 0x217e8]
sub eax, dword [esp + 0x38]
sub eax, ecx
sub eax, 0xa
cmp word [esp + 0x18], 0
movd xmm1, eax
cvtdq2pd xmm1, xmm1
jne 0x5206f4
mov edx, dword [esi + 0x217e4]
xorps xmm4, xmm4
mov ecx, edx
movsd xmm3, qword [edx + 0x60]
divsd xmm1, qword [ecx + 0x38]
mulsd xmm1, xmm3
divsd xmm1, qword [ecx + 0x28]
mulsd xmm1, xmm2
comisd xmm1, xmm4
jb 0x52069b
addsd xmm1, xmm0
jmp 0x52069f
subsd xmm1, xmm0
mov edx, dword [esp + 0x1c]
cvttsd2si eax, xmm1
add edx, 0xfffffff6
movd xmm5, eax
mov eax, dword [esi + 0x217f4]
sub eax, dword [esi + 0x21860]
sub eax, dword [esp + 0x4c]
sub eax, dword [esi + 0x217ec]
add eax, edx
cvtdq2pd xmm5, xmm5
movd xmm1, eax
cvtdq2pd xmm1, xmm1
divsd xmm5, xmm2
divsd xmm1, qword [ecx + 0x40]
mulsd xmm1, xmm3
divsd xmm1, qword [ecx + 0x30]
mulsd xmm1, xmm2
comisd xmm1, xmm4
jb 0x52076c
addsd xmm1, xmm0
jmp 0x520770
mov ecx, dword [esi + 0x217e4]
xorps xmm3, xmm3
divsd xmm1, qword [ecx + 0x38]
divsd xmm1, qword [ecx + 0x28]
mulsd xmm1, xmm2
comisd xmm1, xmm3
jb 0x520717
addsd xmm1, xmm0
jmp 0x52071b
subsd xmm1, xmm0
mov edx, dword [esp + 0x1c]
cvttsd2si eax, xmm1
add edx, 0xfffffff6
movd xmm5, eax
mov eax, dword [esi + 0x217f4]
sub eax, dword [esi + 0x21860]
sub eax, dword [esp + 0x4c]
sub eax, dword [esi + 0x217ec]
add eax, edx
cvtdq2pd xmm5, xmm5
movd xmm1, eax
cvtdq2pd xmm1, xmm1
divsd xmm5, xmm2
divsd xmm1, qword [ecx + 0x40]
divsd xmm1, qword [ecx + 0x30]
mulsd xmm1, xmm2
comisd xmm1, xmm3
jb 0x52076c
addsd xmm1, xmm0
jmp 0x520770
subsd xmm1, xmm0
mov edx, dword [esp + 8]
cvttsd2si eax, xmm1
movd xmm1, eax
mov eax, dword [esp + 0x10]
cvtdq2pd xmm1, xmm1
movsx ecx, word [eax + 0x5e]
divsd xmm1, xmm2
movsd xmm2, qword [eax + 0x70]
mov eax, ecx
sub eax, 1
mov eax, dword [esp + 0x10]
jne 0x5207a7
cmp word [eax + 0x5c], 1
je 0x5207a7
mulsd xmm2, xmm0
comisd xmm2, xmm1
ja 0x5207ee
movsd xmm1, qword [eax + 0x68]
sub ecx, 1
je 0x5207c1
sub ecx, 1
je 0x5207c8
sub ecx, 1
jmp 0x5207c6
cmp word [eax + 0x5c], 1
jne 0x5207cc
mulsd xmm1, xmm0
comisd xmm1, xmm5
ja 0x5207ee
mov eax, dword [esp + 0x20]
mov ecx, dword [esi + 0x2182c]
mov eax, dword [eax + 4]
sub eax, dword [ecx + 0xc]
add eax, dword [esp + 0xc]
mov dword [edx + 4], eax
jmp 0x520926
mov ecx, dword [esi + 0x48]
mov eax, 0x378
movss xmm0, dword [esi + 0x3a0]
cmp word [ecx + 0x7570], ax
sete al
movzx eax, al
push eax
mov eax, dword [esp + 0x14]
push ecx
movss dword [esp], xmm0
push dword [esp + 0x30]
movzx eax, word [eax + 0x5a]
push eax
lea eax, [ecx + 0x4c28]
mov ecx, dword [esi + 0x21830]
push eax
lea eax, [esp + 0x6c]
push eax
lea eax, [esp + 0x6c]
push eax
lea eax, [esp + 0x78]
push eax
push dword [esi + 0x21834]
mov eax, dword [esp + 0x44]
push dword [esi + 0x21838]
push eax
push dword [esp + 0x44]
mov eax, dword [esi + 0x217e4]
push eax
mov eax, dword [esi + 0x2182c]
add eax, 8
push eax
push dword [esp + 0x64]
call fcn.00531c50
mov eax, dword [esp + 0x60]
cmp dword [esp + 0xc], eax
mov eax, dword [esp + 0x64]
mov edx, dword [esp + 0x5c]
mov ecx, dword [esp + 0x24]
jg 0x520898
cmp ecx, dword [esp + 0x68]
jl 0x520898
mov ecx, dword [esp + 0x14]
cmp ecx, edx
jg 0x5208ec
cmp edi, eax
jge 0x520926
jmp 0x5208e4
movsx eax, word [esp + 0x54]
sub eax, 0
je 0x5208cd
sub eax, 1
je 0x5208ad
sub ecx, dword [esp + 0x68]
jmp 0x5208d5
sub ecx, dword [esp + 0xc]
mov eax, ecx
mov ecx, dword [esp + 8]
cdq
sub eax, edx
mov edx, dword [esp + 0x5c]
sar eax, 1
sub eax, dword [esp + 0x60]
add eax, dword [esp + 0xc]
mov dword [ecx + 4], eax
jmp 0x5208dc
mov ecx, dword [esp + 0xc]
sub ecx, dword [esp + 0x60]
mov eax, dword [esp + 8]
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x64]
cmp ecx, edx
jg 0x5208ec
cmp edi, eax
jge 0x520926
movsx eax, word [esp + 0x58]
sub eax, 0
je 0x52091e
sub eax, 1
je 0x520907
mov eax, dword [esp + 8]
sub edi, dword [esp + 0x64]
mov dword [eax], edi
jmp 0x520926
sub edi, ecx
mov eax, edi
cdq
sub eax, edx
sar eax, 1
sub eax, dword [esp + 0x5c]
add eax, ecx
mov ecx, dword [esp + 8]
mov dword [ecx], eax
jmp 0x520926
mov eax, dword [esp + 8]
sub ecx, edx
mov dword [eax], ecx
mov eax, dword [esi + 8]
mov edx, dword [esi + 0x2182c]
mov ecx, dword [esi + 0x21830]
mov edi, dword [esi + 0x21834]
mov eax, dword [eax + 0x28]
cmp eax, dword [edx + 0x28]
mov dword [esi + 8], edx
setne al
test ecx, ecx
je 0x520955
mov dword [edx + 0x24], ecx
test edi, edi
je 0x520955
mov dword [ecx + 0x3c], edi
mov ecx, dword [esp + 0x6c]
pop edi
pop esi
xor ecx, esp
call fcn.0056060a
mov esp, ebp
pop ebp
ret 0x10