Function at 0x510010
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2054
call fcn.0054f750
mov eax, dword [0x62aabc]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
movsd xmm1, qword [0x5fb588]
mov dword [ebp - 0x202c], eax
mov eax, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 0xc]
push edi
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mov dword [ebp - 0x203c], esi
mov dword [ebp - 0x2010], eax
divsd xmm1, xmm0
movaps xmm0, xmm1
movsd qword [ebp - 0x2020], xmm1
call sub.api_ms_win_crt_math_l1_1_0.dll__libm_sse2_cos_precise
movsd qword [ebp - 0x204c], xmm0
movsd xmm0, qword [ebp - 0x2020]
call sub.api_ms_win_crt_math_l1_1_0.dll__libm_sse2_sin_precise
movsd qword [ebp - 0x2054], xmm0
movsd xmm0, qword [ebp - 0x2020]
mulsd xmm0, qword [0x5fa5e0]
movsd qword [ebp - 0x2020], xmm0
call sub.api_ms_win_crt_math_l1_1_0.dll__libm_sse2_cos_precise
movsd qword [ebp - 0x2038], xmm0
movsd xmm0, qword [ebp - 0x2020]
call sub.api_ms_win_crt_math_l1_1_0.dll__libm_sse2_sin_precise
mov eax, dword [ebp - 0x2010]
movaps xmm7, xmm0
movsd xmm6, qword [ebp - 0x2038]
mov edi, eax
sar edi, 2
mov edx, eax
sar edx, 1
movaps xmm4, xmm6
movsd qword [ebp - 0x2044], xmm7
movaps xmm5, xmm7
mov dword [ebp - 0x2024], edi
mov dword [ebp - 0x2028], 0
mov dword [ebp - 0x2030], edx
test edi, edi
jle 0x510242
lea ecx, [edi*8]
movsd xmm6, qword [ebp - 0x204c]
mov eax, esi
movsd xmm7, qword [ebp - 0x2054]
sub eax, ecx
mov dword [ebp - 0x2014], 0
mov dword [ebp - 0x201c], eax
add edx, edi
mov eax, dword [ebp - 0x2010]
sub eax, edi
shl edx, 3
lea eax, [esi + eax*8]
mov dword [ebp - 0x2018], eax
lea eax, [esi - 8]
add eax, ecx
mov dword [ebp - 0x2008], eax
mov eax, dword [ebp - 0x2010]
dec eax
add eax, edi
lea eax, [esi + eax*8]
mov dword [ebp - 0x200c], eax
mov eax, dword [ebp - 0x201c]
movsd xmm2, qword [esi + edx - 8]
movsd xmm3, qword [ecx + esi]
cmp dword [ebp - 0x2014], edi
jge 0x51018a
mov edi, dword [ebp - 0x2018]
addsd xmm2, qword [edi]
mov edi, dword [ebp - 0x2008]
subsd xmm3, qword [edi]
jmp 0x510198
mov edi, dword [ebp - 0x200c]
subsd xmm2, qword [eax]
addsd xmm3, qword [edi]
mov esi, dword [ebp - 0x2028]
movaps xmm1, xmm3
mov edi, dword [ebp - 0x2024]
movaps xmm0, xmm2
add dword [ebp - 0x2014], 2
add eax, 0x10
add dword [ebp - 0x2018], 0x10
add ecx, 0x10
sub dword [ebp - 0x2008], 0x10
sub edx, 0x10
sub dword [ebp - 0x200c], 0x10
mulsd xmm1, xmm5
mulsd xmm0, xmm4
mulsd xmm3, xmm4
mulsd xmm2, xmm5
addsd xmm1, xmm0
movaps xmm0, xmm5
mulsd xmm0, xmm7
subsd xmm3, xmm2
mulsd xmm5, xmm6
movsd qword [ebp + esi*8 - 0x2004], xmm1
movaps xmm1, xmm4
mulsd xmm4, xmm6
mulsd xmm1, xmm7
movsd qword [ebp + esi*8 - 0x1004], xmm3
inc esi
mov dword [ebp - 0x2028], esi
subsd xmm4, xmm0
cmp esi, edi
mov esi, dword [ebp - 0x203c]
addsd xmm5, xmm1
jl 0x510161
movsd xmm6, qword [ebp - 0x2038]
movsd xmm7, qword [ebp - 0x2044]
mov eax, dword [ebp - 0x2010]
cmp eax, 0x100
je 0x510254
cmp eax, 0x800
jne 0x510288
push 9
jmp 0x510256
push 6
lea eax, [ebp - 0x1004]
push eax
lea eax, [ebp - 0x2004]
push eax
push dword [ebp - 0x202c]
call fcn.005105b0
mov eax, dword [ebp - 0x2010]
add esp, 0x10
movsd xmm7, qword [ebp - 0x2044]
movsd xmm6, qword [ebp - 0x2038]
xor ecx, ecx
test edi, edi
jle 0x51036a
movsd xmm4, qword [0x619f20]
xor edx, edx
dec eax
mov dword [ebp - 0x200c], esi
lea eax, [esi + eax*8]
mov dword [ebp - 0x2008], eax
mov eax, esi
nop
movsd xmm1, qword [ebp + ecx*8 - 0x2004]
movsd xmm3, qword [ebp + ecx*8 - 0x1004]
movaps xmm2, xmm1
movaps xmm0, xmm3
mulsd xmm2, xmm6
inc ecx
mulsd xmm0, xmm7
mulsd xmm3, xmm6
mulsd xmm1, xmm7
addsd xmm2, xmm0
subsd xmm3, xmm1
movaps xmm1, xmm6
mulsd xmm6, qword [ebp - 0x204c]
addsd xmm2, xmm2
mulsd xmm1, qword [ebp - 0x2054]
addsd xmm3, xmm3
movaps xmm0, xmm2
xorps xmm0, xmm4
movsd qword [eax], xmm0
movaps xmm0, xmm7
mov eax, dword [ebp - 0x2030]
mulsd xmm0, qword [ebp - 0x2054]
sub eax, edx
mulsd xmm7, qword [ebp - 0x204c]
movsd qword [esi + eax*8 - 8], xmm3
xorps xmm3, xmm4
mov eax, dword [ebp - 0x2030]
subsd xmm6, xmm0
add eax, edx
add edx, 2
addsd xmm7, xmm1
movsd qword [esi + eax*8], xmm3
mov eax, dword [ebp - 0x2008]
sub dword [ebp - 0x2008], 0x10
movsd qword [eax], xmm2
mov eax, dword [ebp - 0x200c]
add eax, 0x10
mov dword [ebp - 0x200c], eax
cmp ecx, edi
jl 0x5102b0
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.0054f742
mov esp, ebp
pop ebp
ret