Function at 0x1400bade0
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rdi
push r15
sub rsp, 0x60
mov rbx, r8
movaps xmmword [rsp + 0x50], xmm6
mov r8d, dword [rcx]
mov r15d, r9d
movaps xmmword [rsp + 0x40], xmm7
mov r9, rcx
movaps xmmword [rsp + 0x30], xmm8
sub r8d, 1
je 0x1400bb077
sub r8d, 1
je 0x1400bb005
sub r8d, 1
je 0x1400bafbe
cmp r8d, 1
jne 0x1400bb108
movsx edi, word [rbx]
mov r9d, r8d
lea eax, [rdx - 1]
cmp edx, r8d
jbe 0x1400baee5
cmp eax, 8
jb 0x1400baebb
cmp dword [0x14049f430], 2
jl 0x1400baebb
movd xmm2, edi
and eax, 7
pshufd xmm2, xmm2, 0
mov r10d, edx
movdqa xmm3, xmm2
sub r10d, eax
mov eax, r9d
movq xmm0, qword [rbx + rax*2]
lea eax, [r9 + 4]
pmovsxwd xmm1, xmm0
movq xmm0, qword [rbx + rax*2]
pmaxsd xmm2, xmm1
add r9d, 8
pmovsxwd xmm1, xmm0
pmaxsd xmm3, xmm1
cmp r9d, r10d
jb 0x1400bae63
pmaxsd xmm2, xmm3
movdqa xmm0, xmm2
psrldq xmm0, 8
pmaxsd xmm2, xmm0
movdqa xmm0, xmm2
psrldq xmm0, 4
pmaxsd xmm2, xmm0
movd edi, xmm2
cmp r9d, edx
jae 0x1400baeed
mov eax, r9d
lea rcx, [rbx + rax*2]
mov eax, edx
sub eax, r9d
mov r9d, eax
nop word [rax + rax]
mov eax, edi
movsx edi, word [rcx]
cmp edi, eax
lea rcx, [rcx + 2]
cmovle edi, eax
sub r9, r8
jne 0x1400baed0
jmp 0x1400baeed
test edx, edx
je 0x1400bb108
movsd xmm8, qword [0x140102f68]
mov ecx, r15d
mov qword [rsp + 0x80], rbp
mov eax, r8d
shl eax, cl
lea ecx, [r15 + 1]
mov qword [rsp + 0x88], rsi
mov rsi, rbx
rol r8d, cl
mov qword [rsp + 0x90], r12
xor ebp, ebp
movd xmm6, eax
mov qword [rsp + 0x98], r14
movd xmm7, r8d
cvtdq2pd xmm7, xmm7
mov r14d, edx
mov r12d, edx
cvtdq2ps xmm6, xmm6
movsx eax, word [rsi]
sub eax, edi
movd xmm0, eax
cvtdq2ps xmm0, xmm0
divss xmm0, xmm6
cvtps2pd xmm0, xmm0
call fcn.1400fd656
mulsd xmm0, xmm7
addsd xmm0, xmm8
cvttsd2si eax, xmm0
sar eax, 1
mov word [rsi], ax
add rsi, 2
cwde
add ebp, eax
sub r12, 1
jne 0x1400baf40
mov r12, qword [rsp + 0x90]
mov rsi, qword [rsp + 0x88]
nop word [rax + rax]
movsx eax, word [rbx]
lea rbx, [rbx + 2]
mov ecx, r15d
shl eax, cl
cdq
idiv ebp
mov word [rbx - 2], ax
sub r14, 1
jne 0x1400baf90
mov r14, qword [rsp + 0x98]
mov rbp, qword [rsp + 0x80]
jmp 0x1400bb108
test edx, edx
je 0x1400bb108
mov r8d, edx
nop dword [rax]
movsx edx, word [rbx]
test dx, dx
jns 0x1400baff6
mov rax, qword [r9 + 8]
movsx ecx, word [rax]
imul ecx, edx
mov eax, ecx
sar eax, 0x1f
add eax, ecx
lea ecx, [r15 - 1]
sar eax, cl
inc eax
sar eax, 1
mov word [rbx], ax
add rbx, 2
sub r8, 1
jne 0x1400bafd0
jmp 0x1400bb108
test edx, edx
je 0x1400bb108
movsd xmm8, qword [0x140102f68]
lea ecx, [r15 + 1]
mov r8d, 1
mov edi, edx
mov eax, r8d
rol eax, cl
mov ecx, r15d
shl r8d, cl
movd xmm7, eax
movd xmm6, r8d
cvtdq2ps xmm6, xmm6
cvtdq2pd xmm7, xmm7
nop dword [rax]
movsx eax, word [rbx]
movd xmm0, eax
cvtdq2ps xmm0, xmm0
divss xmm0, xmm6
cvtps2pd xmm0, xmm0
call fcn.1400fd65c
mulsd xmm0, xmm7
addsd xmm0, xmm8
cvttsd2si eax, xmm0
sar eax, 1
mov word [rbx], ax
add rbx, 2
sub rdi, 1
jne 0x1400bb040
jmp 0x1400bb108
test edx, edx
je 0x1400bb108
movsd xmm6, qword [0x140102f68]
mov r8d, 1
mov eax, r8d
movaps xmmword [rsp + 0x20], xmm9
movss xmm9, dword [0x140179fa0]
mov ecx, r15d
shl eax, cl
lea ecx, [r15 + 1]
rol r8d, cl
mov edi, edx
movd xmm7, eax
movd xmm8, r8d
cvtdq2pd xmm8, xmm8
cvtdq2ps xmm7, xmm7
nop
movsx eax, word [rbx]
xorps xmm0, xmm0
cvtsi2ss xmm0, eax
xorps xmm0, xmm9
divss xmm0, xmm7
cvtss2sd xmm0, xmm0
call fcn.1400fd656
addsd xmm0, xmm6
movaps xmm1, xmm6
divsd xmm1, xmm0
mulsd xmm1, xmm8
addsd xmm1, xmm6
cvttsd2si eax, xmm1
sar eax, 1
mov word [rbx], ax
add rbx, 2
sub rdi, 1
jne 0x1400bb0c0
movaps xmm9, xmmword [rsp + 0x20]
movaps xmm6, xmmword [rsp + 0x50]
movaps xmm7, xmmword [rsp + 0x40]
movaps xmm8, xmmword [rsp + 0x30]
add rsp, 0x60
pop r15
pop rdi
pop rbx
ret