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

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x48
mov rsi, rdx
mov ebx, ecx
cmp byte [0x14050f20c], 0
je 0x140194cc5
mov rax, qword [0x14050f278]
mov ecx, 5
call qword [case.0x1403053b8.0]
mov rdi, rax
test rax, rax
je 0x140194cd8
mov rax, qword [0x14050f288]
mov rcx, rdi
call qword [case.0x1403053b8.0]
test ebx, ebx
jle 0x140194cb6
test rsi, rsi
je 0x140194cb6
xor ebp, ebp
cmp dword [0x1405217e8], 0
je 0x1401948e2
mov al, byte [0x140521868]
movzx ecx, al
cmp ebx, ecx
ja 0x140194996
sub ecx, ebx
movsxd rax, ecx
lea rcx, [0x1405217e8]
lea rdx, [rax + rcx]
add rdx, 0x40
movsxd rbx, ebx
mov rcx, rsi
mov r8, rbx
call fcn.1402d2020
sub byte [0x140521868], bl
test bpl, bpl
jne 0x140194cf2
mov rax, qword [0x14050f298]
mov rdx, qword [case.0x1403053b8.0]
mov rcx, rdi
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp rdx
cmp byte [0x14050f20c], 0
je 0x140194d03
mov rax, qword [0x14050f278]
mov ecx, 2
call qword [case.0x1403053b8.0]
test rax, rax
je 0x140194d03
mov r15, rax
mov rax, qword [0x14050f288]
mov rcx, r15
call qword [case.0x1403053b8.0]
mov r14, qword [0x1405217c0]
mov rax, qword [0x14050f298]
mov rcx, r15
call qword [case.0x1403053b8.0]
movaps xmm0, xmmword [str.expand_32_byte_k]
movups xmmword [0x1405217e8], xmm0
test r14, r14
je 0x140194d0f
mov eax, dword [0x14050f3b8]
test eax, eax
jne 0x140194d29
mov rax, qword [r14 + 0x68]
lea r8, [0x1405217f8]
mov rcx, r14
mov edx, 0x2c
call qword [case.0x1403053b8.0]
mov eax, dword [0x140521818]
mov dword [0x140521824], eax
mov dword [0x140521818], 0
mov byte [0x140521868], 0
xor eax, eax
jmp 0x140194882
mov qword [rsp + 0x40], rdi
mov dword [rsp + 0x2c], ebp
test al, al
jne 0x140194c8e
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x38], rsi
mov eax, dword [0x140521818]
inc eax
mov dword [0x140521818], eax
mov r9d, dword [0x1405217e8]
mov ebx, dword [0x1405217ec]
mov edi, dword [0x1405217f0]
mov esi, dword [0x1405217f4]
mov ebp, dword [0x1405217f8]
mov r14d, dword [0x1405217fc]
mov r13d, dword [0x140521800]
mov r12d, dword [0x140521804]
mov r15d, dword [0x140521808]
mov r10d, dword [0x14052180c]
mov ecx, dword [0x140521810]
mov dword [rsp + 0x20], ecx
mov ecx, dword [0x140521814]
mov dword [rsp + 0x24], ecx
mov r8d, dword [0x14052181c]
mov edx, dword [0x140521820]
mov r11d, 0xa
mov ecx, dword [0x140521824]
mov dword [rsp + 0x30], r11d
add r9d, ebp
xor eax, r9d
rol eax, 0x10
add r15d, eax
xor ebp, r15d
rol ebp, 0xc
add r9d, ebp
xor eax, r9d
rol eax, 8
add r15d, eax
xor ebp, r15d
rol ebp, 7
add ebx, r14d
xor r8d, ebx
rol r8d, 0x10
add r10d, r8d
xor r14d, r10d
rol r14d, 0xc
add ebx, r14d
xor r8d, ebx
rol r8d, 8
add r10d, r8d
mov dword [rsp + 0x34], r10d
xor r14d, r10d
rol r14d, 7
add edi, r13d
xor edx, edi
rol edx, 0x10
mov r11d, dword [rsp + 0x20]
add r11d, edx
xor r13d, r11d
rol r13d, 0xc
add edi, r13d
xor edx, edi
rol edx, 8
add r11d, edx
xor r13d, r11d
rol r13d, 7
add esi, r12d
xor ecx, esi
rol ecx, 0x10
mov r10d, dword [rsp + 0x24]
add r10d, ecx
xor r12d, r10d
rol r12d, 0xc
add esi, r12d
xor ecx, esi
rol ecx, 8
add r10d, ecx
xor r12d, r10d
rol r12d, 7
add r9d, r14d
xor ecx, r9d
rol ecx, 0x10
add r11d, ecx
xor r14d, r11d
rol r14d, 0xc
add r9d, r14d
xor ecx, r9d
rol ecx, 8
add r11d, ecx
mov dword [rsp + 0x20], r11d
xor r14d, r11d
mov r11d, dword [rsp + 0x30]
rol r14d, 7
add ebx, r13d
xor eax, ebx
rol eax, 0x10
add r10d, eax
xor r13d, r10d
rol r13d, 0xc
add ebx, r13d
xor eax, ebx
rol eax, 8
add r10d, eax
mov dword [rsp + 0x24], r10d
xor r13d, r10d
mov r10d, dword [rsp + 0x34]
rol r13d, 7
add edi, r12d
xor r8d, edi
rol r8d, 0x10
add r15d, r8d
xor r12d, r15d
rol r12d, 0xc
add edi, r12d
xor r8d, edi
rol r8d, 8
add r15d, r8d
xor r12d, r15d
rol r12d, 7
add esi, ebp
xor edx, esi
rol edx, 0x10
add r10d, edx
xor ebp, r10d
rol ebp, 0xc
add esi, ebp
xor edx, esi
rol edx, 8
add r10d, edx
xor ebp, r10d
rol ebp, 7
dec r11d
jne 0x140194a2d
add r9d, dword [0x1405217e8]
mov dword [0x140521828], r9d
add ebx, dword [0x1405217ec]
mov dword [0x14052182c], ebx
add edi, dword [0x1405217f0]
mov dword [0x140521830], edi
add esi, dword [0x1405217f4]
mov dword [0x140521834], esi
add ebp, dword [0x1405217f8]
mov dword [0x140521838], ebp
add r14d, dword [0x1405217fc]
mov dword [0x14052183c], r14d
add r13d, dword [0x140521800]
mov dword [0x140521840], r13d
add r12d, dword [0x140521804]
mov dword [0x140521844], r12d
add r15d, dword [0x140521808]
mov dword [0x140521848], r15d
add r10d, dword [0x14052180c]
mov dword [0x14052184c], r10d
mov r9d, dword [rsp + 0x20]
add r9d, dword [0x140521810]
mov dword [0x140521850], r9d
mov r9d, dword [rsp + 0x24]
add r9d, dword [0x140521814]
mov dword [0x140521854], r9d
add eax, dword [0x140521818]
mov dword [0x140521858], eax
add r8d, dword [0x14052181c]
mov dword [0x14052185c], r8d
add edx, dword [0x140521820]
mov dword [0x140521860], edx
add ecx, dword [0x140521824]
mov dword [0x140521864], ecx
mov byte [0x140521868], 0x40
mov ecx, 0x40
mov al, 0x40
mov ebx, dword [rsp + 0x28]
cmp ebx, 0x40
mov rsi, qword [rsp + 0x38]
mov rdi, qword [rsp + 0x40]
mov ebp, dword [rsp + 0x2c]
jle 0x14019488d
jmp 0x14019499f
movzx r8d, al
mov rcx, rsi
lea rdx, [0x140521828]
call fcn.1402d2020
movzx eax, byte [0x140521868]
sub ebx, eax
mov dword [rsp + 0x28], ebx
add rsi, rax
jmp 0x1401949ab
mov dword [0x1405217e8], 0
jmp 0x1401948be
test ebx, ebx
jle 0x140194ce8
test rsi, rsi
je 0x140194ce8
xor edi, edi
mov bpl, 1
jmp 0x140194873
test ebx, ebx
jle 0x140194ce8
mov bpl, 1
test rsi, rsi
jne 0x140194873
mov dword [0x1405217e8], 0
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov r14, qword [0x1405217c0]
jmp 0x140194934
xorps xmm0, xmm0
movups xmmword [0x140521814], xmm0
movups xmmword [0x140521808], xmm0
movups xmmword [0x1405217f8], xmm0
jmp 0x140194d4b
xorps xmm0, xmm0
movups xmmword [0x14052180c], xmm0
movups xmmword [0x1405217fc], xmm0
mov qword [0x14052181c], 0
mov dword [0x1405217f8], eax
xor eax, eax
jmp 0x140194978