Function at 0x140001348
Capabilities:
Find process by pid

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r14
mov rbp, rsp
sub rsp, 0x50
mov rsi, qword [rcx + 0xb8]
mov rbx, rcx
and qword [rbp + 0x38], 0
and qword [rcx + 0x38], 0
mov ecx, dword [rsi + 0x18]
sub ecx, 0x222000
je 0x140001539
sub ecx, 4
je 0x140001513
sub ecx, 4
je 0x14000145e
sub ecx, 4
je 0x1400013d8
cmp ecx, 4
je 0x14000139f
mov edi, 0xc0000010
jmp 0x14000157f
cmp dword [rsi + 0x10], 0x10
jb 0x14000153f
mov rax, qword [rbx + 0x18]
lea rdx, [rbp + 0x38]
mov rcx, qword [rax]
mov rdi, qword [rax + 8]
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
test eax, eax
js 0x14000155e
mov rax, qword [rbp + 0x38]
mov qword [rax + 0x440], rdi
xor edi, edi
jmp 0x140001570
cmp dword [rsi + 0x10], 8
jb 0x14000153f
mov rcx, qword [rbx + 0x18]
lea r8, [rbp + 0x30]
and qword [rbp + 0x40], 0
lea rdx, [rbp + 0x40]
and dword [rbp + 0x30], 0
call fcn.14000112c
mov edi, eax
test eax, eax
jns 0x14000140a
lfence
jmp 0x140001584
mov r14d, dword [rbp + 0x30]
mov eax, dword [rsi + 8]
shl r14, 3
cmp rax, r14
jae 0x140001436
mov rcx, qword [rbp + 0x40]
mov edi, 0x80000005
mov edx, 0x70696441
mov dword [rbx + 0x30], edi
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
jmp 0x140001582
mov rdx, qword [rbp + 0x40]
mov r8, r14
mov rcx, qword [rbx + 0x18]
call fcn.1400016c0
mov rcx, qword [rbp + 0x40]
mov edx, 0x70696441
mov qword [rbx + 0x38], r14
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
jmp 0x140001570
cmp dword [rsi + 0x10], 8
jb 0x14000153f
mov rax, qword [rbx + 0x18]
lea rdx, [rbp + 0x38]
mov rcx, qword [rax]
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
test eax, eax
js 0x14000155e
and qword [rbp + 0x48], 0
lea rax, [rbp + 0x48]
and qword [rbp - 0x10], 0
mov r9d, 0x1fffff
mov qword [rsp + 0x30], rax
xor r8d, r8d
mov rax, qword [sym.imp.ntoskrnl.exe_PsProcessType]
xor edx, edx
mov byte [rsp + 0x28], 0
mov rcx, qword [rax]
mov qword [rsp + 0x20], rcx
mov rcx, qword [rbp + 0x38]
call qword [sym.imp.ntoskrnl.exe_ObOpenObjectByPointer]
mov edi, eax
test eax, eax
js 0x140001570
mov rdx, qword [rbp + 0x48]
lea r9, [rbp - 0x10]
or rcx, 0xffffffffffffffff
mov dword [rsp + 0x30], 2
and dword [rsp + 0x28], 0
mov r8, rcx
and dword [rsp + 0x20], 0
call qword [sym.imp.ntoskrnl.exe_ZwDuplicateObject]
mov edi, eax
test eax, eax
js 0x140001507
mov rcx, qword [rbx + 0x18]
mov rax, qword [rbp - 0x10]
mov qword [rcx], rax
mov qword [rbx + 0x38], 8
mov rcx, qword [rbp + 0x48]
call qword [sym.imp.ntoskrnl.exe_ZwClose]
jmp 0x140001570
cmp dword [rsi + 0x10], 8
jb 0x14000153f
mov rax, qword [rbx + 0x18]
lea rdx, [rbp + 0x38]
mov rcx, qword [rax]
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
test eax, eax
js 0x14000155e
mov rcx, qword [rbp + 0x38]
call sub.ntoskrnl.exe_PsResumeProcess
jmp 0x14000156e
cmp dword [rsi + 0x10], 8
jae 0x140001549
mov eax, 0xc0000023
mov dword [rbx + 0x30], eax
jmp 0x140001584
mov rax, qword [rbx + 0x18]
lea rdx, [rbp + 0x38]
mov rcx, qword [rax]
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
test eax, eax
jns 0x140001565
mov eax, 0xc000000d
jmp 0x140001544
mov rcx, qword [rbp + 0x38]
call sub.ntoskrnl.exe_PsSuspendProcess
mov edi, eax
mov rcx, qword [rbp + 0x38]
test rcx, rcx
je 0x14000157f
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
mov dword [rbx + 0x30], edi
mov eax, edi
add rsp, 0x50
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret