Function at 0x10009dc44
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
lea rax, [0x100000000]
lea rbp, [rcx + 0x18]
mov qword [rsp + 0x88], rdx
mov r15d, 0xfffffff
mov r13, qword [rbp]
mov qword [rsp + 0x90], rcx
mov esi, dword [r13 + 1]
mov edx, dword [r13 + 5]
and rdx, r15
mov qword [rsp + 0x100], rbp
shr rsi, 2
and rsi, r15
add rsi, rax
mov eax, dword [0x1000a5f24]
mov rcx, rax
lea r12, [rax + rdx - 1]
mov rax, r12
xor edx, edx
div rcx
mov qword [rsp + 0x108], rsi
mov eax, dword [0x1000a5f24]
sub r12, rdx
mov eax, dword [0x1000a5f24]
mov r10d, dword [0x10000c52c]
mov eax, dword [0x10000c52c]
test eax, eax
je 0x10009dd82
xor r8d, r8d
xor eax, eax
mov edi, dword [0x10000c52c]
dec edi
inc rdi
mov r9, rdi
je 0x10009dd3c
mov rcx, qword [0x1001241b0]
imul rcx, rcx, 0x343fd
shl rax, 0x10
shr r9, 0x10
add rcx, 0x269ec3
mov rdx, rcx
shr rdx, 0x10
movzx edx, dx
or rax, rdx
test r9, r9
jne 0x10009dd0d
mov qword [0x1001241b0], rcx
xor edx, edx
div rdi
test r10, r10
je 0x10009dd77
mov ecx, 0xffffdc52
mov eax, 0x23ad
inc r8
lock cmpxchg dword [r11 + rdx*4 + 0x127060], ecx
je 0x10009e35e
mov ecx, dword [0x10000c52c]
lea rax, [rdx + 1]
xor edx, edx
div rcx
cmp r8, r10
jb 0x10009dd46
xor ebx, ebx
test rbx, rbx
jne 0x10009deaf
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor edi, edi
mov r14d, eax
mov rcx, qword [0x10011ddb8]
mov r8, rcx
inc rdi
mov r9, rcx
xor eax, eax
test rcx, rcx
je 0x10009ddda
mov rcx, qword [0x1001241b0]
imul rcx, rcx, 0x343fd
shl rax, 0x10
shr r9, 0x10
add rcx, 0x269ec3
mov rdx, rcx
shr rdx, 0x10
movzx edx, dx
or rax, rdx
test r9, r9
jne 0x10009ddab
mov qword [0x1001241b0], rcx
mov r9d, 0x40
xor edx, edx
div r8
mov r8d, 0x3000
mov rcx, rdx
mov rdx, r12
shl rcx, 0x10
add rcx, qword [0x100126f18]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
test rax, rax
mov rbx, rax
je 0x10009de45
mov r8d, r12d
lea r9, [0x100018ac0]
and qword [rsp + 0x28], 0
and qword [rsp + 0x20], 0
mov rcx, rax
mov rdx, rax
or rcx, 3
call qword [sym.imp.KERNEL32.dll_RtlInstallFunctionTableCallback]
test al, al
jne 0x10009de59
mov r8d, 0x8000
mov rcx, rbx
xor edx, edx
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
cmp rdi, 0x11
jb 0x10009dd8d
xor ebx, ebx
cmp rbx, 0x10000
jb 0x10009de67
test bl, 3
je 0x10009de8c
test rbx, rbx
je 0x10009de8a
mov rcx, rbx
or rcx, 3
call qword [sym.imp.KERNEL32.dll_RtlDeleteFunctionTable]
xor edx, edx
mov rcx, rbx
mov r8d, 0x8000
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor ebx, ebx
mov ecx, r14d
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea r11, [0x100000000]
test rbx, rbx
je 0x10009dcd6
mov rcx, r12
xor eax, eax
mov rdi, rbx
rep stosb byte [rdi], al
mov eax, 0xa9946d53
add qword [rbp], 9
mov r10d, dword [0x1000a5f24]
mov r12d, dword [r13 + 5]
lea rax, [0x100000000]
and r12, r15
sub r10, r12
mov r9d, esi
xor edi, edi
mov qword [rsp + 0x110], r12
sub r9d, eax
inc r10
mov r8, r10
je 0x10009df1f
mov rdx, qword [0x1001241b0]
imul rdx, rdx, 0x343fd
shl rdi, 0x10
shr r8, 0x10
add rdx, 0x269ec3
mov rcx, rdx
shr rcx, 0x10
movzx eax, cx
or rdi, rax
test r8, r8
jne 0x10009def0
mov qword [0x1001241b0], rdx
mov rax, rdi
mov ecx, r9d
xor edx, edx
div r10
add rbx, rdx
mov qword [rsp + 0x118], rbx
mov rdx, r12
mov r8, rbx
mov eax, 0x16b64fd2
mov qword [rsp + 0xb0], r12
xor dil, dil
mov byte [rsp + 0x30], dil
test r12, r12
mov qword [rsp + 0x98], rsi
mov qword [rsp + 0x80], rbx
je 0x10009e3d5
movdqu xmm0, xmmword [r12 + rsi]
mov r13, rbx
and dword [rsp + 0xd8], 0
and dword [rsp + 0xdc], 0
xor r12d, r12d
movdqu xmmword [rsp + 0x120], xmm0
mov rcx, qword [rsp + 0x128]
mov r8, qword [rsp + 0x120]
lea r9d, [r12 + 0x40]
mov rdx, r8
mov rax, rcx
and dword [rsp + 0xe4], r12d
mov dword [rsp + 0xc4], r8d
shr rax, 0x20
shr rdx, 0x20
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
lea rax, [rsp + 0x130]
mov dword [rsp + 0xf4], ecx
sub r13, rax
mov dword [rsp + 0xe0], r12d
mov rax, rsi
sub rax, rbx
mov qword [rsp + 0x120], rax
lea rcx, [rsp + 0x40]
mov r8, r9
lea rdx, [rsp + 0xc0]
mov qword [rsp + 0xa8], r13
not rdx
call fcn.10001511c
mov ebp, dword [rsp + 0x64]
mov r13d, dword [rsp + 0x4c]
mov r11d, dword [rsp + 0x68]
mov eax, dword [rsp + 0x54]
mov r10d, dword [rsp + 0x6c]
mov edi, dword [rsp + 0x48]
mov r12d, dword [rsp + 0x50]
mov ebx, dword [rsp + 0x5c]
mov ecx, dword [rsp + 0x7c]
mov r9d, dword [rsp + 0x70]
mov r15d, dword [rsp + 0x58]
mov r8d, dword [rsp + 0x74]
mov esi, dword [rsp + 0x60]
mov edx, dword [rsp + 0x78]
mov dword [rsp + 0x3c], eax
mov eax, dword [rsp + 0x44]
mov r14d, dword [rsp + 0x3c]
mov dword [rsp + 0x34], eax
mov eax, dword [rsp + 0x40]
mov dword [rsp + 0x38], eax
mov qword [rsp + 0xa0], 3
add eax, r9d
rol eax, 7
xor r12d, eax
mov eax, dword [rsp + 0x38]
add eax, r12d
rol eax, 9
xor esi, eax
lea eax, [rsi + r12]
rol eax, 0xd
xor r9d, eax
mov dword [rsp + 0x3c], r9d
lea eax, [rsi + r9]
ror eax, 0xe
xor dword [rsp + 0x38], eax
mov eax, dword [rsp + 0x34]
add eax, r14d
rol eax, 7
mov r9d, dword [rsp + 0x38]
xor ebp, eax
lea eax, [r14 + rbp]
rol eax, 9
xor r8d, eax
lea eax, [r8 + rbp]
rol eax, 0xd
xor dword [rsp + 0x34], eax
mov eax, dword [rsp + 0x34]
add eax, r8d
ror eax, 0xe
xor r14d, 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 r13d, eax
lea eax, [rcx + r13]
rol eax, 9
xor ebx, eax
lea eax, [rbx + r13]
rol eax, 0xd
xor r10d, eax
lea eax, [rbx + r10]
ror eax, 0xe
xor ecx, eax
mov eax, dword [rsp + 0x38]
add eax, r13d
rol eax, 7
xor dword [rsp + 0x34], eax
mov eax, dword [rsp + 0x34]
mov dword [rsp + 0x44], eax
add eax, r9d
rol eax, 9
xor edi, eax
mov eax, dword [rsp + 0x34]
add eax, edi
rol eax, 0xd
xor r13d, eax
lea eax, [r13 + rdi]
ror eax, 0xe
xor r9d, eax
mov eax, r9d
mov dword [rsp + 0x38], r9d
mov dword [rsp + 0x40], eax
lea eax, [r14 + r12]
rol eax, 7
xor r15d, eax
lea eax, [r15 + r14]
mov r9d, dword [rsp + 0x3c]
rol eax, 9
xor ebx, eax
lea eax, [rbx + r15]
rol eax, 0xd
xor r12d, eax
lea eax, [rbx + r12]
ror eax, 0xe
xor r14d, eax
lea eax, [r11 + rbp]
rol eax, 7
xor r10d, eax
lea eax, [r10 + r11]
rol eax, 9
xor esi, eax
lea eax, [r10 + rsi]
rol eax, 0xd
xor ebp, eax
lea eax, [rbp + rsi]
ror eax, 0xe
xor r11d, eax
lea eax, [rcx + rdx]
rol eax, 7
xor r9d, eax
lea eax, [rcx + r9]
mov dword [rsp + 0x70], r9d
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 + 0xa0], 1
mov eax, dword [rsp + 0x38]
jne 0x10009e0cc
mov dword [rsp + 0x7c], ecx
mov dword [rsp + 0x64], ebp
mov rbp, qword [rsp + 0x80]
mov dword [rsp + 0x60], esi
xor ecx, ecx
mov rsi, qword [rsp + 0x120]
mov dword [rsp + 0x5c], ebx
mov rbx, qword [rsp + 0x118]
mov dword [rsp + 0x58], r15d
mov r15, qword [rsp + 0x98]
mov dword [rsp + 0x54], r14d
mov r14, qword [rsp + 0xb0]
mov dword [rsp + 0x50], r12d
mov r12d, dword [rsp + 0xe0]
mov dword [rsp + 0x4c], r13d
mov r13, qword [rsp + 0xa8]
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, 0x40
jl 0x10009e2c3
lea rdx, [rsp + 0x40]
mov r8d, 0x40
lea rcx, [rsp + 0x130]
not rdx
call fcn.10001511c
mov r9d, 0x40
inc r12d
cmp r14, r9
mov dword [rsp + 0xe0], r12d
jbe 0x10009e375
mov rdx, r9
lea rcx, [rsp + 0x130]
lea r8, [r13 + rsi]
mov al, byte [r8 + rcx]
xor al, byte [rcx]
mov byte [r13 + rcx], al
inc rcx
xor dil, al
sub rdx, 1
jne 0x10009e319
mov byte [rsp + 0x30], dil
sub r14, r9
add rbp, r9
mov qword [rsp + 0xb0], r14
add r13, r9
add r15, r9
mov qword [rsp + 0x98], r15
mov qword [rsp + 0x80], rbp
jmp 0x10009e048
mov ecx, dword [0x1000a5f24]
imul rcx, rdx
lea rbx, [rcx + r11 + 0x109088]
jmp 0x10009dd79
mov r12, qword [rsp + 0x110]
mov rsi, qword [rsp + 0x108]
mov rbp, qword [rsp + 0x100]
xor r8d, r8d
test r14, r14
je 0x10009e3d5
mov rdx, qword [rsp + 0x80]
lea rax, [rsp + 0x130]
sub r15, rax
lea rcx, [rsp + 0x130]
lea rax, [rsp + 0x130]
sub rdx, rax
mov al, byte [rcx + r15]
inc r8d
xor al, byte [rcx]
mov byte [rcx + rdx], al
xor dil, al
inc rcx
mov eax, r8d
cmp rax, r14
jb 0x10009e3bb
cmp dil, byte [r12 + rsi + 0x10]
je 0x10009e4a8
call fcn.100018aa8
lea rbx, [0x1000b5984]
and rbp, 0xfffffffffffffff8
mov r11, qword [rsp + 0x90]
mov r10, rax
mov r9d, 0xffff
mov qword [r11 + 0x10], rbx
lea r8, [rbp + 0xfff]
mov rax, 0xfffffffffffff000
and r10, rax
and r8, rax
xor edi, edi
mov rax, qword [0x1001241b0]
imul rax, rax, 0x343fd
shl rdi, 0x10
shr r9, 0x10
add rax, 0x269ec3
mov rcx, rax
shr rcx, 0x10
movzx edx, cx
or rdi, rdx
test r9, r9
jne 0x10009e422
mov qword [0x1001241b0], rax
movabs rax, 0x8000800080008001
mul rdi
mov rax, qword [rsp + 0x88]
shr rdx, 0xf
imul rdx, rdx, 0xffff
sub rdi, rdx
mov qword [rax + 0x98], r10
inc rdi
mov qword [rax + 0xb0], rdi
mov qword [rsp + 0x88], r9
jmp 0x10009e49e
mov rax, qword [rsp + 0x88]
mov qword [rbp], rax
add rbp, 8
cmp rbp, r8
jb 0x10009e48e
jmp 0x10009e5b8
lea r15, [0x100000000]
mov rbp, rsi
mov rax, qword [0x10000cac8]
sub rbp, rbx
mov r13, r15
sub r13, rax
jne 0x10009e4cd
test rbp, rbp
je 0x10009e5a5
lea r14, [0x100000000]
mov rcx, qword [0x1000e0550]
lea r8d, [rcx - 1]
mov r11, rbx
xor edi, edi
sub r11, rsi
sub esi, r15d
add r12d, esi
test r8d, r8d
js 0x10009e522
lea eax, [r8 + rdi]
cdq
sub eax, edx
sar eax, 1
movsxd rdx, eax
mov r9d, dword [r14 + rdx*4 + 0xe0554]
and r9d, 0xfffffff
cmp esi, r9d
jae 0x10009e518
lea r8d, [rax - 1]
jmp 0x10009e51d
jbe 0x10009e527
lea edi, [rax + 1]
cmp r8d, edi
jge 0x10009e4f2
movsxd r10, edi
jmp 0x10009e59e
movsxd r10, eax
jmp 0x10009e59e
mov edx, dword [r14 + r10*4 + 0xe0554]
mov eax, edx
and eax, 0xfffffff
cmp eax, r12d
jae 0x10009e5a5
mov r8, rdx
mov edi, edx
sar edx, 0x1e
shl edi, 2
and r8d, 0xfffffff
and edx, 3
sar edi, 0x1e
add r8, r15
xor r9d, r9d
and edi, 3
sub edi, 1
je 0x10009e57a
sub edi, 1
je 0x10009e575
cmp edi, 1
jne 0x10009e580
mov r9, r13
jmp 0x10009e580
mov r9, rbp
jmp 0x10009e580
mov r9, r13
sub r9, rbp
sub edx, 2
je 0x10009e590
cmp edx, 1
jne 0x10009e59b
add qword [r8 + r11], r9
jmp 0x10009e594
add dword [r8 + r11], r9d
mov rcx, qword [0x1000e0550]
inc r10
mov eax, ecx
cmp r10, rax
jb 0x10009e52c
mov eax, dword [0x1000a5f24]
mov eax, 0x640a63b5
mov r11, qword [rsp + 0x90]
mov qword [r11 + 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