Function at 0x1400038d0
Capabilities:
Allocate or change rwx memory
Attach user process memory
Enumerate processes via ntquerysysteminformation
Find process by pid
Get system information on windows
Print debug messages

Disassembly:
mov r11, rsp
mov qword [r11 + 8], rbx
mov qword [r11 + 0x10], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xc0
mov r14, r8
mov r15, rdx
mov r12, rcx
xor r13b, r13b
mov byte [rsp + 0x40], r13b
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x58], 0
mov qword [r11 - 0x70], 0
xor eax, eax
mov qword [r11 - 0x68], rax
mov qword [r11 - 0x60], rax
mov qword [r11 - 0x58], rax
mov qword [r11 - 0x50], rax
mov qword [r11 - 0x48], rax
mov qword [r11 + 0x20], rax
mov edx, 0x100000
xor ecx, ecx
call qword [sym.imp.ntoskrnl.exe_ExAllocatePool]
mov rsi, rax
mov qword [rsp + 0x50], rax
test rax, rax
jne 0x140003964
lea rcx, str.Error:_Unable_to_allocate_memory_for_the_process_thread_list
call sub.ntoskrnl.exe_DbgPrint
mov ebx, 0xc0000001
mov dword [rsp + 0x44], ebx
jmp 0x140003be7
xor r9d, r9d
mov r8d, 0x100000
mov rdx, rax
lea ecx, [r9 + 5]
call sub.ntoskrnl.exe_ZwQuerySystemInformation
xor ebx, ebx
test eax, eax
setns bl
mov dword [rsp + 0x44], ebx
test ebx, ebx
jns 0x140003999
lea rcx, str.Error:_Unable_to_query_process_thread_list
call sub.ntoskrnl.exe_DbgPrint
jmp 0x140003be7
mov rdi, rsi
mov qword [rsp + 0x70], rsi
mov eax, dword [rdi]
test eax, eax
je 0x1400039cc
cmp qword [rdi + 0x50], r12
jne 0x1400039c2
mov rdx, qword [rdi + 0x130]
lea rcx, str.Target_thread_found._TID:__d
call sub.ntoskrnl.exe_DbgPrint
jmp 0x1400039ea
add rdi, rax
mov qword [rsp + 0x70], rdi
jmp 0x1400039a1
xor al, al
jne 0x1400039ea
lea rcx, str.Error:_Target_thread_not_found
call sub.ntoskrnl.exe_DbgPrint
mov ebx, 0xc0000001
mov dword [rsp + 0x44], ebx
jmp 0x140003be7
lea rdx, [rsp + 0x60]
mov rcx, r12
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
mov ebx, eax
mov dword [rsp + 0x44], eax
test eax, eax
jns 0x140003a13
lea rcx, str.Error:_Unable_to_reference_the_target_process
call sub.ntoskrnl.exe_DbgPrint
jmp 0x140003be7
lea rdx, [rsp + 0x58]
mov rcx, qword [rdi + 0x130]
call qword [sym.imp.ntoskrnl.exe_PsLookupThreadByThreadId]
mov ebx, eax
mov dword [rsp + 0x44], eax
test eax, eax
jns 0x140003a40
lea rcx, str.Error:_Unable_to_reference_the_target_thread
call sub.ntoskrnl.exe_DbgPrint
jmp 0x140003be7
xor ebx, ebx
call qword [sym.imp.ntoskrnl.exe_IoGetCurrentProcess]
mov qword [rsp + 0xa8], rax
mov r8, qword gs:[0x188]
mov dword [rsp + 0x48], ebx
xor ecx, ecx
mov dword [rsp + 0x48], ecx
cmp ecx, 0x200
jae 0x140003a8b
cmp dword [r8 + rcx*4], eax
jne 0x140003a83
lea rbx, [r8 + rcx*4 - 0x20]
mov qword [rsp + 0xb0], rbx
sub ebx, r8d
jmp 0x140003a8b
inc ecx
mov dword [rsp + 0x48], ecx
jmp 0x140003a63
test ebx, ebx
jne 0x140003ab4
lea rcx, str.Error:_Unable_to_reference_the_target_thread
call sub.ntoskrnl.exe_DbgPrint
mov ebx, 0xc0000001
mov dword [rsp + 0x44], ebx
mov rsi, qword [rsp + 0x50]
movzx r13d, byte [rsp + 0x40]
jmp 0x140003be7
mov edi, ebx
add rdi, qword [rsp + 0x58]
movzx esi, byte [rdi + 0x2a]
test sil, sil
jne 0x140003ac8
mov byte [rdi + 0x2a], 1
lea rdx, [rsp + 0x78]
mov rcx, qword [rsp + 0x60]
call sub.ntoskrnl.exe_KeStackAttachProcess
mov r13b, 1
mov byte [rsp + 0x40], r13b
mov qword [rsp + 0x68], r14
mov dword [rsp + 0x28], 0x40
mov dword [rsp + 0x20], 0x3000
lea r9, [rsp + 0x68]
xor r8d, r8d
lea rdx, [rsp + 0x108]
or rcx, 0xffffffffffffffff
call qword [sym.imp.ntoskrnl.exe_ZwAllocateVirtualMemory]
mov ebx, eax
mov dword [rsp + 0x44], eax
test eax, eax
jns 0x140003b30
mov edx, eax
lea rcx, str.ZwAllocateVirtualMemory_Failed__Status:_p_n
call sub.ntoskrnl.exe_DbgPrint
mov rsi, qword [rsp + 0x50]
jmp 0x140003be7
mov r8, r14
mov rdx, r15
mov rcx, qword [rsp + 0x108]
call fcn.14000a930
mov edx, 0x58
xor ecx, ecx
call qword [sym.imp.ntoskrnl.exe_ExAllocatePool]
mov rbx, rax
test rax, rax
jne 0x140003b74
lea rcx, str.Error:_Unable_to_allocate_memory_for_apc
call sub.ntoskrnl.exe_DbgPrint
mov ebx, 0xc0000001
mov dword [rsp + 0x44], ebx
mov rsi, qword [rsp + 0x50]
jmp 0x140003be7
xor ecx, ecx
mov qword [rsp + 0x38], rcx
mov byte [rsp + 0x30], 1
mov rax, qword [rsp + 0x108]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
lea r9, [0x140003350]
xor r8d, r8d
mov rdx, qword [rsp + 0x58]
mov rcx, rbx
call sub.ntoskrnl.exe_KeInitializeApc
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call sub.ntoskrnl.exe_KeInsertQueueApc
movzx ebx, al
test ebx, ebx
jns 0x140003bd3
lea rcx, str.Error:_Unable_to_insert_APC_to_target_thread
call sub.ntoskrnl.exe_DbgPrint
mov rsi, qword [rsp + 0x50]
jmp 0x140003be7
test sil, sil
jne 0x140003bdc
mov byte [rdi + 0x2a], sil
xor ebx, ebx
mov dword [rsp + 0x44], ebx
mov rsi, qword [rsp + 0x50]
test rsi, rsi
je 0x140003bf7
xor edx, edx
mov rcx, rsi
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
test ebx, ebx
jns 0x140003c2f
cmp qword [rsp + 0x108], 0
je 0x140003c2f
mov r9d, 0x8000
lea r8, [rsp + 0x68]
lea rdx, [rsp + 0x108]
or rcx, 0xffffffffffffffff
call qword [sym.imp.ntoskrnl.exe_ZwFreeVirtualMemory]
mov qword [rsp + 0x108], 0
test r13b, r13b
je 0x140003c49
lea rcx, [rsp + 0x78]
call qword [sym.imp.ntoskrnl.exe_KeUnstackDetachProcess]
nop
jmp 0x140003c49
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x140003c62
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
mov qword [rsp + 0x58], 0
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x140003c72
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
mov eax, ebx
jmp 0x140003c7b
lea r11, [rsp + 0xc0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret