Function at 0x10001770c
Capabilities:
Allocate or change rwx memory
Encode data using xor
Encrypt data using salsa20 or chacha

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x180
mov rax, qword [0x10011e450]
xor rax, rsp
mov qword [rsp + 0x170], rax
mov r13d, 0x8000
mov r14d, 0x269ec3
mov r15d, 0xfffffff
mov eax, dword [0x1000a5f24]
mov rbp, qword [rcx + 0x10]
mov qword [rsp + 0x80], rdx
mov edx, dword [rbp + 1]
mov qword [rsp + 0x90], rcx
mov rcx, rax
shr rdx, 1
and rdx, r15
lea rsi, [rax + rdx - 1]
xor edx, edx
mov rax, rsi
div rcx
mov eax, dword [0x1000a5f24]
sub rsi, rdx
mov eax, dword [0x1000a5f24]
mov eax, dword [0x10000c52c]
mov r10d, dword [0x10000c52c]
test eax, eax
je 0x10001782b
mov edi, dword [0x10000c52c]
xor r8d, r8d
xor eax, eax
dec edi
inc rdi
mov r9, rdi
je 0x1000177e5
mov rcx, qword [0x1001241b0]
imul rcx, rcx, 0x343fd
shl rax, 0x10
shr r9, 0x10
add rcx, r14
mov rdx, rcx
shr rdx, 0x10
movzx edx, dx
or rax, rdx
test r9, r9
jne 0x1000177ba
mov qword [0x1001241b0], rcx
xor edx, edx
div rdi
test r10, r10
je 0x100017820
mov eax, 0x23ad
inc r8
mov ecx, 0xffffdc52
lock cmpxchg dword [r11 + rdx*4 + 0x127060], ecx
je 0x100017ded
mov ecx, dword [0x10000c52c]
lea rax, [rdx + 1]
xor edx, edx
div rcx
cmp r8, r10
jb 0x1000177ef
xor ebx, ebx
test rbx, rbx
jne 0x10001794e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r12d, eax
xor edi, edi
mov rcx, qword [0x10011ddb8]
inc rdi
mov r9, rcx
xor eax, eax
mov r8, rcx
test rcx, rcx
je 0x10001787f
mov rcx, qword [0x1001241b0]
imul rcx, rcx, 0x343fd
shl rax, 0x10
shr r9, 0x10
add rcx, r14
mov rdx, rcx
shr rdx, 0x10
movzx edx, dx
or rax, rdx
test r9, r9
jne 0x100017854
mov qword [0x1001241b0], rcx
mov r9d, 0x40
xor edx, edx
div r8
mov r8d, 0x3000
mov rcx, rdx
shl rcx, 0x10
add rcx, qword [0x100126f18]
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rbx, rax
test rax, rax
je 0x1000178e7
mov r8d, esi
lea r9, [0x100018ac0]
and qword [rsp + 0x28], 0
mov rcx, rax
mov rdx, rax
and qword [rsp + 0x20], 0
or rcx, 3
call qword [sym.imp.KERNEL32.dll_RtlInstallFunctionTableCallback]
test al, al
jne 0x1000178fb
xor edx, edx
mov r8d, r13d
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
cmp rdi, 0x11
jb 0x100017836
xor ebx, ebx
cmp rbx, 0x10000
jb 0x100017909
test bl, 3
je 0x10001792b
test rbx, rbx
je 0x100017929
mov rcx, rbx
or rcx, 3
call qword [sym.imp.KERNEL32.dll_RtlDeleteFunctionTable]
xor edx, edx
mov r8d, r13d
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor ebx, ebx
mov ecx, r12d
call qword [sym.imp.KERNEL32.dll_SetLastError]
test rbx, rbx
lea r11, [0x100000000]
je 0x100017783
mov rcx, rsi
xor eax, eax
mov rdi, rbx
rep stosb byte [rdi], al
mov eax, 0x329a7d7c
lea rax, [0x100000000]
mov edx, dword [rbp + 5]
mov r10d, dword [0x1000a5f24]
and edx, 7
xor edi, edi
lea rsi, [rdx + rbp + 9]
mov ebp, dword [rbp + 1]
mov qword [rsp + 0x110], rsi
mov r9d, esi
shr rbp, 1
and rbp, r15
sub r9d, eax
sub r10, rbp
mov qword [rsp + 0x100], rbp
inc r10
mov r8, r10
je 0x1000179ca
mov rdx, qword [0x1001241b0]
imul rdx, rdx, 0x343fd
shl rdi, 0x10
shr r8, 0x10
add rdx, r14
mov rcx, rdx
shr rcx, 0x10
movzx eax, cx
or rdi, rax
test r8, r8
jne 0x10001799f
mov qword [0x1001241b0], rdx
mov ecx, r9d
xor edx, edx
mov rax, rdi
div r10
add rbx, rdx
mov qword [rsp + 0x108], rbx
mov rdx, rbp
mov r8, rbx
mov eax, 0x232ea3ae
mov qword [rsp + 0xa8], rbp
xor dil, dil
test rbp, rbp
mov byte [rsp + 0x30], dil
mov qword [rsp + 0x88], rsi
mov qword [rsp + 0xb0], rbx
je 0x100017e5a
movdqu xmm0, xmmword [rsi + rbp]
and dword [rsp + 0xd8], 0
and dword [rsp + 0xdc], 0
mov r12, rbx
xor ebp, ebp
movdqu xmmword [rsp + 0x118], xmm0
mov r8, qword [rsp + 0x118]
mov rcx, qword [rsp + 0x120]
mov rdx, r8
mov rax, rcx
and dword [rsp + 0xe4], ebp
shr rax, 0x20
shr rdx, 0x20
mov dword [rsp + 0xc4], r8d
mov dword [rsp + 0xcc], ecx
mov dword [rsp + 0xd0], eax
mov dword [rsp + 0xf8], eax
mov eax, dword [0x10000a5b0]
mov dword [rsp + 0xc0], eax
mov eax, dword [0x10000a5b4]
mov dword [rsp + 0xc8], edx
mov dword [rsp + 0xd4], eax
mov eax, dword [0x10000a5b8]
mov dword [rsp + 0xec], r8d
mov dword [rsp + 0xe8], eax
mov eax, dword [0x10000a5bc]
mov dword [rsp + 0xf0], edx
mov dword [rsp + 0xfc], eax
mov dword [rsp + 0xf4], ecx
lea rax, [rsp + 0x130]
sub r12, rax
mov rax, rsi
lea esi, [rbp + 0x40]
mov dword [rsp + 0xe0], ebp
sub rax, rbx
mov qword [rsp + 0x118], rax
lea rdx, [rsp + 0xc0]
mov r8, rsi
not rdx
mov qword [rsp + 0x98], r12
lea rcx, [rsp + 0x40]
call fcn.10001511c
mov ebp, dword [rsp + 0x50]
mov esi, dword [rsp + 0x60]
mov r15d, dword [rsp + 0x58]
mov r10d, dword [rsp + 0x6c]
mov eax, dword [rsp + 0x54]
mov ebx, dword [rsp + 0x64]
mov edx, dword [rsp + 0x78]
mov r12d, dword [rsp + 0x4c]
mov r8d, dword [rsp + 0x74]
mov r11d, dword [rsp + 0x68]
mov r9d, dword [rsp + 0x70]
mov r14d, dword [rsp + 0x5c]
mov ecx, dword [rsp + 0x7c]
mov edi, dword [rsp + 0x48]
mov dword [rsp + 0x3c], eax
mov eax, dword [rsp + 0x44]
mov r13d, dword [rsp + 0x3c]
mov dword [rsp + 0x38], eax
mov eax, dword [rsp + 0x40]
mov dword [rsp + 0x34], eax
mov qword [rsp + 0xa0], 3
add eax, r9d
rol eax, 7
xor ebp, eax
mov eax, dword [rsp + 0x34]
add eax, ebp
rol eax, 9
xor esi, eax
lea eax, [rsi + rbp]
rol eax, 0xd
xor r9d, eax
mov dword [rsp + 0x3c], r9d
lea eax, [rsi + r9]
ror eax, 0xe
xor dword [rsp + 0x34], eax
mov r9d, dword [rsp + 0x34]
mov eax, dword [rsp + 0x38]
add eax, r13d
rol eax, 7
xor ebx, eax
lea eax, [r13 + rbx]
rol eax, 9
xor r8d, eax
lea eax, [r8 + rbx]
rol eax, 0xd
xor dword [rsp + 0x38], eax
mov eax, dword [rsp + 0x38]
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 r12d, eax
lea eax, [rcx + r12]
rol eax, 9
xor r14d, eax
lea eax, [r14 + r12]
rol eax, 0xd
xor r10d, eax
lea eax, [r14 + r10]
ror eax, 0xe
xor ecx, eax
mov eax, dword [rsp + 0x34]
add eax, r12d
rol eax, 7
xor dword [rsp + 0x38], eax
mov eax, dword [rsp + 0x38]
mov dword [rsp + 0x44], eax
add eax, r9d
rol eax, 9
xor edi, eax
mov eax, dword [rsp + 0x38]
add eax, edi
rol eax, 0xd
xor r12d, eax
lea eax, [r12 + rdi]
ror eax, 0xe
xor r9d, eax
mov dword [rsp + 0x34], r9d
mov eax, r9d
mov dword [rsp + 0x40], eax
mov r9d, dword [rsp + 0x3c]
lea eax, [r13 + rbp]
rol eax, 7
xor r15d, eax
lea eax, [r15 + r13]
rol eax, 9
xor r14d, eax
lea eax, [r15 + r14]
rol eax, 0xd
xor ebp, eax
lea eax, [r14 + rbp]
ror eax, 0xe
xor r13d, eax
lea eax, [r11 + rbx]
rol eax, 7
xor r10d, eax
lea eax, [r10 + r11]
rol eax, 9
xor esi, eax
lea eax, [r10 + rsi]
rol eax, 0xd
xor ebx, eax
lea eax, [rbx + rsi]
ror eax, 0xe
xor r11d, eax
lea eax, [rcx + rdx]
rol eax, 7
xor r9d, eax
lea eax, [rcx + r9]
rol eax, 9
xor r8d, eax
lea eax, [r9 + r8]
rol eax, 0xd
xor edx, eax
mov dword [rsp + 0x70], r9d
lea eax, [rdx + r8]
ror eax, 0xe
xor ecx, eax
sub qword [rsp + 0xa0], 1
mov eax, dword [rsp + 0x34]
jne 0x100017b71
mov dword [rsp + 0x7c], ecx
xor ecx, ecx
mov dword [rsp + 0x64], ebx
mov rbx, qword [rsp + 0x118]
mov dword [rsp + 0x60], esi
lea esi, [rcx + 0x40]
mov dword [rsp + 0x5c], r14d
mov r14, qword [rsp + 0x88]
mov dword [rsp + 0x58], r15d
mov r15, qword [rsp + 0xb0]
mov dword [rsp + 0x54], r13d
mov r13, qword [rsp + 0xa8]
mov dword [rsp + 0x50], ebp
mov ebp, dword [rsp + 0xe0]
mov dword [rsp + 0x4c], r12d
mov r12, qword [rsp + 0x98]
mov dword [rsp + 0x48], edi
mov dil, byte [rsp + 0x30]
mov dword [rsp + 0x78], edx
mov dword [rsp + 0x74], r8d
mov dword [rsp + 0x6c], r10d
mov dword [rsp + 0x68], r11d
mov eax, dword [rsp + rcx + 0xc0]
add rcx, 4
add dword [rsp + rcx + 0x3c], eax
cmp rcx, rsi
jl 0x100017d60
mov r8, rsi
lea rcx, [rsp + 0x130]
lea rdx, [rsp + 0x40]
not rdx
call fcn.10001511c
inc ebp
cmp r13, rsi
mov dword [rsp + 0xe0], ebp
jbe 0x100017e04
mov rdx, rsi
lea r8, [r12 + rbx]
lea rcx, [rsp + 0x130]
mov al, byte [r8 + rcx]
xor al, byte [rcx]
mov byte [r12 + rcx], al
inc rcx
xor dil, al
sub rdx, 1
jne 0x100017da9
mov byte [rsp + 0x30], dil
sub r13, rsi
mov qword [rsp + 0xa8], r13
add r15, rsi
add r12, rsi
add r14, rsi
mov qword [rsp + 0x88], r14
mov qword [rsp + 0xb0], r15
jmp 0x100017aed
mov ecx, dword [0x1000a5f24]
imul rcx, rdx
lea rbx, [rcx + r11 + 0x109088]
jmp 0x100017822
mov rbx, qword [rsp + 0x108]
mov rsi, qword [rsp + 0x110]
mov rbp, qword [rsp + 0x100]
xor edx, edx
test r13, r13
je 0x100017e5a
lea rax, [rsp + 0x130]
lea rcx, [rsp + 0x130]
sub r14, rax
lea rax, [rsp + 0x130]
sub r15, rax
mov al, byte [rcx + r14]
inc edx
xor al, byte [rcx]
xor dil, al
mov byte [rcx + r15], al
inc rcx
mov eax, edx
cmp rax, r13
jb 0x100017e41
cmp dil, byte [rsi + rbp + 0x10]
je 0x100017f30
call fcn.100018aa8
mov r11, rax
lea rbx, [0x1000b5984]
mov rax, 0xfffffffffffff000
mov r10d, 0xffff
mov rsi, qword [rsp + 0x90]
mov qword [rsi + 0x10], rbx
lea r8, [rsi + 0x18]
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 r10, 0x10
add rax, 0x269ec3
mov rcx, rax
shr rcx, 0x10
movzx edx, cx
or rdi, rdx
test r10, r10
jne 0x100017eab
mov qword [0x1001241b0], rax
movabs rax, 0x8000800080008001
mul rdi
shr rdx, 0xf
mov rax, qword [rsp + 0x80]
mov qword [rax + 0x98], r11
imul rdx, rdx, 0xffff
sub rdi, rdx
inc rdi
mov qword [rax + 0xb0], rdi
mov qword [rsp + 0x80], r10
jmp 0x100017f26
mov rax, qword [rsp + 0x80]
mov qword [r8], rax
add r8, 8
cmp r8, r9
jb 0x100017f17
jmp 0x10001803c
lea r14, [0x100000000]
mov r13, r14
mov rax, qword [0x10000cac8]
mov r12, rsi
sub r12, rbx
sub r13, rax
jne 0x100017f55
test r12, r12
je 0x100018029
mov r11, rbx
mov rcx, qword [0x1000e0550]
xor edi, edi
lea r8d, [rcx - 1]
sub r11, rsi
lea r15, [0x100000000]
sub esi, r14d
add ebp, esi
test r8d, r8d
js 0x100017fa9
lea eax, [r8 + rdi]
cdq
sub eax, edx
sar eax, 1
movsxd rdx, eax
mov r9d, dword [r15 + rdx*4 + 0xe0554]
and r9d, 0xfffffff
cmp esi, r9d
jae 0x100017f9f
lea r8d, [rax - 1]
jmp 0x100017fa4
jbe 0x100017fae
lea edi, [rax + 1]
cmp r8d, edi
jge 0x100017f79
movsxd r10, edi
jmp 0x100018022
movsxd r10, eax
jmp 0x100018022
mov edx, dword [r15 + r10*4 + 0xe0554]
mov eax, edx
mov edi, 0xfffffff
and eax, edi
cmp eax, ebp
jae 0x100018029
mov r8, rdx
xor r9d, r9d
and r8, rdi
mov edi, edx
sar edx, 0x1e
shl edi, 2
add r8, r14
and edx, 3
sar edi, 0x1e
and edi, 3
sub edi, 1
je 0x100017ffe
sub edi, 1
je 0x100017ff9
cmp edi, 1
jne 0x100018004
mov r9, r13
jmp 0x100018004
mov r9, r12
jmp 0x100018004
mov r9, r13
sub r9, r12
sub edx, 2
je 0x100018014
cmp edx, 1
jne 0x10001801f
add qword [r8 + r11], r9
jmp 0x100018018
add dword [r8 + r11], r9d
mov rcx, qword [0x1000e0550]
inc r10
mov eax, ecx
cmp r10, rax
jb 0x100017fb3
mov eax, dword [0x1000a5f24]
mov eax, 0xce7c2fb4
mov rsi, qword [rsp + 0x90]
mov qword [rsi + 0x10], rbx
mov rcx, qword [rsp + 0x170]
xor rcx, rsp
call fcn.1000d8a8c
mov rbx, qword [rsp + 0x1d0]
add rsp, 0x180
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret