Function at 0x1400012c0
Capabilities:
Encode data using xor

Disassembly:
mov r11, rsp
push rdi
sub rsp, 0x60
mov rax, qword [0x140025040]
xor rax, rsp
mov qword [rsp + 0x48], rax
cmp byte [rcx + 8], 0
mov rdi, rcx
jne 0x1400016ec
mov rdx, qword [rcx]
mov qword [r11 + 0x10], rbx
mov rax, rdx
mov qword [r11 + 0x18], rbp
mov qword [r11 + 0x20], rsi
cmp byte [rdx], 0
movaps xmmword [rsp + 0x50], xmm6
je 0x140001308
inc rax
cmp byte [rax], 0
jne 0x140001300
sub eax, edx
add eax, eax
movsxd rbx, eax
lea rcx, [rbx + 1]
call fcn.140012e80
movups xmm0, xmmword [0x140017338]
movzx ecx, byte [0x140017348]
mov rbp, rax
mov byte [rsp + 0x40], cl
xor r10d, r10d
mov byte [rbx + rax], 0
mov r11, rax
mov esi, dword [0x140025088]
movups xmmword [rsp + 0x30], xmm0
mov rcx, qword [rdi]
mov rax, rcx
cmp byte [rcx], 0
je 0x140001358
nop dword [rax]
inc rax
cmp byte [rax], 0
jne 0x140001350
sub eax, ecx
cdqe
cmp r10, rax
jae 0x1400016cb
cmp byte [rsp + 0x40], 0
movzx ebx, byte [rcx + r10]
je 0x140001506
xor r8d, r8d
cmp esi, 2
jl 0x1400014bf
movdqa xmm0, xmmword [0x140020620]
lea rcx, [rsp + 0x30]
movdqa xmm5, xmmword [0x1400205c0]
movdqa xmm4, xmmword [0x140020640]
movdqa xmm6, xmmword [0x1400205f0]
movdqa xmmword [rsp + 0x20], xmm0
mov edx, dword [rsp + 0x20]
movd xmm2, r8d
lea eax, [r8 + 4]
pshufd xmm2, xmm2, 0
lea rcx, [rcx + 8]
paddd xmm2, xmm5
movd xmm3, eax
movdqa xmm1, xmm2
pshufd xmm3, xmm3, 0
punpckldq xmm1, xmm2
movdqa xmm0, xmm2
punpckhdq xmm0, xmm2
paddd xmm3, xmm5
pmuldq xmm0, xmm4
add r8d, 8
pmuldq xmm1, xmm4
shufps xmm1, xmm0, 0xdd
paddd xmm1, xmm2
psrad xmm1, 5
movdqa xmm0, xmm1
psrld xmm0, 0x1f
paddd xmm0, xmm1
pmulld xmm0, xmm6
psubd xmm2, xmm0
pshuflw xmm0, xmm2, 0xd8
pshufhw xmm1, xmm0, 0xd8
pshufd xmm2, xmm1, 0xd8
movdqa xmm1, xmm3
andps xmm2, xmmword [0x140020600]
packuswb xmm2, xmm2
punpckldq xmm1, xmm3
pmuldq xmm1, xmm4
movd xmm0, edx
paddb xmm2, xmm0
movd xmm0, dword [rcx - 8]
xorps xmm2, xmm0
movdqa xmm0, xmm3
punpckhdq xmm0, xmm3
pmuldq xmm0, xmm4
movd dword [rcx - 8], xmm2
shufps xmm1, xmm0, 0xdd
paddd xmm1, xmm3
psrad xmm1, 5
movdqa xmm0, xmm1
psrld xmm0, 0x1f
paddd xmm0, xmm1
pmulld xmm0, xmm6
psubd xmm3, xmm0
pshuflw xmm0, xmm3, 0xd8
pshufhw xmm1, xmm0, 0xd8
movd xmm0, edx
pshufd xmm2, xmm1, 0xd8
andps xmm2, xmmword [0x140020600]
packuswb xmm2, xmm2
paddb xmm2, xmm0
movd xmm0, dword [rcx - 4]
xorps xmm2, xmm0
movd dword [rcx - 4], xmm2
cmp r8d, 0x10
jl 0x1400013b0
cmp r8d, 0x11
jge 0x140001506
movsxd rax, r8d
lea r9, [rsp + 0x30]
add r9, rax
nop word [rax + rax]
mov eax, 0x8fb823ef
lea r9, [r9 + 1]
imul r8d
add edx, r8d
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, 1
sub al, dl
movsx eax, al
imul ecx, eax, 0x39
add cl, r8b
inc r8d
xor byte [r9 - 1], cl
cmp r8d, 0x11
jl 0x1400014d0
mov rax, rbx
mov r9, rbx
shr rax, 4
cmp byte [rsp + 0x40], 0
movzx eax, byte [rsp + rax + 0x30]
mov byte [r11], al
je 0x1400016b1
xor ecx, ecx
cmp esi, 2
jl 0x14000166c
movdqa xmm0, xmmword [0x140020620]
lea rdx, [rsp + 0x30]
movdqa xmm5, xmmword [0x1400205c0]
movdqa xmm4, xmmword [0x140020640]
movdqa xmm6, xmmword [0x1400205f0]
movdqa xmmword [rsp + 0x20], xmm0
mov r8d, dword [rsp + 0x20]
nop
movd xmm2, ecx
lea eax, [rcx + 4]
pshufd xmm2, xmm2, 0
lea rdx, [rdx + 8]
paddd xmm2, xmm5
movd xmm3, eax
movdqa xmm1, xmm2
pshufd xmm3, xmm3, 0
punpckldq xmm1, xmm2
movdqa xmm0, xmm2
punpckhdq xmm0, xmm2
paddd xmm3, xmm5
pmuldq xmm0, xmm4
add ecx, 8
pmuldq xmm1, xmm4
shufps xmm1, xmm0, 0xdd
paddd xmm1, xmm2
psrad xmm1, 5
movdqa xmm0, xmm1
psrld xmm0, 0x1f
paddd xmm0, xmm1
pmulld xmm0, xmm6
psubd xmm2, xmm0
pshuflw xmm0, xmm2, 0xd8
pshufhw xmm1, xmm0, 0xd8
pshufd xmm2, xmm1, 0xd8
movdqa xmm1, xmm3
andps xmm2, xmmword [0x140020600]
packuswb xmm2, xmm2
punpckldq xmm1, xmm3
pmuldq xmm1, xmm4
movd xmm0, r8d
paddb xmm2, xmm0
movd xmm0, dword [rdx - 8]
xorps xmm2, xmm0
movdqa xmm0, xmm3
punpckhdq xmm0, xmm3
pmuldq xmm0, xmm4
movd dword [rdx - 8], xmm2
shufps xmm1, xmm0, 0xdd
paddd xmm1, xmm3
psrad xmm1, 5
movdqa xmm0, xmm1
psrld xmm0, 0x1f
paddd xmm0, xmm1
pmulld xmm0, xmm6
psubd xmm3, xmm0
pshuflw xmm0, xmm3, 0xd8
pshufhw xmm1, xmm0, 0xd8
movd xmm0, r8d
pshufd xmm2, xmm1, 0xd8
andps xmm2, xmmword [0x140020600]
packuswb xmm2, xmm2
paddb xmm2, xmm0
movd xmm0, dword [rdx - 4]
xorps xmm2, xmm0
movd dword [rdx - 4], xmm2
cmp ecx, 0x10
jl 0x140001560
cmp ecx, 0x11
jge 0x1400016b1
movsxd rax, ecx
lea r8, [rsp + 0x30]
add r8, rax
nop word [rax + rax]
mov eax, 0x8fb823ef
lea r8, [r8 + 1]
imul ecx
add edx, ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, 1
sub al, dl
movsx eax, al
imul edx, eax, 0x39
add dl, cl
inc ecx
xor byte [r8 - 1], dl
cmp ecx, 0x11
jl 0x140001680
and r9d, 0xf
inc r10
movzx eax, byte [rsp + r9 + 0x30]
mov byte [r11 + 1], al
add r11, 2
jmp 0x140001342
movaps xmm6, xmmword [rsp + 0x50]
mov rsi, qword [rsp + 0x88]
mov rbx, qword [rsp + 0x78]
mov qword [rdi], rbp
mov rbp, qword [rsp + 0x80]
mov byte [rdi + 8], 1
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.140012820
add rsp, 0x60
pop rdi
ret