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

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rsi
push rdi
sub rsp, 0x8f8
mov rax, qword [0x14000e500]
xor rax, rsp
mov qword [rsp + 0x8e0], rax
mov qword [rsp + 0x60], 0
lea rdx, [rsp + 0x60]
mov rcx, qword [rsp + 0x918]
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
mov dword [rsp + 0x90], eax
lea rax, [rsp + 0xb0]
mov rdi, rax
xor eax, eax
mov ecx, 0x30
rep stosb byte [rdi], al
lea rdx, [rsp + 0xb0]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ntoskrnl.exe_KeStackAttachProcess]
mov rcx, qword [rsp + 0x60]
call sub.ntoskrnl.exe_PsGetProcessPeb
mov qword [rsp + 0x40], rax
lea rdx, [0x140006e00]
lea rcx, [rsp + 0x80]
call qword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
call qword [sym.imp.ntoskrnl.exe_IoGetCurrentProcess]
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x68], 0
mov qword [rsp + 0x70], 0
mov qword [rsp + 0xa8], 0
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ntoskrnl.exe_MmIsAddressValid]
movzx eax, al
test eax, eax
jne 0x14000391f
lea rax, [rsp + 0x68]
mov qword [rsp + 0x30], rax
mov byte [rsp + 0x28], 1
mov qword [rsp + 0x20], 1
mov r9, qword [rsp + 0x40]
mov r8, qword [rsp + 0x50]
mov rdx, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x50]
call sub.ntoskrnl.exe_MmCopyVirtualMemory
mov dword [rsp + 0x58], eax
cmp dword [rsp + 0x58], 0
jge 0x1400038d8
lea rcx, [rsp + 0xb0]
call qword [sym.imp.ntoskrnl.exe_KeUnstackDetachProcess]
lea rax, [rsp + 0x80]
mov rdi, qword [rsp + 0x910]
mov rsi, rax
mov ecx, 0x10
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x910]
jmp 0x140003af2
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ntoskrnl.exe_MmIsAddressValid]
movzx eax, al
test eax, eax
jne 0x14000391f
lea rcx, [rsp + 0xb0]
call qword [sym.imp.ntoskrnl.exe_KeUnstackDetachProcess]
lea rax, [rsp + 0x80]
mov rdi, qword [rsp + 0x910]
mov rsi, rax
mov ecx, 0x10
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x910]
jmp 0x140003af2
mov rax, qword [rsp + 0x40]
mov rcx, qword [rax + 0x18]
call qword [sym.imp.ntoskrnl.exe_MmIsAddressValid]
movzx eax, al
test eax, eax
jne 0x1400039fd
lea rax, [rsp + 0x68]
mov qword [rsp + 0x30], rax
mov byte [rsp + 0x28], 1
mov qword [rsp + 0x20], 1
mov rax, qword [rsp + 0x40]
mov r9, qword [rax + 0x18]
mov r8, qword [rsp + 0x50]
mov rax, qword [rsp + 0x40]
mov rdx, qword [rax + 0x18]
mov rcx, qword [rsp + 0x50]
call sub.ntoskrnl.exe_MmCopyVirtualMemory
mov dword [rsp + 0x5c], eax
cmp dword [rsp + 0x5c], 0
jge 0x1400039b2
lea rcx, [rsp + 0xb0]
call qword [sym.imp.ntoskrnl.exe_KeUnstackDetachProcess]
lea rax, [rsp + 0x80]
mov rdi, qword [rsp + 0x910]
mov rsi, rax
mov ecx, 0x10
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x910]
jmp 0x140003af2
mov rax, qword [rsp + 0x40]
mov rcx, qword [rax + 0x18]
call qword [sym.imp.ntoskrnl.exe_MmIsAddressValid]
movzx eax, al
test eax, eax
jne 0x1400039fd
lea rcx, [rsp + 0xb0]
call qword [sym.imp.ntoskrnl.exe_KeUnstackDetachProcess]
lea rax, [rsp + 0x80]
mov rdi, qword [rsp + 0x910]
mov rsi, rax
mov ecx, 0x10
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x910]
jmp 0x140003af2
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x70], rax
mov rax, qword [rsp + 0x40]
mov rax, qword [rax + 0x18]
mov qword [rsp + 0x70], rax
mov rax, qword [rsp + 0x40]
mov rax, qword [rax + 0x18]
mov rax, qword [rax + 0x10]
mov qword [rsp + 0x78], rax
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0xe0]
mov rdi, rax
xor eax, eax
mov ecx, 0x800
rep stosb byte [rdi], al
mov r8w, 0x800
lea rdx, [rsp + 0xe0]
lea rcx, [rsp + 0x98]
call fcn.140001fc0
mov rax, qword [rsp + 0x48]
movzx eax, word [rax + 0x58]
test eax, eax
je 0x140003aa9
mov rax, qword [rsp + 0x48]
add rax, 0x58
mov r8b, 1
mov rdx, qword [rsp + 0x920]
mov rcx, rax
call qword [sym.imp.ntoskrnl.exe_RtlCompareUnicodeString]
test eax, eax
jne 0x140003aa9
mov rax, qword [rsp + 0x48]
add rax, 0x48
mov rdx, rax
lea rcx, [rsp + 0x98]
call qword [sym.imp.ntoskrnl.exe_RtlCopyUnicodeString]
jmp 0x140003ac2
mov rax, qword [rsp + 0x48]
mov rax, qword [rax]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x78]
cmp qword [rsp + 0x48], rax
jne 0x140003a5f
lea rcx, [rsp + 0xb0]
call qword [sym.imp.ntoskrnl.exe_KeUnstackDetachProcess]
lea rax, [rsp + 0x98]
mov rdi, qword [rsp + 0x910]
mov rsi, rax
mov ecx, 0x10
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x910]
mov rcx, qword [rsp + 0x8e0]
xor rcx, rsp
call fcn.140006420
add rsp, 0x8f8
pop rdi
pop rsi
ret