Function at 0x1800f5a10
Capabilities:
Encode data using xor

Disassembly:
mov rax, rsp
mov dword [rax + 0x10], edx
mov qword [rax + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xa8
movaps xmmword [rax - 0x58], xmm6
mov rbx, rcx
movaps xmmword [rax - 0x68], xmm7
movaps xmmword [rax - 0x78], xmm8
movsxd rdi, edx
movaps xmmword [rsp + 0x60], xmm9
mov eax, edi
cdq
movaps xmmword [rsp + 0x40], xmm11
and edx, 3
movaps xmmword [rsp + 0x30], xmm12
add eax, edx
sar eax, 2
movsxd r12, eax
mov rcx, r12
mov dword [rsp + 0x100], r12d
shl rcx, 2
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
lea edx, [r12 + rdi]
mov qword [rsp + 0x20], rax
movsxd rcx, edx
mov rsi, rax
shl rcx, 2
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
movd xmm12, edi
mov r15, rax
cvtdq2ps xmm12, xmm12
movaps xmm0, xmm12
call sub.api_ms_win_crt_math_l1_1_0.dll_logf
movaps xmm6, xmm0
movss xmm0, dword [0x18017cf48]
call sub.api_ms_win_crt_math_l1_1_0.dll_logf
divss xmm6, xmm0
addss xmm6, dword [0x18015dfb0]
movaps xmm0, xmm6
call sub.api_ms_win_crt_math_l1_1_0.dll_floorf
movsd xmm9, qword [0x18015d5e0]
mov r14, rdi
movsd xmm8, qword [0x180171db8]
movd xmm11, edi
mov dword [rbx], edi
mov qword [rbx + 8], r15
mov qword [rbx + 0x10], rsi
cvttss2si r13d, xmm0
cvtdq2pd xmm11, xmm11
mov dword [rbx + 4], r13d
mov ebx, 1
mov dword [rsp + 0x108], r13d
test r12d, r12d
jle 0x1800f5bf2
mov esi, dword [rsp + 0x100]
lea eax, [rdi + rdi]
movd xmm0, eax
xor edi, edi
movaps xmmword [rsp + 0x50], xmm10
xor r12d, r12d
cvtdq2pd xmm0, xmm0
mov rax, r14
mov r13d, ebx
sar rax, 1
movaps xmm7, xmm8
movaps xmm10, xmm8
lea rbp, [r15 + rax*4]
divsd xmm10, xmm0
divsd xmm7, xmm11
nop dword [rax + rax]
movd xmm6, r12d
cvtdq2pd xmm6, xmm6
mulsd xmm6, xmm7
movaps xmm0, xmm6
call sub.api_ms_win_crt_math_l1_1_0.dll_cos
xorps xmm1, xmm1
cvtsd2ss xmm1, xmm0
movaps xmm0, xmm6
movss dword [rdi + r15], xmm1
call sub.api_ms_win_crt_math_l1_1_0.dll_sin
xorps xmm0, xmm9
movd xmm6, r13d
cvtdq2pd xmm6, xmm6
cvtsd2ss xmm0, xmm0
mulsd xmm6, xmm10
movss dword [rdi + r15 + 4], xmm0
movaps xmm0, xmm6
call sub.api_ms_win_crt_math_l1_1_0.dll_cos
xorps xmm1, xmm1
cvtsd2ss xmm1, xmm0
movaps xmm0, xmm6
movss dword [rbp], xmm1
call sub.api_ms_win_crt_math_l1_1_0.dll_sin
xorps xmm1, xmm1
lea rbp, [rbp + 8]
cvtsd2ss xmm1, xmm0
add r12d, 4
lea rdi, [rdi + 8]
add r13d, 2
movss dword [rbp - 4], xmm1
sub rsi, rbx
jne 0x1800f5b50
movaps xmm10, xmmword [rsp + 0x50]
mov rsi, qword [rsp + 0x20]
mov edi, dword [rsp + 0xf8]
mov r13d, dword [rsp + 0x108]
mov eax, edi
cdq
and edx, 7
add eax, edx
sar eax, 3
mov r12d, eax
test eax, eax
jle 0x1800f5cbc
movsd xmm7, qword [0x180171d70]
lea rdi, [r15 + r14*4]
mov r14d, r12d
mov ebp, 2
divsd xmm8, xmm11
xorps xmm6, xmm6
cvtsi2sd xmm6, ebp
mulsd xmm6, xmm8
movaps xmm0, xmm6
call sub.api_ms_win_crt_math_l1_1_0.dll_cos
mulsd xmm0, xmm7
xorps xmm1, xmm1
cvtsd2ss xmm1, xmm0
movaps xmm0, xmm6
movss dword [rdi], xmm1
call sub.api_ms_win_crt_math_l1_1_0.dll_sin
xorps xmm0, xmm9
lea rdi, [rdi + 8]
mulsd xmm0, xmm7
add ebp, 4
cvtsd2ss xmm0, xmm0
movss dword [rdi - 4], xmm0
sub r14, rbx
jne 0x1800f5c21
mov r8d, ebx
lea ecx, [r13 - 2]
shl r8d, cl
lea ecx, [r13 - 1]
shl ebx, cl
dec ebx
xor r10d, r10d
nop
xor edx, edx
xor ecx, ecx
test r8d, r8d
je 0x1800f5ca3
mov eax, r8d
nop dword [rax]
test r10d, eax
je 0x1800f5c98
bts edx, ecx
inc ecx
mov eax, r8d
sar eax, cl
test eax, eax
jne 0x1800f5c90
mov eax, edx
mov dword [rsi + 4], edx
not eax
inc r10d
and eax, ebx
dec eax
mov dword [rsi], eax
add rsi, 8
cmp r10d, r12d
jl 0x1800f5c80
movss xmm0, dword [0x180216910]
lea r11, [rsp + 0xa8]
mov rax, qword [rsp + 0xf0]
movaps xmm6, xmmword [r11 - 0x18]
movaps xmm7, xmmword [r11 - 0x28]
movaps xmm8, xmmword [r11 - 0x38]
movaps xmm9, xmmword [r11 - 0x48]
movaps xmm11, xmmword [r11 - 0x68]
divss xmm0, xmm12
movaps xmm12, xmmword [r11 - 0x78]
movss dword [rax + 0x18], xmm0
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret