Function at 0x100016c70
Capabilities:
Encode data using xor
Encrypt data using salsa20 or chacha
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x170
mov rax, qword [0x10011e450]
xor rax, rsp
mov qword [rsp + 0x160], rax
lea r8, [0x100109088]
mov qword [rsp + 0x88], rcx
mov qword [rsp + 0x78], rdx
lea rbp, [rcx + 0x18]
mov edx, 0xfffffff
lea r11, [0x100000000]
mov rax, qword [rbp]
lea r9, [rax + 0xd]
mov esi, dword [rax + 9]
lea rdi, [r9 - 1]
mov ebx, dword [rax + 5]
and rbx, rdx
mov ecx, dword [rax + 1]
shr rcx, 1
and rsi, rdx
add rbx, r11
and rcx, rdx
mov qword [rsp + 0x108], rbx
xor r12d, r12d
cmp rdi, r8
mov qword [rsp + 0xf8], rcx
mov qword [rsp + 0x70], rbp
mov qword [rsp + 0xf0], rsi
jb 0x100016d3f
mov eax, dword [0x1000a5f24]
mov ecx, dword [0x10000c52c]
imul ecx, eax
mov eax, ecx
add rax, r8
cmp rdi, rax
jae 0x100016d3f
mov rax, rdi
mov ecx, dword [0x1000a5f24]
sub rax, r8
cqo
idiv rcx
mov edx, dword [0x1000a5f24]
imul rdx, rax
add r8, rdx
jmp 0x100016d42
mov r8, r12
cmp r8, r12
jne 0x100016d51
mov r8, rdi
and r8, 0xffffffffffff0000
sub r9, r8
lea rax, [r9 - 0x40]
cmp rax, r12
mov r10d, ebx
cmovl rax, r12
lea rdi, [r8 + rax]
sub r10d, r11d
xor eax, eax
mov r11d, dword [0x1000a5f24]
lea ecx, [rax + 0x40]
sub r11, rsi
inc r11
rep stosb byte [rdi], al
cmp r11, r12
mov rdi, r12
mov r9, r11
je 0x100016dbe
mov rdx, qword [0x1001241b0]
imul rdx, rdx, 0x343fd
shl rdi, 0x10
shr r9, 0x10
add rdx, 0x269ec3
mov rcx, rdx
shr rcx, 0x10
movzx eax, cx
or rdi, rax
cmp r9, r12
jne 0x100016d8f
mov qword [0x1001241b0], rdx
mov ecx, r10d
xor edx, edx
mov rax, rdi
div r11
lea r12, [rdx + r8]
mov rdx, rsi
mov r8, r12
mov qword [rsp + 0x100], r12
mov eax, 0x10f0c7ee
xor r9d, r9d
cmp rsi, r9
mov qword [rsp + 0xa0], rsi
mov byte [rsp + 0x20], r9b
mov dil, r9b
mov qword [rsp + 0x80], rbx
mov qword [rsp + 0xa8], r12
je 0x100017243
movdqu xmm0, xmmword [rsi + rbx]
mov dword [rsp + 0xc8], r9d
mov dword [rsp + 0xcc], r9d
mov rbp, r12
mov dword [rsp + 0xd0], r9d
mov dword [rsp + 0xd4], r9d
movdqu xmmword [rsp + 0x110], xmm0
mov r8, qword [rsp + 0x110]
mov rcx, qword [rsp + 0x118]
mov dword [rsp + 0xb4], r8d
mov rdx, r8
mov rax, rcx
shr rax, 0x20
mov dword [rsp + 0xbc], ecx
mov dword [rsp + 0xc0], eax
shr rdx, 0x20
mov dword [rsp + 0xe8], eax
mov eax, dword [0x10000a5b0]
mov dword [rsp + 0xb0], eax
mov eax, dword [0x10000a5b4]
mov dword [rsp + 0xb8], edx
mov dword [rsp + 0xc4], eax
mov eax, dword [0x10000a5b8]
mov dword [rsp + 0xdc], r8d
mov dword [rsp + 0xd8], eax
mov eax, dword [0x10000a5bc]
mov dword [rsp + 0xe0], edx
mov dword [rsp + 0xec], eax
mov dword [rsp + 0xe4], ecx
lea rax, [rsp + 0x120]
sub rbp, rax
mov rax, rbx
sub rax, r12
lea ebx, [r9 + 0x40]
mov qword [rsp + 0x110], rax
mov r8, rbx
lea rdx, [rsp + 0xb0]
not rdx
lea rcx, [rsp + 0x30]
mov qword [rsp + 0x90], rbp
call fcn.10001511c
mov ebp, dword [rsp + 0x3c]
mov r8d, dword [rsp + 0x64]
mov ebx, dword [rsp + 0x50]
mov r12d, dword [rsp + 0x54]
mov edx, dword [rsp + 0x68]
mov r14d, dword [rsp + 0x4c]
mov eax, dword [rsp + 0x44]
mov r11d, dword [rsp + 0x58]
mov esi, dword [rsp + 0x40]
mov edi, dword [rsp + 0x38]
mov r10d, dword [rsp + 0x5c]
mov r15d, dword [rsp + 0x48]
mov r9d, dword [rsp + 0x60]
mov ecx, dword [rsp + 0x6c]
mov dword [rsp + 0x2c], eax
mov eax, dword [rsp + 0x34]
mov r13d, dword [rsp + 0x2c]
mov dword [rsp + 0x24], eax
mov eax, dword [rsp + 0x30]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x98], 2
add eax, r9d
rol eax, 7
xor esi, eax
mov eax, dword [rsp + 0x28]
add eax, esi
rol eax, 9
xor ebx, eax
lea eax, [rbx + rsi]
rol eax, 0xd
xor r9d, eax
lea eax, [rbx + r9]
ror eax, 0xe
mov dword [rsp + 0x2c], r9d
xor dword [rsp + 0x28], eax
mov r9d, dword [rsp + 0x28]
mov eax, dword [rsp + 0x24]
add eax, r13d
rol eax, 7
xor r12d, eax
lea eax, [r13 + r12]
rol eax, 9
xor r8d, eax
lea eax, [r8 + r12]
rol eax, 0xd
xor dword [rsp + 0x24], eax
mov eax, dword [rsp + 0x24]
add eax, r8d
ror eax, 0xe
xor r13d, eax
lea eax, [r15 + r11]
rol eax, 7
xor edx, eax
lea eax, [r11 + rdx]
rol eax, 9
xor edi, eax
lea eax, [rdi + rdx]
rol eax, 0xd
xor r15d, eax
lea eax, [rdi + r15]
ror eax, 0xe
xor r11d, eax
lea eax, [r10 + rcx]
rol eax, 7
xor ebp, eax
lea eax, [rcx + rbp]
rol eax, 9
xor r14d, eax
lea eax, [r14 + rbp]
rol eax, 0xd
xor r10d, eax
lea eax, [r14 + r10]
ror eax, 0xe
xor ecx, eax
mov eax, dword [rsp + 0x28]
add eax, ebp
rol eax, 7
xor dword [rsp + 0x24], eax
mov eax, dword [rsp + 0x24]
mov dword [rsp + 0x34], eax
add eax, r9d
rol eax, 9
xor edi, eax
mov eax, dword [rsp + 0x24]
add eax, edi
rol eax, 0xd
xor ebp, eax
lea eax, [rbp + rdi]
ror eax, 0xe
xor r9d, eax
mov dword [rsp + 0x28], r9d
mov eax, r9d
mov dword [rsp + 0x30], eax
mov r9d, dword [rsp + 0x2c]
lea eax, [r13 + rsi]
rol eax, 7
xor r15d, eax
lea eax, [r15 + r13]
rol eax, 9
xor r14d, eax
lea eax, [r15 + r14]
rol eax, 0xd
xor esi, eax
lea eax, [r14 + rsi]
ror eax, 0xe
xor r13d, eax
lea eax, [r11 + r12]
rol eax, 7
xor r10d, eax
lea eax, [r10 + r11]
rol eax, 9
xor ebx, eax
lea eax, [rbx + r10]
rol eax, 0xd
xor r12d, eax
lea eax, [rbx + r12]
ror eax, 0xe
xor r11d, eax
lea eax, [rcx + rdx]
rol eax, 7
xor r9d, eax
mov dword [rsp + 0x60], r9d
lea eax, [rcx + r9]
rol eax, 9
xor r8d, eax
lea eax, [r9 + r8]
rol eax, 0xd
xor edx, eax
lea eax, [rdx + r8]
ror eax, 0xe
xor ecx, eax
sub qword [rsp + 0x98], 1
mov eax, dword [rsp + 0x28]
jne 0x100016f6a
mov dword [rsp + 0x6c], ecx
mov dword [rsp + 0x54], r12d
mov r12, qword [rsp + 0x110]
xor ecx, ecx
mov dword [rsp + 0x50], ebx
mov dword [rsp + 0x4c], r14d
mov r14, qword [rsp + 0x80]
mov dword [rsp + 0x48], r15d
lea ebx, [rcx + 0x40]
mov r15, qword [rsp + 0xa8]
mov dword [rsp + 0x44], r13d
mov r13, qword [rsp + 0xa0]
mov dword [rsp + 0x40], esi
mov esi, dword [rsp + 0xd0]
mov dword [rsp + 0x3c], ebp
mov rbp, qword [rsp + 0x90]
mov dword [rsp + 0x38], edi
mov dil, byte [rsp + 0x20]
mov dword [rsp + 0x68], edx
mov dword [rsp + 0x64], r8d
mov dword [rsp + 0x5c], r10d
mov dword [rsp + 0x58], r11d
mov eax, dword [rsp + rcx + 0xb0]
add rcx, 4
add dword [rsp + rcx + 0x2c], eax
cmp rcx, rbx
jl 0x100017158
mov r8, rbx
lea rcx, [rsp + 0x120]
lea rdx, [rsp + 0x30]
not rdx
call fcn.10001511c
inc esi
mov dword [rsp + 0xd0], esi
cmp r13, rbx
jbe 0x1000171e4
lea rcx, [rsp + 0x120]
lea r8, [r12 + rbp]
mov rdx, rbx
mov al, byte [r8 + rcx]
xor al, byte [rcx]
mov byte [rcx + rbp], al
inc rcx
xor dil, al
sub rdx, 1
jne 0x1000171a1
sub r13, rbx
add r15, rbx
mov byte [rsp + 0x20], dil
mov qword [rsp + 0xa0], r13
add rbp, rbx
add r14, rbx
mov qword [rsp + 0x80], r14
mov qword [rsp + 0xa8], r15
jmp 0x100016ee6
mov r12, qword [rsp + 0x100]
xor r9d, r9d
mov rbx, qword [rsp + 0x108]
mov edx, r9d
mov rsi, qword [rsp + 0xf0]
cmp r13, r9
jbe 0x10001723e
lea rcx, [rsp + 0x120]
lea rax, [rsp + 0x120]
sub r14, rax
lea rax, [rsp + 0x120]
sub r15, rax
mov al, byte [rcx + r14]
inc edx
xor al, byte [rcx]
xor dil, al
mov byte [rcx + r15], al
mov eax, edx
inc rcx
cmp rax, r13
jb 0x100017225
mov rbp, qword [rsp + 0x70]
cmp dil, byte [rsi + rbx + 0x10]
je 0x10001730e
call fcn.100018aa8
mov rsi, qword [rsp + 0x88]
mov ebx, 0xffff
lea r10, [0x1000b5984]
mov r11, rax
mov rax, 0xfffffffffffff000
mov r8, rbp
mov qword [rsi + 0x10], r10
and r8, 0xfffffffffffffff8
and r11, rax
lea r9, [r8 + 0xfff]
and r9, rax
mov rax, qword [0x1001241b0]
xor edi, edi
imul rax, rax, 0x343fd
shl rdi, 0x10
shr rbx, 0x10
add rax, 0x269ec3
mov rcx, rax
shr rcx, 0x10
movzx edx, cx
or rdi, rdx
test rbx, rbx
jne 0x100017292
mov qword [0x1001241b0], rax
movabs rax, 0x8000800080008001
mul rdi
mov rax, qword [rsp + 0x78]
mov qword [rax + 0x98], r11
shr rdx, 0xf
imul rdx, rdx, 0xffff
sub rdi, rdx
inc rdi
mov qword [rax + 0xb0], rdi
mov qword [rsp + 0x78], rbx
jmp 0x100017304
mov rax, qword [rsp + 0x78]
mov qword [r8], rax
add r8, 8
cmp r8, r9
jb 0x1000172f8
jmp 0x100017428
lea r14, [0x100000000]
mov rbp, rbx
mov r13, r14
sub rbp, r12
mov rax, qword [0x10000cac8]
sub r13, rax
jne 0x100017333
cmp rbp, r9
je 0x100017404
lea r15, [0x1000e0550]
mov edi, r9d
mov rcx, qword [0x1000e0550]
mov r11, r12
sub r11, rbx
sub ebx, r14d
add esi, ebx
lea r8d, [rcx - 1]
cmp r8d, r9d
jl 0x100017385
lea eax, [r8 + rdi]
cdq
sub eax, edx
sar eax, 1
movsxd rdx, eax
mov r9d, dword [r15 + rdx*4 + 4]
and r9d, 0xfffffff
cmp ebx, r9d
jae 0x10001737b
lea r8d, [rax - 1]
jmp 0x100017380
jbe 0x10001738a
lea edi, [rax + 1]
cmp r8d, edi
jge 0x100017358
movsxd r10, edi
jmp 0x1000173fd
movsxd r10, eax
jmp 0x1000173fd
mov edx, dword [r15 + r10*4 + 4]
mov eax, edx
and eax, 0xfffffff
cmp eax, esi
jae 0x100017404
mov r8, rdx
mov edi, edx
sar edx, 0x1e
shl edi, 2
and r8d, 0xfffffff
and edx, 3
sar edi, 0x1e
add r8, r14
xor r9d, r9d
and edi, 3
sub edi, 1
je 0x1000173d9
sub edi, 1
je 0x1000173d4
cmp edi, 1
jne 0x1000173df
mov r9, r13
jmp 0x1000173df
mov r9, rbp
jmp 0x1000173df
mov r9, r13
sub r9, rbp
sub edx, 2
je 0x1000173ef
cmp edx, 1
jne 0x1000173fa
add qword [r8 + r11], r9
jmp 0x1000173f3
add dword [r8 + r11], r9d
mov rcx, qword [0x1000e0550]
inc r10
mov eax, ecx
cmp r10, rax
jb 0x10001738f
mov eax, dword [0x1000a5f24]
mov eax, 0xefde3af3
mov rsi, qword [rsp + 0x88]
mov rbp, qword [rsp + 0x70]
mov rdx, qword [rsp + 0xf8]
lea r10, [r12 + rdx]
mov qword [rsi + 0x10], r10
add qword [rbp], 0xd
mov rcx, qword [rsp + 0x160]
xor rcx, rsp
call fcn.1000d8a8c
mov rbx, qword [rsp + 0x1c0]
add rsp, 0x170
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret