Function at 0x140001e77
Capabilities:
Encrypt data using salsa20 or chacha

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x10
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov qword [rbp + 0x20], r8
mov qword [rbp + 0x28], r9
cmp qword [rbp + 0x20], 0x20
jne 0x140001e9f
lea rax, str.expand_32_byte_k
jmp 0x140001ea6
lea rax, str.expand_16_byte_k
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, byte [rax]
movsx edx, al
mov rax, qword [rbp - 8]
add rax, 1
movzx eax, byte [rax]
movsx eax, al
shl eax, 8
or edx, eax
mov rax, qword [rbp - 8]
add rax, 2
movzx eax, byte [rax]
movsx eax, al
shl eax, 0x10
or edx, eax
mov rax, qword [rbp - 8]
add rax, 3
movzx eax, byte [rax]
movsx eax, al
shl eax, 0x18
or edx, eax
mov rax, qword [rbp + 0x10]
mov dword [rax], edx
mov rax, qword [rbp - 8]
add rax, 4
movzx eax, byte [rax]
movsx edx, al
mov rax, qword [rbp - 8]
add rax, 5
movzx eax, byte [rax]
movsx eax, al
shl eax, 8
or edx, eax
mov rax, qword [rbp - 8]
add rax, 6
movzx eax, byte [rax]
movsx eax, al
shl eax, 0x10
or edx, eax
mov rax, qword [rbp - 8]
add rax, 7
movzx eax, byte [rax]
movsx eax, al
shl eax, 0x18
or edx, eax
mov rax, qword [rbp + 0x10]
mov dword [rax + 4], edx
mov rax, qword [rbp - 8]
add rax, 8
movzx eax, byte [rax]
movsx edx, al
mov rax, qword [rbp - 8]
add rax, 9
movzx eax, byte [rax]
movsx eax, al
shl eax, 8
or edx, eax
mov rax, qword [rbp - 8]
add rax, 0xa
movzx eax, byte [rax]
movsx eax, al
shl eax, 0x10
or edx, eax
mov rax, qword [rbp - 8]
add rax, 0xb
movzx eax, byte [rax]
movsx eax, al
shl eax, 0x18
or edx, eax
mov rax, qword [rbp + 0x10]
mov dword [rax + 8], edx
mov rax, qword [rbp - 8]
add rax, 0xc
movzx eax, byte [rax]
movsx edx, al
mov rax, qword [rbp - 8]
add rax, 0xd
movzx eax, byte [rax]
movsx eax, al
shl eax, 8
or edx, eax
mov rax, qword [rbp - 8]
add rax, 0xe
movzx eax, byte [rax]
movsx eax, al
shl eax, 0x10
or edx, eax
mov rax, qword [rbp - 8]
add rax, 0xf
movzx eax, byte [rax]
movsx eax, al
shl eax, 0x18
or edx, eax
mov rax, qword [rbp + 0x10]
mov dword [rax + 0xc], edx
mov rax, qword [rbp + 0x18]
movzx eax, byte [rax]
movzx edx, al
mov rax, qword [rbp + 0x18]
add rax, 1
movzx eax, byte [rax]
movzx eax, al
shl eax, 8
or edx, eax
mov rax, qword [rbp + 0x18]
add rax, 2
movzx eax, byte [rax]
movzx eax, al
shl eax, 0x10
or edx, eax
mov rax, qword [rbp + 0x18]
add rax, 3
movzx eax, byte [rax]
movzx eax, al
shl eax, 0x18
or edx, eax
mov rax, qword [rbp + 0x10]
mov dword [rax + 0x10], edx
mov rax, qword [rbp + 0x18]
add rax, 4
movzx eax, byte [rax]
movzx edx, al
mov rax, qword [rbp + 0x18]
add rax, 5
movzx eax, byte [rax]
movzx eax, al
shl eax, 8
or edx, eax
mov rax, qword [rbp + 0x18]
add rax, 6
movzx eax, byte [rax]
movzx eax, al
shl eax, 0x10
or edx, eax
mov rax, qword [rbp + 0x18]
add rax, 7
movzx eax, byte [rax]
movzx eax, al
shl eax, 0x18
or edx, eax
mov rax, qword [rbp + 0x10]
mov dword [rax + 0x14], edx
mov rax, qword [rbp + 0x18]
add rax, 8
movzx eax, byte [rax]
movzx edx, al
mov rax, qword [rbp + 0x18]
add rax, 9
movzx eax, byte [rax]
movzx eax, al
shl eax, 8
or edx, eax
mov rax, qword [rbp + 0x18]
add rax, 0xa
movzx eax, byte [rax]
movzx eax, al
shl eax, 0x10
or edx, eax
mov rax, qword [rbp + 0x18]
add rax, 0xb
movzx eax, byte [rax]
movzx eax, al
shl eax, 0x18
or edx, eax
mov rax, qword [rbp + 0x10]
mov dword [rax + 0x18], edx
mov rax, qword [rbp + 0x18]
add rax, 0xc
movzx eax, byte [rax]
movzx edx, al
mov rax, qword [rbp + 0x18]
add rax, 0xd
movzx eax, byte [rax]
movzx eax, al
shl eax, 8
or edx, eax
mov rax, qword [rbp + 0x18]
add rax, 0xe
movzx eax, byte [rax]
movzx eax, al
shl eax, 0x10
or edx, eax
mov rax, qword [rbp + 0x18]
add rax, 0xf
movzx eax, byte [rax]
movzx eax, al
shl eax, 0x18
or edx, eax
mov rax, qword [rbp + 0x10]
mov dword [rax + 0x1c], edx
mov eax, 0x10
mov edx, 0
div qword [rbp + 0x20]
mov rax, qword [rbp + 0x18]
add rax, rdx
movzx eax, byte [rax]
movzx ecx, al
mov eax, 0x10
mov edx, 0
div qword [rbp + 0x20]
mov rax, rdx
lea rdx, [rax + 1]
mov rax, qword [rbp + 0x18]
add rax, rdx
movzx eax, byte [rax]
movzx eax, al
shl eax, 8
or ecx, eax
mov eax, 0x10
mov edx, 0
div qword [rbp + 0x20]
mov rax, rdx
lea rdx, [rax + 2]
mov rax, qword [rbp + 0x18]
add rax, rdx
movzx eax, byte [rax]
movzx eax, al
shl eax, 0x10
or ecx, eax
mov eax, 0x10
mov edx, 0
div qword [rbp + 0x20]
mov rax, rdx
lea rdx, [rax + 3]
mov rax, qword [rbp + 0x18]
add rax, rdx
movzx eax, byte [rax]
movzx eax, al
shl eax, 0x18
or ecx, eax
mov edx, ecx
mov rax, qword [rbp + 0x10]
mov dword [rax + 0x20], edx
mov eax, 0x14
mov edx, 0
div qword [rbp + 0x20]
mov rax, qword [rbp + 0x18]
add rax, rdx
movzx eax, byte [rax]
movzx ecx, al
mov eax, 0x14
mov edx, 0
div qword [rbp + 0x20]
mov rax, rdx
lea rdx, [rax + 1]
mov rax, qword [rbp + 0x18]
add rax, rdx
movzx eax, byte [rax]
movzx eax, al
shl eax, 8
or ecx, eax
mov eax, 0x14
mov edx, 0
div qword [rbp + 0x20]
mov rax, rdx
lea rdx, [rax + 2]
mov rax, qword [rbp + 0x18]
add rax, rdx
movzx eax, byte [rax]
movzx eax, al
shl eax, 0x10
or ecx, eax
mov eax, 0x14
mov edx, 0
div qword [rbp + 0x20]
mov rax, rdx
lea rdx, [rax + 3]
mov rax, qword [rbp + 0x18]
add rax, rdx
movzx eax, byte [rax]
movzx eax, al
shl eax, 0x18
or ecx, eax
mov edx, ecx
mov rax, qword [rbp + 0x10]
mov dword [rax + 0x24], edx
mov eax, 0x18
mov edx, 0
div qword [rbp + 0x20]
mov rax, qword [rbp + 0x18]
add rax, rdx
movzx eax, byte [rax]
movzx ecx, al
mov eax, 0x18
mov edx, 0
div qword [rbp + 0x20]
mov rax, rdx
lea rdx, [rax + 1]
mov rax, qword [rbp + 0x18]
add rax, rdx
movzx eax, byte [rax]
movzx eax, al
shl eax, 8
or ecx, eax
mov eax, 0x18
mov edx, 0
div qword [rbp + 0x20]
mov rax, rdx
lea rdx, [rax + 2]
mov rax, qword [rbp + 0x18]
add rax, rdx
movzx eax, byte [rax]
movzx eax, al
shl eax, 0x10
or ecx, eax
mov eax, 0x18
mov edx, 0
div qword [rbp + 0x20]
mov rax, rdx
lea rdx, [rax + 3]
mov rax, qword [rbp + 0x18]
add rax, rdx
movzx eax, byte [rax]
movzx eax, al
shl eax, 0x18
or ecx, eax
mov edx, ecx
mov rax, qword [rbp + 0x10]
mov dword [rax + 0x28], edx
mov eax, 0x1c
mov edx, 0
div qword [rbp + 0x20]
mov rax, qword [rbp + 0x18]
add rax, rdx
movzx eax, byte [rax]
movzx ecx, al
mov eax, 0x1c
mov edx, 0
div qword [rbp + 0x20]
mov rax, rdx
lea rdx, [rax + 1]
mov rax, qword [rbp + 0x18]
add rax, rdx
movzx eax, byte [rax]
movzx eax, al
shl eax, 8
or ecx, eax
mov eax, 0x1c
mov edx, 0
div qword [rbp + 0x20]
mov rax, rdx
lea rdx, [rax + 2]
mov rax, qword [rbp + 0x18]
add rax, rdx
movzx eax, byte [rax]
movzx eax, al
shl eax, 0x10
or ecx, eax
mov eax, 0x1c
mov edx, 0
div qword [rbp + 0x20]
mov rax, rdx
lea rdx, [rax + 3]
mov rax, qword [rbp + 0x18]
add rax, rdx
movzx eax, byte [rax]
movzx eax, al
shl eax, 0x18
or ecx, eax
mov edx, ecx
mov rax, qword [rbp + 0x10]
mov dword [rax + 0x2c], edx
mov rax, qword [rbp + 0x10]
mov dword [rax + 0x30], 0
mov rax, qword [rbp + 0x10]
mov dword [rax + 0x34], 0
mov rax, qword [rbp + 0x28]
movzx eax, byte [rax]
movzx edx, al
mov rax, qword [rbp + 0x28]
add rax, 1
movzx eax, byte [rax]
movzx eax, al
shl eax, 8
or edx, eax
mov rax, qword [rbp + 0x28]
add rax, 2
movzx eax, byte [rax]
movzx eax, al
shl eax, 0x10
or edx, eax
mov rax, qword [rbp + 0x28]
add rax, 3
movzx eax, byte [rax]
movzx eax, al
shl eax, 0x18
or edx, eax
mov rax, qword [rbp + 0x10]
mov dword [rax + 0x38], edx
mov rax, qword [rbp + 0x28]
add rax, 4
movzx eax, byte [rax]
movzx edx, al
mov rax, qword [rbp + 0x28]
add rax, 5
movzx eax, byte [rax]
movzx eax, al
shl eax, 8
or edx, eax
mov rax, qword [rbp + 0x28]
add rax, 6
movzx eax, byte [rax]
movzx eax, al
shl eax, 0x10
or edx, eax
mov rax, qword [rbp + 0x28]
add rax, 7
movzx eax, byte [rax]
movzx eax, al
shl eax, 0x18
or edx, eax
mov rax, qword [rbp + 0x10]
mov dword [rax + 0x3c], edx
mov rax, qword [rbp + 0x10]
mov qword [rax + 0x80], 0
nop
add rsp, 0x10
pop rbp
ret