Function at 0x140060908
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, 0x88
movaps xmmword [rax - 0x58], xmm6
movaps xmmword [rax - 0x68], xmm7
movaps xmmword [rax - 0x78], xmm8
movsxd rbx, edx
mov r12, rcx
mov eax, ebx
cdq
and edx, 3
add eax, edx
sar eax, 2
movsxd rcx, eax
mov edi, eax
movaps xmmword [rsp + 0x40], xmm9
movaps xmmword [rsp + 0x30], xmm10
movaps xmmword [rsp + 0x20], xmm11
shl rcx, 2
call sub.msvcrt.dll_malloc
lea r8d, [rdi + rbx]
movsxd rcx, r8d
mov rsi, rax
mov qword [rsp + 0xe8], rax
shl rcx, 2
call sub.msvcrt.dll_malloc
mov r14, rax
movd xmm8, ebx
cvtdq2ps xmm8, xmm8
cvtps2pd xmm0, xmm8
call sub.msvcrt.dll_log
movaps xmm6, xmm0
movsd xmm0, qword [0x140161c98]
call sub.msvcrt.dll_log
movsd xmm11, qword [0x140161b48]
divsd xmm6, xmm0
addsd xmm6, xmm11
movaps xmm0, xmm6
call sub.msvcrt.dll_floor
movss xmm7, dword [0x140161d0c]
mov dword [r12], ebx
mov qword [r12 + 8], r14
mov qword [r12 + 0x10], rsi
mov r15d, 2
cvttsd2si r13d, xmm0
mov dword [rsp + 0xe0], r13d
mov dword [r12 + 4], r13d
test edi, edi
jle 0x140060ad0
lea eax, [rbx + rbx]
mov rbp, rbx
movaps xmm9, xmm7
movaps xmm10, xmm7
mov ebx, edi
sar rbp, 1
movd xmm0, eax
lea esi, [r15 - 1]
mov r13, r14
divss xmm9, xmm8
xor r12d, r12d
lea rdi, [r14 + 4]
cvtdq2ps xmm0, xmm0
divss xmm10, xmm0
movd xmm0, r12d
cvtdq2ps xmm0, xmm0
mulss xmm0, xmm9
cvtps2pd xmm6, xmm0
movaps xmm0, xmm6
call sub.msvcrt.dll_cos
xorps xmm1, xmm1
cvtsd2ss xmm1, xmm0
movaps xmm0, xmm6
movss dword [r13], xmm1
call sub.msvcrt.dll_sin
movd xmm1, esi
xorps xmm0, xmmword [0x140161cd0]
cvtdq2ps xmm1, xmm1
cvtsd2ss xmm0, xmm0
mulss xmm1, xmm10
cvtps2pd xmm6, xmm1
movss dword [rdi], xmm0
movaps xmm0, xmm6
call sub.msvcrt.dll_cos
xorps xmm1, xmm1
cvtsd2ss xmm1, xmm0
movaps xmm0, xmm6
movss dword [rdi + rbp*4 - 4], xmm1
call sub.msvcrt.dll_sin
xorps xmm1, xmm1
add r12d, 4
add esi, r15d
lea r13, [r13 + 8]
cvtsd2ss xmm1, xmm0
movss dword [rdi + rbp*4], xmm1
lea rdi, [rdi + 8]
dec rbx
jne 0x140060a25
mov ebx, dword [rsp + 0xd8]
mov rsi, qword [rsp + 0xe8]
mov r13d, dword [rsp + 0xe0]
mov r12, qword [rsp + 0xd0]
mov eax, ebx
cdq
and edx, 7
add eax, edx
sar eax, 3
mov edi, eax
test eax, eax
jle 0x140060b3c
movsxd rcx, ebx
divss xmm7, xmm8
mov ebp, edi
lea rbx, [r14 + rcx*4]
movd xmm0, r15d
cvtdq2ps xmm0, xmm0
mulss xmm0, xmm7
cvtps2pd xmm6, xmm0
movaps xmm0, xmm6
call sub.msvcrt.dll_cos
xorps xmm1, xmm1
mulsd xmm0, xmm11
cvtsd2ss xmm1, xmm0
movaps xmm0, xmm6
movss dword [rbx], xmm1
call sub.msvcrt.dll_sin
add r15d, 4
lea rbx, [rbx + 8]
mulsd xmm0, qword [0x140161d18]
cvtsd2ss xmm0, xmm0
movss dword [rbx - 4], xmm0
dec rbp
jne 0x140060aef
mov ebx, 1
lea ecx, [r13 - 1]
xor r10d, r10d
mov r8d, ebx
mov edx, ebx
shl r8d, cl
lea ecx, [r13 - 2]
shl edx, cl
sub r8d, ebx
test edi, edi
jle 0x140060ba1
lea r11, [rsi + 4]
xor r9d, r9d
xor ecx, ecx
test edx, edx
je 0x140060b82
mov eax, edx
test r10d, eax
je 0x140060b78
mov eax, ebx
shl eax, cl
or r9d, eax
add ecx, ebx
mov eax, edx
sar eax, cl
test eax, eax
jne 0x140060b6c
mov eax, r9d
add r10d, ebx
mov dword [r11], r9d
not eax
add r11, 8
and eax, r8d
sub eax, ebx
mov dword [rsi], eax
add rsi, 8
cmp r10d, edi
jl 0x140060b61
movss xmm0, dword [0x140161d10]
movaps xmm6, xmmword [rsp + 0x70]
movaps xmm7, xmmword [rsp + 0x60]
divss xmm0, xmm8
movaps xmm8, xmmword [rsp + 0x50]
movaps xmm9, xmmword [rsp + 0x40]
movaps xmm10, xmmword [rsp + 0x30]
movaps xmm11, xmmword [rsp + 0x20]
movss dword [r12 + 0x18], xmm0
add rsp, 0x88
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret