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

Disassembly:
mov r11, rsp
mov qword [r11 + 0x18], r8
push rbp
push r12
push r13
lea rbp, [r11 - 0x5f]
sub rsp, 0xf0
mov rax, qword [sym.imp.ntoskrnl.exe_MmHighestUserAddress]
mov r12, rdx
mov r13, r9
mov rdx, qword [rax]
cmp r12, rdx
jae 0x140005150
lea rax, [r12 + r9]
cmp rax, rdx
ja 0x140005150
mov qword [r11 - 0x28], rdi
lea rdx, [0x140000000]
mov qword [r11 - 0x38], r15
xor r15d, r15d
mov eax, r15d
cmp qword [rdx + rax*8 + 0x180d0], rcx
je 0x140004f1a
inc rax
cmp rax, 0x14
jb 0x140004f02
mov rax, r15
jmp 0x140004f22
mov rax, qword [rdx + rax*8 + 0x18170]
mov qword [rbp + 0x6f], rax
mov dil, 1
test rax, rax
jne 0x140004f46
lea rdx, [rbp + 0x6f]
xor dil, dil
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
test eax, eax
jns 0x140004f46
xor al, al
jmp 0x140005063
mov qword [rsp + 0x110], rbx
mov rbx, qword gs:[0x188]
mov qword [rsp + 0xe8], rsi
mov qword [rsp + 0xd8], r14
call qword [sym.imp.ntoskrnl.exe_IoGetCurrentProcess]
mov ecx, dword [0x14001823c]
mov esi, 0x210
add ecx, 0xffffe250
mov r14, rax
cmp ecx, 1
mov eax, 0x220
mov rcx, qword [rbp + 0x6f]
cmova esi, eax
add rsi, rbx
mov qword [rsi], rcx
call qword [sym.imp.ntoskrnl.exe_IoGetCurrentProcess]
mov r8, qword [rbp + 0x6f]
lea rcx, [rbp - 0x61]
mov rdx, qword [rbp + 0x77]
mov r9, r12
mov qword [rsp + 0x30], rcx
mov rcx, rax
mov byte [rsp + 0x28], 1
mov qword [rsp + 0x20], r13
mov qword [rbp - 0x49], rax
mov qword [rbp - 0x61], r15
call sub.ntoskrnl.exe_MmCopyVirtualMemory
test eax, eax
jns 0x1400050d3
mov qword [rbp - 0x51], r12
mov qword [rbp - 0x59], r13
mov qword [rbp - 0x69], r15
call fcn.140003620
mov qword [rbp - 0x41], rax
mov rbx, rax
test rax, rax
je 0x140005037
xor edx, edx
lea rcx, [rbp - 0x39]
lea r8d, [rdx + 0x58]
call fcn.140005e00
mov rcx, qword [rbp + 0x6f]
lea rdx, [rbp - 0x39]
call qword [sym.imp.ntoskrnl.exe_KeStackAttachProcess]
lea rax, [rbp - 0x69]
mov r9d, 0x40
lea r8, [rbp - 0x59]
mov qword [rsp + 0x20], rax
lea rdx, [rbp - 0x51]
or rcx, 0xffffffffffffffff
call rbx
test eax, eax
jns 0x140005080
lea rcx, [rbp - 0x39]
call qword [sym.imp.ntoskrnl.exe_KeUnstackDetachProcess]
test dil, dil
jne 0x140005046
mov rcx, qword [rbp + 0x6f]
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
mov qword [rsi], r14
xor al, al
mov r14, qword [rsp + 0xd8]
mov rsi, qword [rsp + 0xe8]
mov rbx, qword [rsp + 0x110]
mov rdi, qword [rsp + 0xe0]
mov r15, qword [rsp + 0xd0]
add rsp, 0xf0
pop r13
pop r12
pop rbp
ret
mov r8, qword [rbp + 0x6f]
lea rax, [rbp - 0x61]
mov rdx, qword [rbp + 0x77]
mov r9, r12
mov rcx, qword [rbp - 0x49]
mov qword [rsp + 0x30], rax
mov byte [rsp + 0x28], 1
mov qword [rsp + 0x20], r13
call sub.ntoskrnl.exe_MmCopyVirtualMemory
mov r9d, dword [rbp - 0x69]
lea r8, [rbp - 0x59]
mov ebx, eax
lea rdx, [rbp - 0x51]
lea rax, [rbp - 0x69]
or rcx, 0xffffffffffffffff
mov qword [rsp + 0x20], rax
call qword [rbp - 0x41]
test ebx, ebx
js 0x1400050ec
lea rcx, [rbp - 0x39]
call qword [sym.imp.ntoskrnl.exe_KeUnstackDetachProcess]
test dil, dil
jne 0x1400050e2
mov rcx, qword [rbp + 0x6f]
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
mov qword [rsi], r14
mov al, 1
jmp 0x14000504b
cli
mov rbx, cr0
mov rax, rbx
btr rax, 0x10
mov cr0, rax
mov r8, qword [rbp + 0x6f]
lea rax, [rbp - 0x61]
mov rdx, qword [rbp + 0x77]
mov r9, r12
mov rcx, qword [rbp - 0x49]
mov qword [rsp + 0x30], rax
mov byte [rsp + 0x28], 1
mov qword [rsp + 0x20], r13
call sub.ntoskrnl.exe_MmCopyVirtualMemory
mov r12d, eax
mov cr0, rbx
sti
lea rcx, [rbp - 0x39]
call qword [sym.imp.ntoskrnl.exe_KeUnstackDetachProcess]
test dil, dil
jne 0x140005142
mov rcx, qword [rbp + 0x6f]
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
test r12d, r12d
mov qword [rsi], r14
setns al
jmp 0x14000504b
xor al, al
add rsp, 0xf0
pop r13
pop r12
pop rbp
ret