Function at 0x180007020
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 [0x18008ee84]
test eax, eax
jne 0x18000709f
mov eax, dword [rsp + 0x84]
jmp 0x180007416
cmp qword [rsp + 0x120], 0
jne 0x1800070b6
mov eax, dword [rsp + 0x84]
jmp 0x180007416
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 0x180007112
xor edx, edx
mov eax, dword [rsp + 0x68]
mov ecx, 0x40
div ecx
test eax, eax
je 0x180007112
xor edx, edx
mov eax, dword [rsp + 0x68]
mov ecx, 0x40
div ecx
test edx, edx
jne 0x180007112
cmp dword [rsp + 0x74], 8
ja 0x18000711e
mov eax, dword [rsp + 0x84]
jmp 0x180007416
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 0x180007143
jmp 0x1800073a9
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 0x18000718a
jmp 0x1800073a9
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 0x18000739f
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.180007420
mov dword [rsp + 0x84], eax
cmp dword [rsp + 0x84], 0
jge 0x180007234
jmp 0x18000739f
mov eax, dword [rsp + 0x6c]
cmp dword [rsp + 0xb8], eax
jne 0x180007345
mov eax, dword [rsp + 0x70]
cmp dword [rsp + 0xb4], eax
jne 0x180007345
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 0x180007278
jmp 0x18000739f
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.180007780
mov dword [rsp + 0x84], eax
cmp dword [rsp + 0x84], 0
jl 0x180007345
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.180006f80
mov dword [rsp + 0x80], eax
cmp dword [rsp + 0x80], 1
jne 0x180007345
mov eax, dword [rsp + 0x74]
mov qword [rsp + 0xd0], rax
mov rcx, qword [rsp + 0xd0]
call fcn.180006740
mov rcx, qword [rsp + 0x48]
call fcn.180007700
mov dword [rsp + 0x84], eax
jmp 0x18000739f
cmp qword [rsp + 0x78], 0
je 0x180007363
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 0x1800071d3
xor eax, eax
test eax, eax
jne 0x18000711e
cmp qword [rsp + 0x78], 0
je 0x1800073c7
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 0x1800073da
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ntoskrnl.exe_ZwClose]
cmp qword [rsp + 0x58], 0
je 0x1800073ed
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
cmp dword [rsp + 0x80], 1
jne 0x180007404
mov dword [rsp + 0xf0], 0
jmp 0x18000740f
mov dword [rsp + 0xf0], 0xc0000001
mov eax, dword [rsp + 0xf0]
add rsp, 0x108
pop rdi
pop rsi
ret