Function at 0x140001b50
Capabilities:
Allocate or change rwx memory
Attach user process memory
Find process by pid

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xb0
mov rax, qword [0x140006450]
xor rax, rsp
mov qword [rbp + 0x17], rax
and qword [rbp - 0x49], 0
mov rsi, rdx
mov edi, ecx
lea rdx, [rbp - 0x49]
mov ecx, ecx
mov r14d, r8d
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
xorps xmm0, xmm0
mov ebx, eax
movups xmmword [rbp - 0x19], xmm0
movups xmmword [rbp - 9], xmm0
movups xmmword [rbp + 7], xmm0
test eax, eax
jns 0x140001bbc
xor edx, edx
lea r8, [0x140002f60]
lea ecx, [rdx + 0x4d]
call qword [sym.imp.ntoskrnl.exe_DbgPrintEx]
mov eax, ebx
jmp 0x140001e0f
mov rcx, qword [rbp - 0x49]
call qword [sym.imp.ntoskrnl.exe_PsGetProcessExitStatus]
cmp eax, 0x103
je 0x140001bf3
mov rcx, qword [rbp - 0x49]
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
xor edx, edx
lea r8, [0x140002f80]
lea ecx, [rdx + 0x4d]
call qword [sym.imp.ntoskrnl.exe_DbgPrintEx]
mov eax, 0xc0000001
jmp 0x140001e0f
mov rdx, r14
xor ecx, ecx
call qword [sym.imp.ntoskrnl.exe_ExAllocatePool]
mov r8, r14
mov rdx, rsi
mov rcx, rax
mov r15, rax
call fcn.140002a40
mov rcx, qword [rbp - 0x49]
lea rdx, [rbp - 0x19]
and qword [rbp - 0x51], 0
and qword [rbp - 0x59], 0
and qword [rbp - 0x39], 0
and qword [rbp - 0x21], 0
mov qword [rbp - 0x31], r14
xor r14b, r14b
mov qword [rbp - 0x29], 0xc50
call qword [sym.imp.ntoskrnl.exe_KeStackAttachProcess]
mov ebx, 0x40
lea r9, [rbp - 0x31]
or r13, 0xffffffffffffffff
mov dword [rsp + 0x28], ebx
mov rcx, r13
mov dword [rsp + 0x20], 0x1000
xor r8d, r8d
lea rdx, [rbp - 0x51]
call qword [sym.imp.ntoskrnl.exe_ZwAllocateVirtualMemory]
mov esi, eax
test eax, eax
js 0x140001da4
mov r8, qword [rbp - 0x31]
mov rdx, r15
mov rcx, qword [rbp - 0x51]
call fcn.140002a40
lea r9, [rbp - 0x29]
mov dword [rsp + 0x28], ebx
xor r8d, r8d
mov dword [rsp + 0x20], 0x1000
lea rdx, [rbp - 0x59]
mov rcx, r13
call qword [sym.imp.ntoskrnl.exe_ZwAllocateVirtualMemory]
mov esi, eax
test eax, eax
js 0x140001da4
mov r8, qword [rbp - 0x29]
lea rdx, [0x140005800]
mov rcx, qword [rbp - 0x59]
call fcn.140002a40
mov rcx, qword [rbp - 0x51]
lea r9, [rbp - 0x21]
mov dword [rsp + 0x28], ebx
lea rdx, [rbp - 0x39]
xor r8d, r8d
mov dword [rsp + 0x20], 0x1000
movsxd rax, dword [rcx + 0x3c]
mov ecx, dword [rax + rcx + 0x50]
mov qword [rbp - 0x21], rcx
mov rcx, r13
call qword [sym.imp.ntoskrnl.exe_ZwAllocateVirtualMemory]
mov esi, eax
test eax, eax
js 0x140001da4
mov rax, qword [rbp - 0x59]
lea r9, [rbp - 0x41]
mov rcx, rdi
mov byte [rax + 0x50f], 0x90
mov rax, qword [rbp - 0x59]
mov byte [rax + 0x510], 0x48
mov rax, qword [rbp - 0x59]
mov byte [rax + 0x511], 0xb8
mov rdx, qword [rbp - 0x59]
mov rax, qword [rbp - 0x39]
mov qword [rdx + 0x512], rax
mov r8, qword [rbp - 0x51]
mov rdx, qword [rbp - 0x59]
and qword [rbp - 0x41], 0
call section..text
test al, al
je 0x140001da1
call fcn.1400015a8
mov ebx, eax
call fcn.14000176c
mov rcx, qword [rbp - 0x49]
mov edi, eax
call sub.ntoskrnl.exe_PsGetProcessSectionBaseAddress
mov rcx, qword [rbp - 0x41]
xor r8d, r8d
and qword [rsp + 0x20], 0
xor edx, edx
lea r9, [rax + 0x1000]
mov qword [rbx + rcx], r9
mov rax, qword [rbp - 0x41]
mov qword [rdi + rax], r9
xor r9d, r9d
mov rcx, qword [rbp - 0x41]
call qword [sym.imp.ntoskrnl.exe_KeWaitForSingleObject]
mov rcx, qword [rbp - 0x39]
xor edx, edx
mov r8d, 0x1000
call fcn.140002d00
jmp 0x140001da4
mov r14b, 1
cmp qword [rbp - 0x51], 0
mov ebx, 0x8000
je 0x140001dc4
mov r9d, ebx
lea r8, [rbp - 0x31]
lea rdx, [rbp - 0x51]
mov rcx, r13
call qword [sym.imp.ntoskrnl.exe_ZwFreeVirtualMemory]
cmp qword [rbp - 0x59], 0
je 0x140001ddf
mov r9d, ebx
lea r8, [rbp - 0x29]
lea rdx, [rbp - 0x59]
mov rcx, r13
call qword [sym.imp.ntoskrnl.exe_ZwFreeVirtualMemory]
test r14b, r14b
je 0x140001df8
mov r9d, ebx
lea r8, [rbp - 0x21]
lea rdx, [rbp - 0x39]
mov rcx, r13
call qword [sym.imp.ntoskrnl.exe_ZwFreeVirtualMemory]
lea rcx, [rbp - 0x19]
call qword [sym.imp.ntoskrnl.exe_KeUnstackDetachProcess]
xor edx, edx
mov rcx, r15
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov eax, esi
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.1400027c0
add rsp, 0xb0
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbx
pop rbp
ret