Function at 0x1400ca390
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x110
mov rdi, rdx
mov rbx, rcx
call fcn.1400c9140
test rdi, rdi
je 0x1400ca6be
movzx ecx, byte [rdi]
sub ecx, 1
je 0x1400ca405
sub ecx, 1
je 0x1400ca3eb
cmp ecx, 1
jne 0x1400ca6be
lea edx, [rcx + 3]
lea rcx, [rsp + 0x30]
call fcn.1400c8470
lea r8, [rsp + 0x30]
mov dword [rsp + 0x38], select
mov byte [rsp + 0x30], 4
jmp 0x1400ca6b3
mov rax, qword [rbx]
mov rcx, rbx
mov rbx, qword [rsp + 0x120]
add rsp, 0x110
pop rdi
jmp qword [rax + 0x60]
movzx r9d, byte [rdi + 0x10]
movzx r10d, byte [rdi + 0x11]
cmp r9b, 2
je 0x1400ca683
movups xmm0, xmmword [0x1401202f0]
xor ecx, ecx
cmp dword [0x1402567d0], 2
movups xmm1, xmmword [0x140120300]
movzx eax, word [0x140120370]
movups xmmword [rsp + 0x48], xmm0
mov word [rsp + 0xc8], ax
movups xmm0, xmmword [0x140120310]
movups xmmword [rsp + 0x58], xmm1
movups xmm1, xmmword [0x140120320]
movups xmmword [rsp + 0x68], xmm0
movups xmm0, xmmword [0x140120330]
movups xmmword [rsp + 0x78], xmm1
movups xmm1, xmmword [0x140120340]
movups xmmword [rsp + 0x88], xmm0
movups xmm0, xmmword [0x140120350]
movups xmmword [rsp + 0x98], xmm1
movups xmm1, xmmword [0x140120360]
movups xmmword [rsp + 0xa8], xmm0
movups xmmword [rsp + 0xb8], xmm1
jl 0x1400ca610
movdqa xmm5, xmmword [0x140119390]
lea rdx, [rsp + 0x48]
movdqa xmm4, xmmword [0x14011a630]
mov eax, 4
movaps xmmword [rsp + 0x100], xmm6
movaps xmmword [rsp + 0xf0], xmm7
movdqa xmm7, xmmword [str.1111]
movaps xmmword [rsp + 0xe0], xmm8
movd xmm6, eax
mov eax, 0x1f
movaps xmmword [rsp + 0xd0], xmm9
movdqa xmm9, xmmword [str.11111111]
movd xmm8, eax
nop
movd xmm2, ecx
lea eax, [rcx + 4]
pshufd xmm2, xmm2, 0
lea rdx, [rdx + 0x10]
paddd xmm2, xmm5
add ecx, 8
movdqa xmm1, xmm2
movdqa xmm0, xmm2
punpckhdq xmm0, xmm2
punpckldq xmm1, xmm2
pmuldq xmm0, xmm4
pmuldq xmm1, xmm4
shufps xmm1, xmm0, 0xdd
psrad xmm1, xmm6
movdqa xmm0, xmm1
psrld xmm0, xmm8
paddd xmm0, xmm1
pmulld xmm0, xmm7
psubd xmm2, xmm0
pshuflw xmm0, xmm2, 0xd8
movq xmm2, xmm9
pshufhw xmm1, xmm0, 0xd8
movq xmm0, qword [rdx - 0x10]
pshufd xmm3, xmm1, 0xd8
paddw xmm3, xmm2
movd xmm2, eax
pshufd xmm2, xmm2, 0
pxor xmm3, xmm0
movq qword [rdx - 0x10], xmm3
paddd xmm2, xmm5
movdqa xmm1, xmm2
movdqa xmm0, xmm2
punpckhdq xmm0, xmm2
pmuldq xmm0, xmm4
punpckldq xmm1, xmm2
pmuldq xmm1, xmm4
shufps xmm1, xmm0, 0xdd
psrad xmm1, xmm6
movdqa xmm0, xmm1
psrld xmm0, xmm8
paddd xmm0, xmm1
pmulld xmm0, xmm7
psubd xmm2, xmm0
pshuflw xmm0, xmm2, 0xd8
movq xmm2, xmm9
pshufhw xmm1, xmm0, 0xd8
movq xmm0, qword [rdx - 8]
pshufd xmm3, xmm1, 0xd8
paddw xmm3, xmm2
pxor xmm3, xmm0
movq qword [rdx - 8], xmm3
cmp ecx, 0x40
jl 0x1400ca500
movaps xmm9, xmmword [rsp + 0xd0]
movaps xmm8, xmmword [rsp + 0xe0]
movaps xmm7, xmmword [rsp + 0xf0]
movaps xmm6, xmmword [rsp + 0x100]
cmp ecx, 0x41
jge 0x1400ca652
movsxd rax, ecx
lea r8, [rsp + 0x48]
lea r8, [r8 + rax*2]
nop dword [rax]
mov eax, 0x5397829d
lea r8, [r8 + 2]
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, 1
sub ax, dx
movzx eax, ax
imul edx, eax, 0x31
add dx, cx
inc ecx
xor word [r8 - 2], dx
cmp ecx, 0x41
jl 0x1400ca620
mov edx, 2
mov dword [rsp + 0x20], r10d
mov r8d, edx
lea rcx, [rsp + 0x48]
call fcn.1400ae430
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x28]
mov rbx, qword [rsp + 0x120]
add rsp, 0x110
pop rdi
ret
mov eax, dword [rdi + 0x14]
lea rcx, [rsp + 0x30]
mov dword [rbx + 0xe0], eax
xor edx, edx
mov eax, dword [rdi + 0x14]
mov dword [rbx + 0x160], eax
call fcn.1400c8470
lea r8, [rsp + 0x30]
mov byte [rsp + 0x30], 1
mov dword [rsp + 0x38], 0x18
mov rax, qword [rbx]
xor edx, edx
mov rcx, rbx
call qword [rax + 0x40]
mov rbx, qword [rsp + 0x120]
add rsp, 0x110
pop rdi
ret