Function at 0x16684
Capabilities:
Allocate or change rwx memory
Attach user process memory
Enumerate processes via ntquerysysteminformation
Get system information on windows

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x80
mov r14, rdx
mov r12, rcx
and qword [rax - 0x78], 0
mov qword [rax - 0x70], 0x434
and qword [rax + 0x20], 0
lea rdx, [rax - 0x58]
call qword [sym.imp.ntoskrnl.exe_KeStackAttachProcess]
lea r15, [rsp + 0x30]
mov rcx, r12
call qword [sym.imp.ntoskrnl.exe_PsGetProcessId]
mov r13, rax
and dword [rsp + 0xc0], 0
xor esi, esi
xor ebx, ebx
lea r9, [rsp + 0xc0]
xor r8d, r8d
xor edx, edx
lea ecx, [rsi + 5]
call sub.ntoskrnl.exe_ZwQuerySystemInformation
mov edi, eax
cmp eax, 0xc0000004
jne 0x1674f
mov edx, dword [rsp + 0xc0]
xor ecx, ecx
call qword [sym.imp.ntoskrnl.exe_ExAllocatePool]
mov rbx, rax
test rax, rax
jne 0x1671d
mov ebx, 0xc000009a
jmp 0x1695d
lea r9, [rsp + 0xc0]
mov r8d, dword [rsp + 0xc0]
mov rdx, rax
mov ecx, 5
call sub.ntoskrnl.exe_ZwQuerySystemInformation
mov edi, eax
test eax, eax
jns 0x16757
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov ebx, edi
jmp 0x1679e
test eax, eax
je 0x16757
mov ebx, edi
jmp 0x1679e
mov rcx, rbx
cmp qword [rcx + 0x50], r13
jne 0x16769
lea rsi, [rcx + 0x100]
jmp 0x16771
cmp dword [rcx], esi
jne 0x1697c
test rsi, rsi
je 0x1678c
test r15, r15
je 0x1678c
mov rdx, r15
mov rcx, qword [rsi + 0x30]
call qword [sym.imp.ntoskrnl.exe_PsLookupThreadByThreadId]
mov edi, eax
jmp 0x16791
mov edi, 0xc0000001
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov ebx, edi
test edi, edi
js 0x1695d
mov dword [rsp + 0x28], 0x40
mov dword [rsp + 0x20], 0x3000
lea r9, [rsp + 0x38]
xor r8d, r8d
lea rdx, [rsp + 0xc8]
or r13, 0xffffffffffffffff
mov rcx, r13
call qword [sym.imp.ntoskrnl.exe_ZwAllocateVirtualMemory]
mov ebx, eax
test eax, eax
js 0x1695d
xor eax, eax
mov rcx, qword [rsp + 0xc8]
mov qword [rcx], rax
mov rcx, r12
call sub.ntoskrnl.exe_PsGetProcessPeb
test rax, rax
jne 0x16801
mov ebx, 0xc0000001
jmp 0x1695d
mov rdi, qword [rax + 0x18]
test rdi, rdi
jne 0x16814
mov ebx, 0xc0000001
jmp 0x1695d
lea rdx, [0x000191a0]
lea rcx, [rsp + 0x40]
call qword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
mov rdi, qword [rdi + 0x20]
mov r12, rdi
lea rcx, [rdi - 0x10]
call qword [sym.imp.ntoskrnl.exe_MmIsAddressValid]
test al, al
je 0x16851
lea rcx, [rdi + 0x48]
mov r8b, 1
lea rdx, [rsp + 0x40]
call qword [sym.imp.ntoskrnl.exe_RtlEqualUnicodeString]
test al, al
jne 0x1685b
mov rdi, qword [rdi]
cmp rdi, r12
je 0x1686e
jmp 0x1682d
mov rcx, qword [rdi + 0x20]
mov rax, qword [rsp + 0xc8]
mov qword [rax + 0x20c], rcx
mov rcx, qword [rsp + 0xc8]
mov rcx, qword [rcx + 0x20c]
call qword [sym.imp.ntoskrnl.exe_MmIsAddressValid]
test al, al
jne 0x16891
mov ebx, 0xc0000001
jmp 0x1695d
mov rax, qword [rsp + 0xc8]
and dword [rax + 0x200], 0
lea rdx, [0x000191c0]
mov rcx, qword [rsp + 0xc8]
mov rcx, qword [rcx + 0x20c]
call fcn.000161bc
mov rdx, qword [rsp + 0xc8]
mov qword [rdx + 0x214], rax
lea rdx, [0x000191d0]
mov rcx, qword [rsp + 0xc8]
mov rcx, qword [rcx + 0x20c]
call fcn.000161bc
mov rdx, qword [rsp + 0xc8]
mov qword [rdx + 0x21c], rax
xor eax, eax
mov rcx, r13
mov rdi, r14
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
add r8, r8
mov rcx, qword [rsp + 0xc8]
add rcx, 0x22c
mov rdx, r14
call fcn.00016d60
nop
mov rcx, qword [rsp + 0xc8]
lea rdx, [0x0001b110]
mov r8d, 0x19c
call fcn.00016d60
mov rdx, qword [rsp + 0xc8]
mov r8, rdx
mov rcx, qword [rsp + 0x30]
call fcn.00015fc4
test al, al
je 0x1695d
xor ebx, ebx
jmp 0x1695d
lea rcx, [rsp + 0x50]
call qword [sym.imp.ntoskrnl.exe_KeUnstackDetachProcess]
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x16978
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
mov eax, ebx
jmp 0x16986
mov eax, dword [rcx]
add rcx, rax
jmp 0x1675a
lea r11, [rsp + 0x80]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret