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

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x18
mov rbx, r9
test r9, r9
jne 0x18017801e
mov eax, 0x6b206574
mov r9d, 0x61707865
mov r10d, 0x3320646e
mov r11d, 0x79622d32
jmp 0x1801780ae
movzx r9d, byte [r9 + 3]
movzx eax, byte [rbx + 2]
movzx ecx, byte [rbx + 0xe]
movzx r10d, byte [rbx + 7]
movzx r11d, byte [rbx + 0xb]
shl r9d, 8
or r9d, eax
shl r10d, 8
movzx eax, byte [rbx + 1]
shl r11d, 8
shl r9d, 8
or r9d, eax
movzx eax, byte [rbx]
shl r9d, 8
or r9d, eax
movzx eax, byte [rbx + 6]
or r10d, eax
movzx eax, byte [rbx + 5]
shl r10d, 8
or r10d, eax
movzx eax, byte [rbx + 4]
shl r10d, 8
or r10d, eax
movzx eax, byte [rbx + 0xa]
or r11d, eax
movzx eax, byte [rbx + 9]
shl r11d, 8
or r11d, eax
movzx eax, byte [rbx + 8]
shl r11d, 8
or r11d, eax
movzx eax, byte [rbx + 0xf]
shl eax, 8
or eax, ecx
movzx ecx, byte [rbx + 0xd]
shl eax, 8
or eax, ecx
movzx ecx, byte [rbx + 0xc]
shl eax, 8
or eax, ecx
movzx ecx, byte [r8 + 2]
movzx r14d, byte [r8 + 3]
movzx r15d, byte [r8 + 7]
movzx r12d, byte [r8 + 0xb]
movzx ebp, byte [r8 + 0xf]
movzx r13d, byte [r8 + 0x13]
movzx edx, byte [r8 + 0x17]
shl edx, 8
shl r14d, 8
or r14d, ecx
shl r15d, 8
movzx ecx, byte [r8 + 1]
shl r12d, 8
shl ebp, 8
shl r13d, 8
shl r14d, 8
or r14d, ecx
movzx ecx, byte [r8]
shl r14d, 8
or r14d, ecx
movzx ecx, byte [r8 + 6]
or r15d, ecx
movzx ecx, byte [r8 + 5]
shl r15d, 8
or r15d, ecx
movzx ecx, byte [r8 + 4]
shl r15d, 8
or r15d, ecx
movzx ecx, byte [r8 + 0xa]
or r12d, ecx
movzx ecx, byte [r8 + 9]
shl r12d, 8
or r12d, ecx
movzx ecx, byte [r8 + 8]
shl r12d, 8
or r12d, ecx
movzx ecx, byte [r8 + 0xe]
or ebp, ecx
movzx ecx, byte [r8 + 0xd]
shl ebp, 8
or ebp, ecx
movzx ecx, byte [r8 + 0xc]
shl ebp, 8
or ebp, ecx
movzx ecx, byte [r8 + 0x12]
or r13d, ecx
movzx ecx, byte [r8 + 0x11]
shl r13d, 8
or r13d, ecx
movzx ecx, byte [r8 + 0x10]
shl r13d, 8
or r13d, ecx
movzx ecx, byte [r8 + 0x16]
or edx, ecx
movzx ecx, byte [r8 + 0x15]
shl edx, 8
or edx, ecx
movzx ecx, byte [r8 + 0x14]
shl edx, 8
or edx, ecx
movzx ecx, byte [r8 + 0x1a]
mov dword [rsp], edx
movzx edx, byte [r8 + 0x1b]
shl edx, 8
or edx, ecx
movzx ecx, byte [r8 + 0x19]
shl edx, 8
or edx, ecx
movzx ecx, byte [r8 + 0x18]
shl edx, 8
or edx, ecx
movzx ecx, byte [r8 + 0x1e]
mov dword [rsp + 0x70], edx
movzx edx, byte [r8 + 0x1f]
shl edx, 8
or edx, ecx
movzx ecx, byte [r8 + 0x1d]
shl edx, 8
or edx, ecx
movzx ecx, byte [r8 + 0x1c]
shl edx, 8
mov rsi, qword [rsp + 0x68]
or edx, ecx
mov dword [rsp + 0x78], edx
mov qword [rsp + 8], 0xa
movzx ecx, byte [rsi + 2]
movzx edx, byte [rsi + 3]
movzx r8d, byte [rsi + 7]
movzx ebx, byte [rsi + 0xb]
movzx edi, byte [rsi + 0xf]
shl edx, 8
or edx, ecx
shl r8d, 8
movzx ecx, byte [rsi + 1]
shl ebx, 8
shl edi, 8
shl edx, 8
or edx, ecx
movzx ecx, byte [rsi]
shl edx, 8
or edx, ecx
movzx ecx, byte [rsi + 6]
or r8d, ecx
movzx ecx, byte [rsi + 5]
shl r8d, 8
or r8d, ecx
movzx ecx, byte [rsi + 4]
shl r8d, 8
or r8d, ecx
movzx ecx, byte [rsi + 0xa]
or ebx, ecx
movzx ecx, byte [rsi + 9]
shl ebx, 8
or ebx, ecx
movzx ecx, byte [rsi + 8]
shl ebx, 8
or ebx, ecx
movzx ecx, byte [rsi + 0xe]
or edi, ecx
movzx ecx, byte [rsi + 0xd]
shl edi, 8
or edi, ecx
movzx ecx, byte [rsi + 0xc]
mov esi, dword [rsp]
shl edi, 8
or edi, ecx
nop dword [rax + rax]
lea ecx, [rsi + r9]
ror ecx, 0x19
xor ebp, ecx
lea ecx, [r9 + rbp]
ror ecx, 0x17
xor ebx, ecx
lea ecx, [rbx + rbp]
ror ecx, 0x13
xor esi, ecx
lea ecx, [rbx + rsi]
ror ecx, 0xe
xor r9d, ecx
lea ecx, [r14 + r10]
ror ecx, 0x19
xor edi, ecx
lea ecx, [rdi + r10]
ror ecx, 0x17
xor dword [rsp + 0x70], ecx
mov ecx, dword [rsp + 0x70]
add ecx, edi
ror ecx, 0x13
xor r14d, ecx
mov ecx, dword [rsp + 0x70]
add ecx, r14d
ror ecx, 0xe
xor r10d, ecx
lea ecx, [rdx + r11]
ror ecx, 0x19
xor dword [rsp + 0x78], ecx
mov ecx, dword [rsp + 0x78]
add ecx, r11d
ror ecx, 0x17
xor r15d, ecx
mov ecx, dword [rsp + 0x78]
add ecx, r15d
ror ecx, 0x13
xor edx, ecx
lea ecx, [rdx + r15]
ror ecx, 0xe
xor r11d, ecx
lea ecx, [rax + r13]
ror ecx, 0x19
xor r12d, ecx
lea ecx, [r12 + rax]
ror ecx, 0x17
xor r8d, ecx
lea ecx, [r8 + r12]
ror ecx, 0x13
xor r13d, ecx
lea ecx, [r8 + r13]
ror ecx, 0xe
xor eax, ecx
lea ecx, [r12 + r9]
ror ecx, 0x19
xor r14d, ecx
lea ecx, [r14 + r9]
ror ecx, 0x17
xor r15d, ecx
lea ecx, [r15 + r14]
ror ecx, 0x13
xor r12d, ecx
lea ecx, [r12 + r15]
ror ecx, 0xe
xor r9d, ecx
lea ecx, [r10 + rbp]
ror ecx, 0x19
xor edx, ecx
lea ecx, [rdx + r10]
ror ecx, 0x17
xor r8d, ecx
lea ecx, [r8 + rdx]
ror ecx, 0x13
xor ebp, ecx
lea ecx, [r8 + rbp]
ror ecx, 0xe
xor r10d, ecx
lea ecx, [rdi + r11]
ror ecx, 0x19
xor r13d, ecx
lea ecx, [r11 + r13]
ror ecx, 0x17
xor ebx, ecx
lea ecx, [rbx + r13]
ror ecx, 0x13
xor edi, ecx
mov dword [rsp + 0x68], edi
lea ecx, [rdi + rbx]
mov edi, dword [rsp + 0x78]
ror ecx, 0xe
xor r11d, ecx
mov ecx, dword [rsp + 0x78]
add ecx, eax
ror ecx, 0x19
xor esi, ecx
lea ecx, [rsi + rax]
ror ecx, 0x17
xor dword [rsp + 0x70], ecx
mov ecx, dword [rsp + 0x70]
add ecx, esi
ror ecx, 0x13
xor edi, ecx
mov ecx, dword [rsp + 0x70]
add ecx, edi
mov dword [rsp + 0x78], edi
mov edi, dword [rsp + 0x68]
ror ecx, 0xe
xor eax, ecx
sub qword [rsp + 8], 1
jne 0x180178280
mov rsi, qword [rsp + 0x60]
mov byte [rsi + 0xc], al
shr eax, 8
mov byte [rsi], r9b
shr r9d, 8
mov byte [rsi + 4], r10b
shr r10d, 8
mov byte [rsi + 8], r11b
shr r11d, 8
mov byte [rsi + 0x10], dl
shr edx, 8
mov byte [rsi + 0x14], r8b
shr r8d, 8
mov byte [rsi + 0x18], bl
shr ebx, 8
mov byte [rsi + 0x1c], dil
shr edi, 8
mov byte [rsi + 0xd], al
shr eax, 8
mov byte [rsi + 1], r9b
shr r9d, 8
mov byte [rsi + 5], r10b
shr r10d, 8
mov byte [rsi + 9], r11b
shr r11d, 8
mov byte [rsi + 0x11], dl
shr edx, 8
mov byte [rsi + 0x15], r8b
shr r8d, 8
mov byte [rsi + 0x19], bl
shr ebx, 8
mov byte [rsi + 0x1d], dil
shr edi, 8
mov byte [rsi + 0xe], al
shr eax, 8
mov byte [rsi + 2], r9b
shr r9d, 8
mov byte [rsi + 6], r10b
shr r10d, 8
mov byte [rsi + 0xa], r11b
shr r11d, 8
mov byte [rsi + 0x12], dl
shr edx, 8
mov byte [rsi + 0x16], r8b
shr r8d, 8
mov byte [rsi + 0x1a], bl
shr ebx, 8
mov byte [rsi + 0x1e], dil
shr edi, 8
mov byte [rsi + 0xf], al
xor eax, eax
mov byte [rsi + 3], r9b
mov byte [rsi + 7], r10b
mov byte [rsi + 0xb], r11b
mov byte [rsi + 0x13], dl
mov byte [rsi + 0x17], r8b
mov byte [rsi + 0x1b], bl
mov byte [rsi + 0x1f], dil
add rsp, 0x18
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret