Function at 0x18005ed20
Capabilities:
Find process by pid

Disassembly:
mov qword [rsp + 8], rcx
push rsi
push rdi
sub rsp, 0x108
mov dword [rsp + 0x84], 0xc0000001
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x78], 0
mov qword [rsp + 0x60], 0
lea rdi, [rsp + 0x68]
xor eax, eax
mov ecx, 0x10
rep stosb byte [rdi], al
mov qword [rsp + 0x48], 0
mov dword [rsp + 0x80], 0
movzx eax, byte [0x1800e6e84]
test eax, eax
jne 0x18005ed9f
mov eax, dword [rsp + 0x84]
jmp 0x18005f116
cmp qword [rsp + 0x120], 0
jne 0x18005edb6
mov eax, dword [rsp + 0x84]
jmp 0x18005f116
lea rdi, [rsp + 0xd8]
mov rsi, qword [rsp + 0x120]
mov ecx, 0x18
rep movsb byte [rdi], byte [rsi]
lea rdi, [rsp + 0x60]
lea rsi, [rsp + 0xd8]
mov ecx, 0x18
rep movsb byte [rdi], byte [rsi]
cmp qword [rsp + 0x60], 0
je 0x18005ee12
xor edx, edx
mov eax, dword [rsp + 0x68]
mov ecx, 0x40
div ecx
test eax, eax
je 0x18005ee12
xor edx, edx
mov eax, dword [rsp + 0x68]
mov ecx, 0x40
div ecx
test edx, edx
jne 0x18005ee12
cmp dword [rsp + 0x74], 8
ja 0x18005ee1e
mov eax, dword [rsp + 0x84]
jmp 0x18005f116
mov ecx, dword [rsp + 0x74]
lea rdx, [rsp + 0x58]
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
mov dword [rsp + 0x84], eax
cmp dword [rsp + 0x84], 0
jge 0x18005ee43
jmp 0x18005f0a9
lea rax, [rsp + 0x48]
mov qword [rsp + 0x30], rax
mov byte [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, 0x10000000
xor r8d, r8d
mov edx, 0x200
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ntoskrnl.exe_ObOpenObjectByPointer]
mov dword [rsp + 0x84], eax
cmp dword [rsp + 0x84], 0
je 0x18005ee8a
jmp 0x18005f0a9
mov qword [rsp + 0xc0], 0
mov qword [rsp + 0x90], 0
lea rdi, [rsp + 0x98]
xor eax, eax
mov ecx, 0x28
rep stosb byte [rdi], al
mov dword [rsp + 0x88], 0
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x50], rax
call qword [sym.imp.ntoskrnl.exe_IoGetCurrentProcess]
mov qword [rsp + 0x40], rax
xor eax, eax
cmp eax, 1
je 0x18005f09f
mov dword [rsp + 0x88], 0x30
lea rax, [rsp + 0x88]
mov qword [rsp + 0x28], rax
mov eax, dword [rsp + 0x88]
mov dword [rsp + 0x20], eax
lea r9, [rsp + 0x90]
xor r8d, r8d
mov rdx, qword [rsp + 0xc0]
mov rcx, qword [rsp + 0x48]
call fcn.18005f120
mov dword [rsp + 0x84], eax
cmp dword [rsp + 0x84], 0
jge 0x18005ef34
jmp 0x18005f09f
mov eax, dword [rsp + 0x6c]
cmp dword [rsp + 0xb8], eax
jne 0x18005f045
mov eax, dword [rsp + 0x70]
cmp dword [rsp + 0xb4], eax
jne 0x18005f045
mov rdx, qword [rsp + 0xa8]
xor ecx, ecx
call qword [sym.imp.ntoskrnl.exe_ExAllocatePool]
mov qword [rsp + 0x78], rax
cmp qword [rsp + 0x78], 0
jne 0x18005ef78
jmp 0x18005f09f
mov rdi, qword [rsp + 0x78]
xor eax, eax
mov rcx, qword [rsp + 0xa8]
rep stosb byte [rdi], al
mov qword [rsp + 0xc8], 0
lea rax, [rsp + 0xc8]
mov qword [rsp + 0x30], rax
mov byte [rsp + 0x28], 0
mov rax, qword [rsp + 0xa8]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0x78]
mov r8, qword [rsp + 0x40]
mov rdx, qword [rsp + 0xc0]
mov rcx, qword [rsp + 0x50]
call fcn.18005f480
mov dword [rsp + 0x84], eax
cmp dword [rsp + 0x84], 0
jl 0x18005f045
xor edx, edx
mov eax, dword [rsp + 0x68]
mov ecx, 0x40
div ecx
mov r9d, eax
mov r8, qword [rsp + 0x60]
mov rdx, qword [rsp + 0xc8]
mov rcx, qword [rsp + 0x78]
call fcn.18005ec80
mov dword [rsp + 0x80], eax
cmp dword [rsp + 0x80], 1
jne 0x18005f045
mov eax, dword [rsp + 0x74]
mov qword [rsp + 0xd0], rax
mov rcx, qword [rsp + 0xd0]
call fcn.1800067b0
mov rcx, qword [rsp + 0x48]
call fcn.18005f400
mov dword [rsp + 0x84], eax
jmp 0x18005f09f
cmp qword [rsp + 0x78], 0
je 0x18005f063
xor edx, edx
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov qword [rsp + 0x78], 0
mov rcx, qword [rsp + 0xa8]
mov rax, qword [rsp + 0xc0]
add rax, rcx
mov qword [rsp + 0xc0], rax
lea rdi, [rsp + 0x90]
xor eax, eax
mov ecx, 0x30
rep stosb byte [rdi], al
mov dword [rsp + 0x88], 0
jmp 0x18005eed3
xor eax, eax
test eax, eax
jne 0x18005ee1e
cmp qword [rsp + 0x78], 0
je 0x18005f0c7
xor edx, edx
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov qword [rsp + 0x78], 0
cmp qword [rsp + 0x48], 0
je 0x18005f0da
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ntoskrnl.exe_ZwClose]
cmp qword [rsp + 0x58], 0
je 0x18005f0ed
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
cmp dword [rsp + 0x80], 1
jne 0x18005f104
mov dword [rsp + 0xf0], 0
jmp 0x18005f10f
mov dword [rsp + 0xf0], 0xc0000001
mov eax, dword [rsp + 0xf0]
add rsp, 0x108
pop rdi
pop rsi
ret