Function at 0x4a6b40
Capabilities:
Encode data using xor
Encrypt data using salsa20 or chacha

Disassembly:
sub rsp, 0x248
mov qword [rsp + 0x240], rbp
lea rbp, [rsp + 0x240]
mov rbp, rsp
add rbp, 0x40
and rbp, 0xffffffffffffffc0
mov rdi, qword [rsp + 0x250]
add rdi, 0x10
mov rsi, qword [rsp + 0x258]
mov rdx, qword [rsp + 0x270]
mov rcx, qword [rsp + 0x260]
lea rax, str.expand_32_byte_k
movdqa xmm8, xmmword [rax]
movdqa xmm6, xmmword [rax + 0x10]
movdqa xmm7, xmmword [rax + 0x20]
movdqu xmm9, xmmword [rdi]
movdqu xmm10, xmmword [rdi + 0x10]
movdqu xmm11, xmmword [rdi + 0x20]
mov r9, 1
movdqa xmmword [rbp], xmm8
movdqa xmmword [rbp + 0x10], xmm9
movdqa xmmword [rbp + 0x20], xmm10
movdqa xmmword [rbp + 0x30], xmm11
movdqa xmmword [rbp + 0x50], xmm6
movdqa xmmword [rbp + 0x60], xmm7
cmp rcx, 0x100
jb 0x4a7548
pshufd xmm0, xmm8, 0
pshufd xmm1, xmm8, 0x55
pshufd xmm2, xmm8, 0xaa
pshufd xmm3, xmm8, 0xff
movdqa xmmword [rbp + 0x80], xmm0
movdqa xmmword [rbp + 0x90], xmm1
movdqa xmmword [rbp + 0xa0], xmm2
movdqa xmmword [rbp + 0xb0], xmm3
pshufd xmm0, xmm9, 0
pshufd xmm1, xmm9, 0x55
pshufd xmm2, xmm9, 0xaa
pshufd xmm3, xmm9, 0xff
movdqa xmmword [rbp + 0xc0], xmm0
movdqa xmmword [rbp + 0xd0], xmm1
movdqa xmmword [rbp + 0xe0], xmm2
movdqa xmmword [rbp + 0xf0], xmm3
pshufd xmm0, xmm10, 0
pshufd xmm1, xmm10, 0x55
pshufd xmm2, xmm10, 0xaa
pshufd xmm3, xmm10, 0xff
movdqa xmmword [rbp + 0x100], xmm0
movdqa xmmword [rbp + 0x110], xmm1
movdqa xmmword [rbp + 0x120], xmm2
movdqa xmmword [rbp + 0x130], xmm3
pshufd xmm0, xmm11, 0xaa
pshufd xmm1, xmm11, 0xff
movdqa xmmword [rbp + 0x160], xmm0
movdqa xmmword [rbp + 0x170], xmm1
jmp 0x4a6ca9
mov rax, qword [rbp + 0x30]
lea r8, [rax + 1]
lea r9, [rax + 2]
lea r10, [rax + 3]
lea rbx, [rax + 4]
mov dword [rbp + 0x140], eax
mov dword [rbp + 0x144], r8d
mov dword [rbp + 0x148], r9d
mov dword [rbp + 0x14c], r10d
shr rax, 0x20
shr r8, 0x20
shr r9, 0x20
shr r10, 0x20
mov dword [rbp + 0x150], eax
mov dword [rbp + 0x154], r8d
mov dword [rbp + 0x158], r9d
mov dword [rbp + 0x15c], r10d
mov qword [rbp + 0x30], rbx
mov rax, 0x14
movdqa xmm0, xmmword [rbp + 0x80]
movdqa xmm1, xmmword [rbp + 0x90]
movdqa xmm2, xmmword [rbp + 0xa0]
movdqa xmm3, xmmword [rbp + 0xb0]
movdqa xmm4, xmmword [rbp + 0xc0]
movdqa xmm5, xmmword [rbp + 0xd0]
movdqa xmm6, xmmword [rbp + 0xe0]
movdqa xmm7, xmmword [rbp + 0xf0]
movdqa xmm8, xmmword [rbp + 0x100]
movdqa xmm9, xmmword [rbp + 0x110]
movdqa xmm10, xmmword [rbp + 0x120]
movdqa xmm11, xmmword [rbp + 0x130]
movdqa xmm12, xmmword [rbp + 0x140]
movdqa xmm13, xmmword [rbp + 0x150]
movdqa xmm14, xmmword [rbp + 0x160]
movdqa xmm15, xmmword [rbp + 0x170]
paddd xmm0, xmm4
paddd xmm1, xmm5
pxor xmm12, xmm0
pxor xmm13, xmm1
paddd xmm2, xmm6
paddd xmm3, xmm7
pxor xmm14, xmm2
pxor xmm15, xmm3
pshufb xmm12, xmmword [rbp + 0x50]
pshufb xmm13, xmmword [rbp + 0x50]
paddd xmm8, xmm12
paddd xmm9, xmm13
pshufb xmm14, xmmword [rbp + 0x50]
pshufb xmm15, xmmword [rbp + 0x50]
paddd xmm10, xmm14
paddd xmm11, xmm15
movdqa xmmword [rbp + 0x70], xmm12
pxor xmm4, xmm8
pxor xmm5, xmm9
movdqa xmm12, xmm4
pslld xmm4, 0xc
psrld xmm12, 0x14
pxor xmm4, xmm12
movdqa xmm12, xmm5
pslld xmm5, 0xc
psrld xmm12, 0x14
pxor xmm5, xmm12
pxor xmm6, xmm10
pxor xmm7, xmm11
movdqa xmm12, xmm6
pslld xmm6, 0xc
psrld xmm12, 0x14
pxor xmm6, xmm12
movdqa xmm12, xmm7
pslld xmm7, 0xc
psrld xmm12, 0x14
pxor xmm7, xmm12
movdqa xmm12, xmmword [rbp + 0x70]
paddd xmm0, xmm4
paddd xmm1, xmm5
pxor xmm12, xmm0
pxor xmm13, xmm1
paddd xmm2, xmm6
paddd xmm3, xmm7
pxor xmm14, xmm2
pxor xmm15, xmm3
pshufb xmm12, xmmword [rbp + 0x60]
pshufb xmm13, xmmword [rbp + 0x60]
paddd xmm8, xmm12
paddd xmm9, xmm13
pshufb xmm14, xmmword [rbp + 0x60]
pshufb xmm15, xmmword [rbp + 0x60]
paddd xmm10, xmm14
paddd xmm11, xmm15
movdqa xmmword [rbp + 0x70], xmm12
pxor xmm4, xmm8
pxor xmm5, xmm9
movdqa xmm12, xmm4
pslld xmm4, 7
psrld xmm12, 0x19
pxor xmm4, xmm12
movdqa xmm12, xmm5
pslld xmm5, 7
psrld xmm12, 0x19
pxor xmm5, xmm12
pxor xmm6, xmm10
pxor xmm7, xmm11
movdqa xmm12, xmm6
pslld xmm6, 7
psrld xmm12, 0x19
pxor xmm6, xmm12
movdqa xmm12, xmm7
pslld xmm7, 7
psrld xmm12, 0x19
pxor xmm7, xmm12
movdqa xmm12, xmmword [rbp + 0x70]
paddd xmm0, xmm5
paddd xmm1, xmm6
pxor xmm15, xmm0
pxor xmm12, xmm1
paddd xmm2, xmm7
paddd xmm3, xmm4
pxor xmm13, xmm2
pxor xmm14, xmm3
pshufb xmm15, xmmword [rbp + 0x50]
pshufb xmm12, xmmword [rbp + 0x50]
paddd xmm10, xmm15
paddd xmm11, xmm12
pshufb xmm13, xmmword [rbp + 0x50]
pshufb xmm14, xmmword [rbp + 0x50]
paddd xmm8, xmm13
paddd xmm9, xmm14
movdqa xmmword [rbp + 0x70], xmm15
pxor xmm5, xmm10
pxor xmm6, xmm11
movdqa xmm15, xmm5
pslld xmm5, 0xc
psrld xmm15, 0x14
pxor xmm5, xmm15
movdqa xmm15, xmm6
pslld xmm6, 0xc
psrld xmm15, 0x14
pxor xmm6, xmm15
pxor xmm7, xmm8
pxor xmm4, xmm9
movdqa xmm15, xmm7
pslld xmm7, 0xc
psrld xmm15, 0x14
pxor xmm7, xmm15
movdqa xmm15, xmm4
pslld xmm4, 0xc
psrld xmm15, 0x14
pxor xmm4, xmm15
movdqa xmm15, xmmword [rbp + 0x70]
paddd xmm0, xmm5
paddd xmm1, xmm6
pxor xmm15, xmm0
pxor xmm12, xmm1
paddd xmm2, xmm7
paddd xmm3, xmm4
pxor xmm13, xmm2
pxor xmm14, xmm3
pshufb xmm15, xmmword [rbp + 0x60]
pshufb xmm12, xmmword [rbp + 0x60]
paddd xmm10, xmm15
paddd xmm11, xmm12
pshufb xmm13, xmmword [rbp + 0x60]
pshufb xmm14, xmmword [rbp + 0x60]
paddd xmm8, xmm13
paddd xmm9, xmm14
movdqa xmmword [rbp + 0x70], xmm15
pxor xmm5, xmm10
pxor xmm6, xmm11
movdqa xmm15, xmm5
pslld xmm5, 7
psrld xmm15, 0x19
pxor xmm5, xmm15
movdqa xmm15, xmm6
pslld xmm6, 7
psrld xmm15, 0x19
pxor xmm6, xmm15
pxor xmm7, xmm8
pxor xmm4, xmm9
movdqa xmm15, xmm7
pslld xmm7, 7
psrld xmm15, 0x19
pxor xmm7, xmm15
movdqa xmm15, xmm4
pslld xmm4, 7
psrld xmm15, 0x19
pxor xmm4, xmm15
sub rax, 2
movdqa xmm15, xmmword [rbp + 0x70]
jne 0x4a6d96
paddd xmm0, xmmword [rbp + 0x80]
paddd xmm1, xmmword [rbp + 0x90]
paddd xmm2, xmmword [rbp + 0xa0]
paddd xmm3, xmmword [rbp + 0xb0]
paddd xmm4, xmmword [rbp + 0xc0]
paddd xmm5, xmmword [rbp + 0xd0]
paddd xmm6, xmmword [rbp + 0xe0]
paddd xmm7, xmmword [rbp + 0xf0]
paddd xmm8, xmmword [rbp + 0x100]
paddd xmm9, xmmword [rbp + 0x110]
paddd xmm10, xmmword [rbp + 0x120]
paddd xmm11, xmmword [rbp + 0x130]
paddd xmm12, xmmword [rbp + 0x140]
paddd xmm13, xmmword [rbp + 0x150]
paddd xmm14, xmmword [rbp + 0x160]
paddd xmm15, xmmword [rbp + 0x170]
movdqa xmmword [rbp + 0x180], xmm8
movdqa xmmword [rbp + 0x190], xmm9
movdqa xmmword [rbp + 0x1a0], xmm10
movdqa xmmword [rbp + 0x1b0], xmm11
movdqa xmmword [rbp + 0x1c0], xmm12
movdqa xmmword [rbp + 0x1d0], xmm13
movdqa xmmword [rbp + 0x1e0], xmm14
movdqa xmmword [rbp + 0x1f0], xmm15
movdqa xmm8, xmm0
movdqa xmm9, xmm2
movdqa xmm10, xmm4
movdqa xmm11, xmm6
punpckhdq xmm0, xmm1
punpckhdq xmm2, xmm3
punpckhdq xmm4, xmm5
punpckhdq xmm6, xmm7
punpckldq xmm8, xmm1
punpckldq xmm9, xmm3
punpckldq xmm10, xmm5
punpckldq xmm11, xmm7
movdqa xmm1, xmm0
movdqa xmm3, xmm4
movdqa xmm5, xmm8
movdqa xmm7, xmm10
punpckhqdq xmm0, xmm2
punpckhqdq xmm4, xmm6
punpckhqdq xmm8, xmm9
punpckhqdq xmm10, xmm11
punpcklqdq xmm1, xmm2
punpcklqdq xmm3, xmm6
punpcklqdq xmm5, xmm9
punpcklqdq xmm7, xmm11
and rsi, rsi
je 0x4a73eb
movdqu xmm2, xmmword [rsi]
movdqu xmm6, xmmword [rsi + 0x10]
movdqu xmm9, xmmword [rsi + 0x40]
movdqu xmm11, xmmword [rsi + 0x50]
movdqu xmm12, xmmword [rsi + 0x80]
movdqu xmm13, xmmword [rsi + 0x90]
movdqu xmm14, xmmword [rsi + 0xc0]
movdqu xmm15, xmmword [rsi + 0xd0]
pxor xmm5, xmm2
pxor xmm7, xmm6
pxor xmm8, xmm9
pxor xmm10, xmm11
pxor xmm1, xmm12
pxor xmm3, xmm13
pxor xmm0, xmm14
pxor xmm4, xmm15
movdqu xmmword [rdx], xmm5
movdqu xmmword [rdx + 0x10], xmm7
movdqu xmmword [rdx + 0x40], xmm8
movdqu xmmword [rdx + 0x50], xmm10
movdqu xmmword [rdx + 0x80], xmm1
movdqu xmmword [rdx + 0x90], xmm3
movdqu xmmword [rdx + 0xc0], xmm0
movdqu xmmword [rdx + 0xd0], xmm4
movdqa xmm0, xmmword [rbp + 0x180]
movdqa xmm1, xmmword [rbp + 0x190]
movdqa xmm2, xmmword [rbp + 0x1a0]
movdqa xmm3, xmmword [rbp + 0x1b0]
movdqa xmm4, xmmword [rbp + 0x1c0]
movdqa xmm5, xmmword [rbp + 0x1d0]
movdqa xmm6, xmmword [rbp + 0x1e0]
movdqa xmm7, xmmword [rbp + 0x1f0]
movdqa xmm8, xmm0
movdqa xmm9, xmm2
movdqa xmm10, xmm4
movdqa xmm11, xmm6
punpckldq xmm8, xmm1
punpckldq xmm9, xmm3
punpckhdq xmm0, xmm1
punpckhdq xmm2, xmm3
punpckldq xmm10, xmm5
punpckldq xmm11, xmm7
punpckhdq xmm4, xmm5
punpckhdq xmm6, xmm7
movdqa xmm1, xmm8
movdqa xmm3, xmm0
movdqa xmm5, xmm10
movdqa xmm7, xmm4
punpcklqdq xmm1, xmm9
punpcklqdq xmm5, xmm11
punpckhqdq xmm8, xmm9
punpckhqdq xmm10, xmm11
punpcklqdq xmm3, xmm2
punpcklqdq xmm7, xmm6
punpckhqdq xmm0, xmm2
punpckhqdq xmm4, xmm6
movdqu xmm2, xmmword [rsi + 0x20]
movdqu xmm6, xmmword [rsi + 0x30]
movdqu xmm9, xmmword [rsi + 0x60]
movdqu xmm11, xmmword [rsi + 0x70]
movdqu xmm12, xmmword [rsi + 0xa0]
movdqu xmm13, xmmword [rsi + 0xb0]
movdqu xmm14, xmmword [rsi + 0xe0]
movdqu xmm15, xmmword [rsi + 0xf0]
pxor xmm1, xmm2
pxor xmm5, xmm6
pxor xmm8, xmm9
pxor xmm10, xmm11
pxor xmm3, xmm12
pxor xmm7, xmm13
pxor xmm0, xmm14
pxor xmm4, xmm15
movdqu xmmword [rdx + 0x20], xmm1
movdqu xmmword [rdx + 0x30], xmm5
movdqu xmmword [rdx + 0x60], xmm8
movdqu xmmword [rdx + 0x70], xmm10
movdqu xmmword [rdx + 0xa0], xmm3
movdqu xmmword [rdx + 0xb0], xmm7
movdqu xmmword [rdx + 0xe0], xmm0
movdqu xmmword [rdx + 0xf0], xmm4
add rsi, 0x100
jmp 0x4a7504
movdqu xmmword [rdx], xmm5
movdqu xmmword [rdx + 0x10], xmm7
movdqu xmmword [rdx + 0x40], xmm8
movdqu xmmword [rdx + 0x50], xmm10
movdqu xmmword [rdx + 0x80], xmm1
movdqu xmmword [rdx + 0x90], xmm3
movdqu xmmword [rdx + 0xc0], xmm0
movdqu xmmword [rdx + 0xd0], xmm4
movdqa xmm0, xmmword [rbp + 0x180]
movdqa xmm1, xmmword [rbp + 0x190]
movdqa xmm2, xmmword [rbp + 0x1a0]
movdqa xmm3, xmmword [rbp + 0x1b0]
movdqa xmm4, xmmword [rbp + 0x1c0]
movdqa xmm5, xmmword [rbp + 0x1d0]
movdqa xmm6, xmmword [rbp + 0x1e0]
movdqa xmm7, xmmword [rbp + 0x1f0]
movdqa xmm8, xmm0
movdqa xmm9, xmm2
movdqa xmm10, xmm4
movdqa xmm11, xmm6
punpckldq xmm8, xmm1
punpckldq xmm9, xmm3
punpckhdq xmm0, xmm1
punpckhdq xmm2, xmm3
punpckldq xmm10, xmm5
punpckldq xmm11, xmm7
punpckhdq xmm4, xmm5
punpckhdq xmm6, xmm7
movdqa xmm1, xmm8
movdqa xmm3, xmm0
movdqa xmm5, xmm10
movdqa xmm7, xmm4
punpcklqdq xmm1, xmm9
punpcklqdq xmm5, xmm11
punpckhqdq xmm8, xmm9
punpckhqdq xmm10, xmm11
punpcklqdq xmm3, xmm2
punpcklqdq xmm7, xmm6
punpckhqdq xmm0, xmm2
punpckhqdq xmm4, xmm6
movdqu xmmword [rdx + 0x20], xmm1
movdqu xmmword [rdx + 0x30], xmm5
movdqu xmmword [rdx + 0x60], xmm8
movdqu xmmword [rdx + 0x70], xmm10
movdqu xmmword [rdx + 0xa0], xmm3
movdqu xmmword [rdx + 0xb0], xmm7
movdqu xmmword [rdx + 0xe0], xmm0
movdqu xmmword [rdx + 0xf0], xmm4
add rdx, 0x100
sub rcx, 0x100
cmp rcx, 0x100
jae 0x4a6ca9
movdqa xmm6, xmmword [rbp + 0x50]
movdqa xmm7, xmmword [rbp + 0x60]
movdqa xmm8, xmmword [rbp]
movdqa xmm9, xmmword [rbp + 0x10]
movdqa xmm10, xmmword [rbp + 0x20]
movdqa xmm11, xmmword [rbp + 0x30]
mov r9, 1
movq xmm5, r9
and rcx, rcx
je 0x4a76f3
cmp rcx, 0x40
jae 0x4a7586
mov r9, rdx
and rsi, rsi
je 0x4a7583
mov r10, rcx
mov rdx, rbp
add rsi, r10
add rdx, r10
neg r10
mov al, byte [rsi + r10]
mov byte [rdx + r10], al
inc r10
jne 0x4a7573
mov rsi, rbp
mov rdx, rbp
movdqa xmm0, xmm8
movdqa xmm1, xmm9
movdqa xmm2, xmm10
movdqa xmm3, xmm11
mov rax, 0x14
paddd xmm0, xmm1
pxor xmm3, xmm0
pshufb xmm3, xmm6
paddd xmm2, xmm3
pxor xmm1, xmm2
movdqa xmm4, xmm1
pslld xmm4, 0xc
psrld xmm1, 0x14
pxor xmm1, xmm4
paddd xmm0, xmm1
pxor xmm3, xmm0
pshufb xmm3, xmm7
pshufd xmm0, xmm0, 0x93
paddd xmm2, xmm3
pshufd xmm3, xmm3, 0x4e
pxor xmm1, xmm2
pshufd xmm2, xmm2, 0x39
movdqa xmm4, xmm1
pslld xmm4, 7
psrld xmm1, 0x19
pxor xmm1, xmm4
paddd xmm0, xmm1
pxor xmm3, xmm0
pshufb xmm3, xmm6
paddd xmm2, xmm3
pxor xmm1, xmm2
movdqa xmm4, xmm1
pslld xmm4, 0xc
psrld xmm1, 0x14
pxor xmm1, xmm4
paddd xmm0, xmm1
pxor xmm3, xmm0
pshufb xmm3, xmm7
pshufd xmm0, xmm0, 0x39
paddd xmm2, xmm3
pshufd xmm3, xmm3, 0x4e
pxor xmm1, xmm2
pshufd xmm2, xmm2, 0x93
movdqa xmm4, xmm1
pslld xmm4, 7
psrld xmm1, 0x19
pxor xmm1, xmm4
sub rax, 2
jne 0x4a75a1
paddd xmm0, xmm8
paddd xmm1, xmm9
paddd xmm2, xmm10
paddd xmm3, xmm11
and rsi, rsi
je 0x4a76ad
movdqu xmm12, xmmword [rsi]
movdqu xmm13, xmmword [rsi + 0x10]
movdqu xmm14, xmmword [rsi + 0x20]
movdqu xmm15, xmmword [rsi + 0x30]
pxor xmm0, xmm12
pxor xmm1, xmm13
pxor xmm2, xmm14
pxor xmm3, xmm15
add rsi, 0x40
movdqu xmmword [rdx], xmm0
movdqu xmmword [rdx + 0x10], xmm1
movdqu xmmword [rdx + 0x20], xmm2
movdqu xmmword [rdx + 0x30], xmm3
paddq xmm11, xmm5
cmp rcx, 0x40
jbe 0x4a76d8
add rdx, 0x40
sub rcx, 0x40
jmp 0x4a7548
cmp rcx, 0x40
je 0x4a76f3
add r9, rcx
add rdx, rcx
neg rcx
mov al, byte [rdx + rcx]
mov byte [r9 + rcx], al
inc rcx
jne 0x4a76e7
movdqu xmmword [rdi + 0x20], xmm11
mov rbp, qword [rsp + 0x240]
add rsp, 0x248
ret