Function at 0x14009f510
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbx
sub rsp, 0x18
movdqa xmmword [rsp], xmm6
lea r10, [rcx + 7]
and r10, 0xfffffffffffffff8
mov r9, r10
sub r9, rcx
mov r8, rdx
sub r8, r9
jb 0x14009f53e
cmp r8, 8
jae 0x14009f55a
test rdx, rdx
je 0x14009f553
cmp rdx, 4
jae 0x14009f570
xor eax, eax
xor r8d, r8d
jmp 0x14009f610
xor eax, eax
jmp 0x14009fa05
mov eax, r8d
and eax, 7
cmp r10, rcx
jne 0x14009f62c
xor edx, edx
jmp 0x14009f6dd
mov r8, rdx
and r8, 0xfffffffffffffffc
pxor xmm0, xmm0
xor eax, eax
movdqa xmm2, xmmword [0x1400dd6a0]
movdqa xmm3, xmmword [0x1400dd6b0]
pxor xmm1, xmm1
nop word cs:[rax + rax]
movzx r9d, word [rcx + rax]
movd xmm4, r9d
movzx r9d, word [rcx + rax + 2]
movd xmm5, r9d
pcmpgtb xmm4, xmm2
punpcklbw xmm4, xmm4
pshuflw xmm4, xmm4, 0xd4
pshufd xmm4, xmm4, 0xd4
pand xmm4, xmm3
paddq xmm0, xmm4
pcmpgtb xmm5, xmm2
punpcklbw xmm5, xmm5
pshuflw xmm4, xmm5, 0xd4
pshufd xmm4, xmm4, 0xd4
pand xmm4, xmm3
paddq xmm1, xmm4
add rax, 4
cmp r8, rax
jne 0x14009f5a0
paddq xmm1, xmm0
pshufd xmm0, xmm1, 0xee
paddq xmm0, xmm1
movq rax, xmm0
cmp r8, rdx
je 0x14009fa05
nop dword [rax]
xor r9d, r9d
cmp byte [rcx + r8], 0xc0
setge r9b
add rax, r9
inc r8
cmp rdx, r8
jne 0x14009f610
jmp 0x14009fa05
cmp r9, 4
jae 0x14009f63c
xor edx, edx
xor r10d, r10d
jmp 0x14009f6c6
mov r10d, r9d
and r10d, 4
pxor xmm0, xmm0
xor edx, edx
movdqa xmm2, xmmword [0x1400dd6a0]
movdqa xmm3, xmmword [0x1400dd6b0]
pxor xmm1, xmm1
nop dword [rax]
movzx r11d, word [rcx + rdx]
movd xmm4, r11d
movzx r11d, word [rcx + rdx + 2]
movd xmm5, r11d
pcmpgtb xmm4, xmm2
punpcklbw xmm4, xmm4
pshuflw xmm4, xmm4, 0xd4
pshufd xmm4, xmm4, 0xd4
pand xmm4, xmm3
paddq xmm0, xmm4
pcmpgtb xmm5, xmm2
punpcklbw xmm5, xmm5
pshuflw xmm4, xmm5, 0xd4
pshufd xmm4, xmm4, 0xd4
pand xmm4, xmm3
paddq xmm1, xmm4
add rdx, 4
cmp r10, rdx
jne 0x14009f660
paddq xmm1, xmm0
pshufd xmm0, xmm1, 0xee
paddq xmm0, xmm1
movq rdx, xmm0
jmp 0x14009f6d8
xor r11d, r11d
cmp byte [rcx + r10], 0xc0
setge r11b
add rdx, r11
inc r10
cmp r9, r10
jne 0x14009f6c6
add rcx, r9
test rax, rax
je 0x14009f77a
mov r10, r8
and r10, 0xfffffffffffffff8
xor r9d, r9d
cmp byte [rcx + r10], 0xc0
setge r9b
cmp eax, 1
je 0x14009f77d
xor r11d, r11d
cmp byte [rcx + r10 + 1], 0xc0
setge r11b
add r9, r11
cmp eax, 2
je 0x14009f77d
xor r11d, r11d
cmp byte [rcx + r10 + 2], 0xc0
setge r11b
add r9, r11
cmp eax, 3
je 0x14009f77d
xor r11d, r11d
cmp byte [rcx + r10 + 3], 0xc0
setge r11b
add r9, r11
cmp eax, 4
je 0x14009f77d
xor r11d, r11d
cmp byte [rcx + r10 + 4], 0xc0
setge r11b
add r9, r11
cmp eax, 5
je 0x14009f77d
xor r11d, r11d
cmp byte [rcx + r10 + 5], 0xc0
setge r11b
add r9, r11
cmp eax, 6
je 0x14009f77d
xor eax, eax
cmp byte [rcx + r10 + 6], 0xc0
setge al
add r9, rax
jmp 0x14009f77d
xor r9d, r9d
add r9, rdx
shr r8, 3
movabs rdi, 0x7ffffffffffffff
movabs r10, 0xff00ff00ff00ff
movabs rdx, 0x1000100010001
pcmpeqd xmm0, xmm0
movdqa xmm1, xmmword [0x1400dd6c0]
jmp 0x14009f7e3
xor r9d, r9d
lea rcx, [r11 + rsi*8]
sub r8, rsi
mov ebx, esi
and ebx, 3
mov r14, r9
and r14, r10
shr r9, 8
and r9, r10
add r9, r14
imul r9, rdx
shr r9, 0x30
add r9, rax
test rbx, rbx
jne 0x14009f980
mov rax, r9
test r8, r8
je 0x14009fa05
mov r11, rcx
cmp r8, 0xc0
mov esi, 0xc0
cmovb rsi, r8
cmp rsi, 4
jb 0x14009f7b0
mov ecx, esi
shr ecx, 2
lea r14, [rcx + rdi]
and r14, rdi
je 0x14009f912
inc r14
mov r15, r14
and r15, 0xfffffffffffffffe
mov rbx, r15
shl rbx, 5
add rbx, r11
pxor xmm3, xmm3
mov r9, r15
mov r12, r11
nop dword [rax + rax]
movdqu xmm2, xmmword [r12]
movdqu xmm5, xmmword [r12 + 0x20]
movdqa xmm4, xmm2
punpcklqdq xmm4, xmm5
movdqa xmm6, xmm4
pxor xmm6, xmm0
psrlq xmm6, 7
psrlq xmm4, 6
por xmm4, xmm6
pand xmm4, xmm1
paddq xmm4, xmm3
movdqu xmm3, xmmword [r12 + 0x10]
movdqu xmm6, xmmword [r12 + 0x30]
punpckhqdq xmm2, xmm5
movdqa xmm5, xmm3
punpcklqdq xmm5, xmm6
punpckhqdq xmm3, xmm6
movdqa xmm6, xmm2
pxor xmm6, xmm0
psrlq xmm6, 7
psrlq xmm2, 6
por xmm2, xmm6
pand xmm2, xmm1
movdqa xmm6, xmm5
pxor xmm6, xmm0
psrlq xmm6, 7
psrlq xmm5, 6
por xmm5, xmm6
pand xmm5, xmm1
paddq xmm5, xmm2
paddq xmm5, xmm4
movdqa xmm2, xmm3
pxor xmm2, xmm0
psrlq xmm2, 7
psrlq xmm3, 6
por xmm3, xmm2
pand xmm3, xmm1
paddq xmm3, xmm5
add r12, 0x40
add r9, 0xfffffffffffffffe
jne 0x14009f840
pshufd xmm2, xmm3, 0xee
paddq xmm2, xmm3
movq r9, xmm2
cmp r14, r15
je 0x14009f7b3
jmp 0x14009f918
xor r9d, r9d
mov rbx, r11
shl rcx, 5
add rcx, r11
nop
movdqu xmm2, xmmword [rbx]
movdqu xmm3, xmmword [rbx + 0x10]
movdqa xmm4, xmm2
pxor xmm4, xmm0
movdqa xmm5, xmm3
pxor xmm5, xmm0
psrlq xmm5, 7
psrlq xmm4, 7
psrlq xmm3, 6
por xmm3, xmm5
psrlq xmm2, 6
por xmm2, xmm4
pand xmm3, xmm1
pand xmm2, xmm1
paddq xmm2, xmm3
pshufd xmm3, xmm2, 0xee
paddq xmm3, xmm2
movq r14, xmm3
add r9, r14
add rbx, 0x20
cmp rbx, rcx
jne 0x14009f920
jmp 0x14009f7b3
movabs rcx, 0x101010101010101
and esi, 0xfc
mov rax, qword [r11 + rsi*8]
mov r8, rax
not r8
shr r8, 7
shr rax, 6
or rax, r8
and rax, rcx
cmp ebx, 1
je 0x14009f9ea
mov r8, qword [r11 + rsi*8 + 8]
mov rdi, r8
not rdi
shr rdi, 7
shr r8, 6
or r8, rdi
and r8, rcx
add rax, r8
cmp ebx, 2
je 0x14009f9ea
mov r8, qword [r11 + rsi*8 + 0x10]
mov r11, r8
not r11
shr r11, 7
shr r8, 6
or r8, r11
and r8, rcx
add rax, r8
mov rcx, rax
and rcx, r10
shr rax, 8
and rax, r10
add rax, rcx
imul rax, rdx
shr rax, 0x30
add rax, r9
movaps xmm6, xmmword [rsp]
add rsp, 0x18
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret