Function at 0x1400223e0
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x98
movaps xmmword [rsp + 0x40], xmm6
movaps xmmword [rsp + 0x50], xmm7
movaps xmmword [rsp + 0x60], xmm8
movaps xmmword [rsp + 0x70], xmm9
movaps xmmword [rsp + 0x80], xmm10
mov esi, dword [rcx + 8]
mov eax, r8d
mov r14d, r8d
mov rbx, rcx
movsxd rdi, edx
sar eax, 1
mov dword [rsp + 0xf0], r8d
sar r14d, 2
lea ebp, [rax*4 + 7]
mov dword [rsp + 0x28], eax
mov rax, qword [rcx + 0x80]
and ebp, 0xfffffff8
add esi, ebp
mov dword [rcx + 8], esi
test rax, rax
je 0x1400228a0
movsxd r12, dword [rcx + 0x90]
mov ecx, dword [rcx + 0x94]
mov rdx, r12
add r12, rax
lea r8d, [rbp + rdx]
cmp r8d, ecx
jg 0x140022830
movsxd r13, r8d
lea edx, [rbp + r8]
mov dword [rbx + 0x90], r8d
add r13, rax
mov qword [rbx + rdi*8 + 0x588], r12
cmp ecx, edx
jl 0x1400229c8
movsxd r8, edx
mov dword [rbx + 0x90], edx
add rax, r8
mov qword [rsp + 0x20], rax
lea eax, [r14*4 + 7]
mov qword [rbx + rdi*8 + 0x598], r13
and eax, 0xfffffff8
lea r8d, [rax + rbp]
add eax, edx
add r8d, esi
mov dword [rbx + 8], r8d
cmp eax, ecx
jg 0x140022850
mov dword [rbx + 0x90], eax
test r12, r12
mov rcx, qword [rsp + 0x20]
sete al
test r13, r13
sete dl
mov qword [rbx + rdi*8 + 0x5a8], rcx
or al, dl
jne 0x14002285c
test rcx, rcx
je 0x14002285c
test r14d, r14d
jle 0x1400225e7
pxor xmm9, xmm9
movsxd r14, r14d
movsd xmm6, qword [0x1401d4650]
movsd xmm7, qword [0x1401d4658]
cvtsi2sd xmm9, dword [rsp + 0xf0]
lea rax, [r14 + r14]
xor r14d, r14d
movq xmm10, qword [0x1401d4660]
mov qword [rsp + 0xe0], rbx
lea rsi, [rsp + 0x38]
mov rbx, r14
lea r15, [rsp + 0x30]
movss xmm8, dword [0x1401d4640]
mov r14, rax
nop word [rax + rax]
lea edx, [rbx + rbx]
pxor xmm0, xmm0
mov r8, r15
cvtsi2sd xmm0, edx
mov rdx, rsi
mulsd xmm0, xmm6
divsd xmm0, xmm9
call sym.sincos
pxor xmm1, xmm1
pxor xmm0, xmm0
lea edx, [rbx + 1]
cvtsd2ss xmm1, qword [rsp + 0x38]
xorps xmm1, xmm8
cvtsd2ss xmm0, qword [rsp + 0x30]
mov r8, r15
unpcklps xmm0, xmm1
movlps qword [r12 + rbx*4], xmm0
pxor xmm0, xmm0
cvtsi2sd xmm0, edx
mov rdx, rsi
mulsd xmm0, xmm6
divsd xmm0, xmm9
mulsd xmm0, xmm7
call sym.sincos
movupd xmm0, xmmword [rsp + 0x30]
cvtpd2ps xmm0, xmm0
mulps xmm0, xmm10
movlps qword [r13 + rbx*4], xmm0
add rbx, 2
cmp r14, rbx
jne 0x140022560
mov rbx, qword [rsp + 0xe0]
mov eax, dword [rsp + 0xf0]
sar eax, 3
mov dword [rsp + 0x2c], eax
test eax, eax
jle 0x14002268a
pxor xmm7, xmm7
mov r12, qword [rsp + 0x20]
movsd xmm6, qword [0x1401d4650]
lea r13d, [rax*4 + 2]
mov r14d, 2
lea rsi, [rsp + 0x38]
lea r15, [rsp + 0x30]
cvtsi2sd xmm7, dword [rsp + 0xf0]
movss xmm8, dword [0x1401d4640]
nop dword [rax + rax]
pxor xmm0, xmm0
mov r8, r15
mov rdx, rsi
add r12, 8
cvtsi2sd xmm0, r14d
add r14d, 4
mulsd xmm0, xmm6
divsd xmm0, xmm7
call sym.sincos
pxor xmm1, xmm1
pxor xmm0, xmm0
cvtsd2ss xmm1, qword [rsp + 0x38]
xorps xmm1, xmm8
cvtsd2ss xmm0, qword [rsp + 0x30]
unpcklps xmm0, xmm1
movlps qword [r12 - 8], xmm0
cmp r13d, r14d
jne 0x140022640
mov r13d, dword [rbx + 8]
mov r8, qword [rbx + 0x80]
add r13d, ebp
mov dword [rbx + 8], r13d
test r8, r8
je 0x140022918
movsxd rsi, dword [rbx + 0x90]
add ebp, esi
cmp ebp, dword [rbx + 0x94]
jg 0x1400229a0
mov ecx, dword [rsp + 0x28]
add rsi, r8
mov dword [rbx + 0x90], ebp
mov qword [rbx + rdi*8 + 0x5b8], rsi
test ecx, ecx
jle 0x1400229b1
mov eax, dword [rsp + 0x28]
pxor xmm9, xmm9
xor r13d, r13d
movsd xmm6, qword [0x1401d4650]
movsd xmm7, qword [0x1401d4658]
movsd xmm8, qword [0x1401d4668]
cvtsi2sd xmm9, eax
lea ebp, [rax - 1]
nop dword [rax]
pxor xmm0, xmm0
cvtsi2sd xmm0, r13d
addsd xmm0, xmm7
divsd xmm0, xmm9
mulsd xmm0, xmm7
mulsd xmm0, xmm6
call sym.sin
cvtsd2ss xmm0, xmm0
mulss xmm0, xmm0
cvtss2sd xmm0, xmm0
mulsd xmm0, xmm8
call sym.sin
mov rax, r13
cvtsd2ss xmm0, xmm0
movss dword [rsi + r13*4], xmm0
add r13, 1
cmp rbp, rax
jne 0x140022708
mov eax, dword [rsp + 0x2c]
mov r8, qword [rbx + 0x80]
lea eax, [rax + rax + 7]
and eax, 0xfffffff8
add dword [rbx + 8], eax
test r8, r8
je 0x140022960
movsxd rdx, dword [rbx + 0x90]
add eax, edx
cmp eax, dword [rbx + 0x94]
jg 0x140022988
add r8, rdx
mov dword [rbx + 0x90], eax
mov qword [rbx + rdi*8 + 0x5c8], r8
mov ecx, dword [rsp + 0xf0]
call sym.ilog
mov edi, dword [rsp + 0x2c]
sub eax, 1
test edi, edi
jle 0x140022827
mov ecx, 0x23
xor edx, edx
mov word [r8], dx
sub ecx, eax
cmp edi, 1
je 0x140022827
lea r10d, [rdi - 2]
mov r9d, 1
add r10, 2
nop
mov eax, r9d
lea edx, [r9 + r9]
shr eax, 1
and edx, 0xaaaaaaaa
and eax, 0x55555555
or eax, edx
lea edx, [rax*4]
shr eax, 2
and eax, 0x33333333
and edx, 0xcccccccc
or edx, eax
mov eax, edx
shr edx, 4
shl eax, 4
and edx, 0xf0f0f0f
and eax, 0xf0f0f0f0
or eax, edx
bswap eax
shr eax, cl
shl eax, 2
mov word [r8 + r9*2], ax
add r9, 1
cmp r9, r10
jne 0x1400227d0
mov eax, 1
jmp 0x140022868
mov qword [rsp + 0x20], r12
xor r13d, r13d
xor r12d, r12d
mov qword [rbx + rdi*8 + 0x588], 0
jmp 0x1400224a6
mov qword [rbx + rdi*8 + 0x5a8], 0
mov dword [rbx + 0x9c], 3
xor eax, eax
movaps xmm6, xmmword [rsp + 0x40]
movaps xmm7, xmmword [rsp + 0x50]
movaps xmm8, xmmword [rsp + 0x60]
movaps xmm9, xmmword [rsp + 0x70]
movaps xmm10, xmmword [rsp + 0x80]
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
test ebp, ebp
je 0x140022900
movsxd r13, ebp
mov rcx, r13
call sym.malloc
mov rcx, r13
mov qword [rbx + rdi*8 + 0x588], rax
mov r12, rax
call sym.malloc
mov r13, rax
lea ecx, [r14*4 + 7]
mov qword [rbx + rdi*8 + 0x598], r13
and ecx, 0xfffffff8
lea eax, [rcx + rbp]
add eax, esi
mov dword [rbx + 8], eax
test ecx, ecx
je 0x140022850
movsxd rcx, ecx
call sym.malloc
mov qword [rsp + 0x20], rax
jmp 0x1400224d4
mov qword [rcx + rdi*8 + 0x588], 0
xor r12d, r12d
xor r13d, r13d
jmp 0x1400228c5
test ebp, ebp
je 0x1400229a0
movsxd rcx, ebp
call sym.malloc
mov qword [rbx + rdi*8 + 0x5b8], rax
mov rsi, rax
test rax, rax
je 0x14002285c
mov eax, dword [rsp + 0x28]
test eax, eax
jg 0x1400226d7
mov eax, dword [rsp + 0x2c]
lea eax, [rax + rax + 7]
and eax, 0xfffffff8
add r13d, eax
mov dword [rbx + 8], r13d
nop word [rax + rax]
test eax, eax
je 0x140022988
movsxd rcx, eax
call sym.malloc
mov qword [rbx + rdi*8 + 0x5c8], rax
mov r8, rax
test rax, rax
jne 0x140022797
jmp 0x14002285c
mov qword [rbx + rdi*8 + 0x5c8], 0
jmp 0x14002285c
mov qword [rbx + rdi*8 + 0x5b8], 0
jmp 0x14002285c
mov eax, dword [rsp + 0x2c]
lea eax, [rax + rax + 7]
and eax, 0xfffffff8
add r13d, eax
mov dword [rbx + 8], r13d
jmp 0x140022771
mov qword [rsp + 0x20], r13
mov edx, r8d
xor r13d, r13d
jmp 0x1400224a6