Function at 0x11970
Capabilities:
Find process by pid

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x120d0
push 0x11ef8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x4c
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
xor ebx, ebx
mov dword [ebp - 4], ebx
mov edi, dword [ebp + 8]
mov eax, dword [edi]
cmp eax, 8
jae 0x119fc
lea ecx, [ebp - 0x20]
push ecx
push eax
call sub.ntoskrnl.exe_PsLookupProcessByProcessId
mov edx, dword [ebp - 0x20]
push edx
call sub.ntoskrnl.exe_KeAttachProcess
push ebx
lea eax, [ebp - 0x58]
push eax
push ebx
push ebx
push 0x80000000
mov ecx, dword [edi + 4]
push ecx
call dword [sym.imp.ntoskrnl.exe_ObReferenceObjectByHandle]
mov esi, eax
mov dword [ebp - 0x54], esi
call sub.ntoskrnl.exe_KeDetachProcess
cmp esi, ebx
jge 0x11ada
mov dword [ebp - 4], 0xffffffff
mov eax, esi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov dword [ebp - 0x3c], 0x18
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], ebx
lea edx, [ebp - 0x50]
push edx
lea eax, [ebp - 0x3c]
push eax
push 0x40
lea ecx, [ebp - 0x40]
push ecx
call sub.ntoskrnl.exe_ZwOpenProcess
mov dword [ebp - 0x54], eax
cmp eax, ebx
jge 0x11a4c
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
push 2
push ebx
push ebx
lea edx, [ebp - 0x5c]
push edx
push 0xffffffffffffffff
mov eax, dword [edi + 4]
push eax
mov ecx, dword [ebp - 0x40]
push ecx
call sub.ntoskrnl.exe_ZwDuplicateObject
mov esi, eax
mov dword [ebp - 0x54], esi
mov edx, dword [ebp - 0x40]
push edx
mov ebx, dword [sym.imp.ntoskrnl.exe_ZwClose]
call ebx
test esi, esi
jge 0x11a94
mov dword [ebp - 4], 0xffffffff
mov eax, esi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
push 0
lea eax, [ebp - 0x58]
push eax
push 0
push 0
push 0x80000000
mov ecx, dword [ebp - 0x5c]
push ecx
call dword [sym.imp.ntoskrnl.exe_ObReferenceObjectByHandle]
mov esi, eax
mov dword [ebp - 0x54], esi
mov edx, dword [ebp - 0x5c]
push edx
call ebx
test esi, esi
jge 0x11ad8
mov dword [ebp - 4], 0xffffffff
mov eax, esi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
xor ebx, ebx
mov ecx, dword [ebp - 0x58]
cmp ecx, dword [edi + 8]
je 0x11b07
call dword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
mov dword [ebp - 4], 0xffffffff
mov eax, 0xc0000024
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ecx], 0x700005
jne 0x11b2b
mov dword [ebp - 4], 0xffffffff
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
push 0x206b6444
push 0x400
push ebx
call dword [sym.imp.ntoskrnl.exe_ExAllocatePoolWithTag]
mov esi, eax
mov dword [ebp - 0x1c], esi
cmp esi, ebx
jne 0x11b6d
mov ecx, dword [ebp - 0x58]
call dword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
mov dword [ebp - 4], 0xffffffff
mov eax, 0xc000009a
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
lea eax, [ebp - 0x24]
push eax
push 0x400
push esi
mov ecx, dword [ebp - 0x58]
push ecx
call sub.ntoskrnl.exe_ObQueryNameString
mov edi, eax
mov dword [ebp - 0x54], edi
mov ecx, dword [ebp - 0x58]
call dword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
cmp edi, ebx
jge 0x11bb5
push esi
call dword [sym.imp.ntoskrnl.exe_ExFreePool]
mov dword [ebp - 4], 0xffffffff
mov eax, edi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
push 1
push esi
lea edx, [ebp - 0x48]
push edx
call dword [sym.imp.ntoskrnl.exe_RtlUnicodeStringToAnsiString]
mov edi, eax
mov dword [ebp - 0x54], edi
push esi
call dword [sym.imp.ntoskrnl.exe_ExFreePool]
cmp edi, ebx
jge 0x11bee
mov dword [ebp - 4], 0xffffffff
mov eax, edi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp - 0x48]
and eax, 0xffff
cmp eax, dword [ebp + 0x10]
jb 0x11c24
lea ecx, [ebp - 0x48]
push ecx
call dword [sym.imp.ntoskrnl.exe_RtlFreeAnsiString]
mov dword [ebp - 4], 0xffffffff
mov eax, 0xc0000023
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov edi, dword [ebp - 0x44]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [ebp + 0xc]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.ntoskrnl.exe_RtlFreeAnsiString]
mov dword [ebp - 4], 0xffffffff
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc