Function at 0x140004ec0
Capabilities:
Attach user process memory
Find process by pid
Free user process memory

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x168
mov rax, qword [0x1400102d0]
xor rax, rsp
mov qword [rsp + 0x150], rax
mov qword [rsp + 0x68], 0
mov qword [rsp + 0xa0], 0
mov qword [rsp + 0x70], 0
mov qword [rsp + 0x78], 0
mov rax, qword [rsp + 0x170]
mov ecx, dword [rax + 4]
call fcn.14000d040
mov qword [rsp + 0xb0], rax
mov rax, qword [rsp + 0x170]
add rax, 8
mov qword [rsp + 0xf0], rax
mov qword [rsp + 0x80], 0xffffffffffffffff
inc qword [rsp + 0x80]
mov rax, qword [rsp + 0xf0]
mov rcx, qword [rsp + 0x80]
cmp byte [rax + rcx], 0
jne 0x140004f3d
mov rax, qword [rsp + 0x80]
inc rax
mov qword [rsp + 0x90], rax
lea rdx, [rsp + 0x70]
mov rcx, qword [rsp + 0xb0]
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
mov dword [rsp + 0x60], eax
cmp dword [rsp + 0x60], 0
jge 0x140004f96
jmp 0x1400052ad
lea rdx, [rsp + 0x120]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ntoskrnl.exe_KeStackAttachProcess]
lea rdx, [0x14000d4e0]
mov rcx, qword [rsp + 0x70]
call fcn.140003640
mov qword [rsp + 0xa8], rax
cmp qword [rsp + 0xa8], 0
jne 0x140004fe5
lea rcx, [rsp + 0x120]
call qword [sym.imp.ntoskrnl.exe_KeUnstackDetachProcess]
jmp 0x1400052ad
lea rdx, [0x14000d530]
mov rcx, qword [rsp + 0xa8]
call fcn.1400033a0
mov qword [rsp + 0xb8], rax
cmp qword [rsp + 0xb8], 0
jne 0x140005024
lea rcx, [rsp + 0x120]
call qword [sym.imp.ntoskrnl.exe_KeUnstackDetachProcess]
jmp 0x1400052ad
lea rcx, [rsp + 0x120]
call qword [sym.imp.ntoskrnl.exe_KeUnstackDetachProcess]
mov dword [rsp + 0xc0], 0x30
mov qword [rsp + 0xc8], 0
mov dword [rsp + 0xd8], 0x200
mov qword [rsp + 0xd0], 0
mov qword [rsp + 0xe0], 0
mov qword [rsp + 0xe8], 0
mov rax, qword [rsp + 0xb0]
mov qword [rsp + 0x110], rax
mov qword [rsp + 0x118], 0
lea r9, [rsp + 0x110]
lea r8, [rsp + 0xc0]
mov edx, 0x1fffff
lea rcx, [rsp + 0x68]
call qword [sym.imp.ntoskrnl.exe_ZwOpenProcess]
mov dword [rsp + 0x60], eax
cmp dword [rsp + 0x60], 0
jge 0x1400050c9
jmp 0x1400052ad
mov dword [rsp + 0x28], 0x20
mov dword [rsp + 0x20], 0x3000
lea r9, [rsp + 0x90]
xor r8d, r8d
lea rdx, [rsp + 0x78]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ntoskrnl.exe_ZwAllocateVirtualMemory]
mov dword [rsp + 0x60], eax
cmp dword [rsp + 0x60], 0
jge 0x140005109
jmp 0x1400052ad
mov rax, qword [rsp + 0x170]
add rax, 8
mov qword [rsp + 0xf8], rax
mov qword [rsp + 0x88], 0xffffffffffffffff
inc qword [rsp + 0x88]
mov rax, qword [rsp + 0xf8]
mov rcx, qword [rsp + 0x88]
cmp byte [rax + rcx], 0
jne 0x140005129
mov rax, qword [rsp + 0x88]
inc rax
mov qword [rsp + 0x90], rax
mov rax, qword [rsp + 0x170]
add rax, 8
mov dword [rsp + 0x20], 0
mov r9, qword [rsp + 0x90]
mov r8, qword [rsp + 0x78]
mov rdx, qword [rsp + 0x70]
mov rcx, rax
call fcn.140005d60
mov dword [rsp + 0x60], eax
cmp dword [rsp + 0x60], 0
jge 0x14000519d
jmp 0x1400052ad
mov dword [rsp + 0xc0], 0x30
mov qword [rsp + 0xc8], 0
mov dword [rsp + 0xd8], 0x200
mov qword [rsp + 0xd0], 0
mov qword [rsp + 0xe0], 0
mov qword [rsp + 0xe8], 0
call fcn.14000d030
add rax, 0x232
mov qword [rsp + 0x98], rax
mov rax, qword [rsp + 0x98]
movzx eax, byte [rax]
mov byte [rsp + 0x64], al
mov rax, qword [rsp + 0x98]
mov byte [rax], 0
mov rax, qword [0x140011b70]
mov qword [rsp + 0x100], rax
mov rax, qword [rsp + 0x100]
mov qword [rsp + 0x108], rax
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x48], 0
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x38], 0
mov dword [rsp + 0x30], 0
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0xb8]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0x68]
lea r8, [rsp + 0xc0]
mov edx, 0x1fffff
lea rcx, [rsp + 0xa0]
mov rax, qword [rsp + 0x108]
call qword [0x14000f208]
mov dword [rsp + 0x60], eax
mov rax, qword [rsp + 0x98]
movzx ecx, byte [rsp + 0x64]
mov byte [rax], cl
cmp qword [rsp + 0xa0], 0
je 0x1400052c6
mov rcx, qword [rsp + 0xa0]
call qword [sym.imp.ntoskrnl.exe_ZwClose]
cmp dword [rsp + 0x60], 0
jge 0x1400052f3
cmp qword [rsp + 0x78], 0
je 0x1400052f3
mov r9d, 0x4000
lea r8, [rsp + 0x90]
lea rdx, [rsp + 0x78]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ntoskrnl.exe_ZwFreeVirtualMemory]
cmp qword [rsp + 0x68], 0
je 0x140005306
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ntoskrnl.exe_ZwClose]
cmp qword [rsp + 0x70], 0
je 0x140005319
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
mov eax, dword [rsp + 0x60]
mov rcx, qword [rsp + 0x150]
xor rcx, rsp
call fcn.14000d060
add rsp, 0x168
ret