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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r12
push r13
push r15
lea rbp, [rsp - 0x37]
sub rsp, 0xb0
mov rax, qword [0x1400121b0]
xor rax, rsp
mov qword [rbp + 0x27], rax
xor ebx, ebx
mov qword [rbp - 0x11], 0xfffffffffff0bdc0
mov rsi, rdx
mov qword [rbp - 0x39], rbx
mov rdx, qword [rdx + 8]
mov r12d, ebx
mov qword [rbp - 0x29], rbx
or rax, 0xffffffffffffffff
mov r13, rcx
inc rax
cmp word [rdx + rax*2], bx
jne 0x140005067
lea rdi, [rax*2 + 2]
mov r8, rdi
lea rdx, [rbp - 0x29]
lea rcx, [rbp - 0x21]
call fcn.140002fe4
mov r15, qword [rsi + 8]
mov qword [rbp - 0x31], rbx
test r15, r15
je 0x14000527e
cmp qword [rbp - 0x21], rbx
je 0x14000527e
cmp rdi, qword [rbp - 0x19]
jbe 0x1400050b3
mov ebx, 0xc000000d
jmp 0x140005283
call qword [sym.imp.ntoskrnl.exe_IoGetCurrentProcess]
mov rbx, rax
call qword [sym.imp.ntoskrnl.exe_IoGetCurrentProcess]
mov r9, qword [rbp - 0x21]
lea rcx, [rbp - 0x31]
mov qword [rsp + 0x30], rcx
mov r8, rbx
mov byte [rsp + 0x28], r12b
mov rcx, rax
mov rdx, r15
mov qword [rsp + 0x20], rdi
call sub.ntoskrnl.exe_MmCopyVirtualMemory
xor r15d, r15d
mov ebx, eax
test eax, eax
js 0x140005102
mov rax, qword [rbp - 0x31]
sub rax, rdi
neg rax
sbb ebx, ebx
and ebx, 0xc0000206
test ebx, ebx
js 0x140005286
mov ecx, dword [rsi]
lea rdx, [rbp - 0x39]
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
mov ebx, eax
test eax, eax
js 0x140005286
mov rcx, qword [rbp - 0x39]
lea rdx, [rbp - 9]
call qword [sym.imp.ntoskrnl.exe_KeStackAttachProcess]
mov rcx, qword [rbp - 0x39]
call sub.ntoskrnl.exe_PsGetProcessPeb
mov rsi, rax
test rax, rax
jne 0x14000515d
lea rcx, [rbp - 9]
call qword [sym.imp.ntoskrnl.exe_KeUnstackDetachProcess]
mov rcx, qword [rbp - 0x39]
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
mov ebx, 0x80
jmp 0x140005286
mov rax, qword [rax + 0x18]
mov ebx, r15d
jmp 0x14000517f
cmp ebx, 0xa
jge 0x14000513f
lea r8, [rbp - 0x11]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ntoskrnl.exe_KeDelayExecutionThread]
mov rax, qword [rsi + 0x18]
inc ebx
test rax, rax
je 0x140005166
add rax, 0x10
je 0x14000513f
mov rdi, qword [rax]
mov ebx, 0xc0000225
jmp 0x1400051c8
test rdi, rdi
je 0x1400051bd
movzx eax, word [rdi + 0x48]
test ax, ax
je 0x1400051bd
mov rdx, qword [rbp - 0x29]
mov r8d, eax
mov rcx, qword [rdi + 0x50]
shr r8, 1
sub r8, 4
call sub.ntoskrnl.exe__wcsnicmp
test eax, eax
je 0x1400051fb
mov rax, qword [rsi + 0x18]
mov rdi, qword [rdi]
add rax, 0x10
cmp rdi, rax
jne 0x140005194
lea rcx, [rbp - 9]
call qword [sym.imp.ntoskrnl.exe_KeUnstackDetachProcess]
test ebx, ebx
js 0x1400051ec
mov rdx, qword [rbp - 0x39]
mov r8, r12
mov rcx, r13
call fcn.140006418
mov ebx, eax
mov rcx, qword [rbp - 0x39]
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
jmp 0x140005286
mov rcx, qword [rdi]
mov r12, qword [rdi + 0x30]
cmp qword [rcx + 8], rdi
jne 0x140005277
mov rax, qword [rdi + 8]
cmp qword [rax], rdi
jne 0x140005277
mov qword [rax], rcx
mov qword [rcx + 8], rax
lea rax, [rdi + 0x20]
mov rdx, qword [rax]
cmp qword [rdx + 8], rax
jne 0x140005277
mov rcx, qword [rax + 8]
cmp qword [rcx], rax
jne 0x140005277
mov qword [rcx], rdx
lea rax, [rdi + 0x10]
mov qword [rdx + 8], rcx
mov rdx, qword [rax]
cmp qword [rdx + 8], rax
jne 0x140005277
mov rcx, qword [rax + 8]
cmp qword [rcx], rax
jne 0x140005277
mov qword [rcx], rdx
add rdi, 0x70
mov qword [rdx + 8], rcx
mov rcx, qword [rdi]
cmp qword [rcx + 8], rdi
jne 0x140005277
mov rax, qword [rdi + 8]
cmp qword [rax], rdi
jne 0x140005277
mov qword [rax], rcx
mov ebx, r15d
mov qword [rcx + 8], rax
jmp 0x1400051cd
mov ecx, 3
int 0x29
mov ebx, 0xc0000206
xor r15d, r15d
cmp qword [rbp - 0x21], r15
je 0x14000529b
mov rcx, qword [rbp - 0x21]
mov edx, 0x6864694e
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov eax, ebx
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.14000e560
lea r11, [rsp + 0xb0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r13
pop r12
pop rdi
pop rbp
ret