Function at 0x41a860
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xa4
mov eax, dword [0x5ac004]
xor eax, esp
mov dword [esp + 0xa0], eax
push ebx
push esi
push edi
push 5
lea eax, [esp + 0x14]
mov byte [esp + 0x10], 0
push eax
call sym.ProcessHacker.exe_PhEnumProcessesEx
mov dword [esp + 0x2c], eax
lfence
test eax, eax
js 0x41ad29
push dword [0x5b1d74]
push 0xc
call sym.ProcessHacker.exe_PhCreateObject
mov edi, eax
push 0xa0
push 4
push dword [0x5b1dac]
mov dword [esp + 0x24], edi
mov dword [edi], 0
mov dword [edi + 4], 0x28
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov esi, dword [esp + 0x10]
mov ecx, dword [edi]
mov dword [edi + 8], eax
lea esp, [esp]
mov eax, dword [edi + 4]
mov ebx, dword [esi + 0x44]
cmp ecx, eax
jne 0x41a90b
add eax, eax
mov dword [edi + 4], eax
shl eax, 2
push eax
push dword [edi + 8]
push 4
push dword [0x5b1dac]
call dword [sym.imp.ntdll.dll_RtlReAllocateHeap]
mov ecx, dword [edi]
mov dword [edi + 8], eax
mov eax, dword [edi + 8]
mov dword [eax + ecx*4], ebx
mov ecx, dword [edi]
inc ecx
mov dword [edi], ecx
mov eax, dword [esi]
test eax, eax
je 0x41a924
lea esp, [esp]
add esi, eax
jne 0x41a8e0
push dword [esp + 0x10]
push 0
push dword [0x5b1dac]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov ebx, 8
or esi, 0xffffffff
lea ecx, [ebx - 7]
cmp byte [0x5b18bb], 0
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], 0
je 0x41a9c5
lea eax, [esp + 0x78]
mov dword [esp + 0x34], 0x1000
mov dword [esp + 0x30], eax
lea eax, [esp + 0x1c]
mov dword [esp + 0x38], eax
mov eax, dword [0x5b1f40]
mov dword [esp + 0x3c], 0
test eax, eax
je 0x41a997
push 0
push 0
mov dword [esp + 0x44], eax
lea eax, [esp + 0x38]
push 0x10
push eax
lea eax, [esp + 0x78]
jmp 0x41aa97
lea eax, [esp + 0x3c]
mov edx, 0x4cc3b0
mov dword [esp + 0x24], eax
lea eax, [esp + 0x24]
push eax
call fcn.004cc340
push 0
push 0
lea eax, [esp + 0x38]
push 0x10
push eax
lea eax, [esp + 0x78]
jmp 0x41aa97
lea eax, [esp + 0x1c]
mov dword [esp + 0x50], 0x18
push eax
lea eax, [esp + 0x54]
mov dword [esp + 0x58], 0
push eax
push 0x1000
lea eax, [esp + 0x84]
mov dword [esp + 0x68], 0
push eax
mov dword [esp + 0x68], 0
mov dword [esp + 0x70], 0
mov dword [esp + 0x74], 0
call dword [sym.imp.ntdll.dll_NtOpenProcess]
mov edi, eax
cmp edi, 0xc0000022
jne 0x41aab1
cmp byte [0x5b18bb], 0
je 0x41aab1
lea eax, [esp + 0x78]
mov dword [esp + 0x44], 0x1000
mov dword [esp + 0x40], eax
lea eax, [esp + 0x1c]
mov dword [esp + 0x48], eax
mov eax, dword [0x5b1f40]
mov dword [esp + 0x4c], 0
test eax, eax
je 0x41aa64
mov dword [esp + 0x4c], eax
jmp 0x41aa85
lea eax, ds:[esp + 0x4c]
mov edx, 0x4cc3b0
mov dword [esp + 0x28], eax
mov ecx, 1
lea eax, [esp + 0x28]
push eax
call fcn.004cc340
push 0
push 0
lea eax, [esp + 0x48]
push 0x10
push eax
lea eax, [esp + 0x80]
push 0x999920cb
push eax
push 0
push 0
push 0
push dword [0x5b1f3c]
call dword [sym.imp.ntdll.dll_NtDeviceIoControlFile]
mov edi, eax
test edi, edi
js 0x41abd2
push 0
push 0x20
lea eax, [esp + 0x90]
mov dword [esp + 0x84], ebx
push eax
push 4
push dword [esp + 0x88]
call dword [sym.imp.ntdll.dll_NtQueryInformationProcess]
mov edi, eax
test edi, edi
js 0x41abc8
lea eax, [esp + 0x10]
push eax
push dword [esp + 0x7c]
call sym.ProcessHacker.exe_PhGetProcessImageFileName
mov edi, eax
test edi, edi
js 0x41abc8
mov esi, dword [esp + 0x10]
push esi
call sym.ProcessHacker.exe_PhGetFileName
lea ecx, [esi - 8]
mov dword [esp + 0x80], eax
or esi, 0xffffffff
mov eax, esi
lock xadd dword [ecx + 4], eax
dec eax
jne 0x41ab2e
call fcn.004b3960
mov eax, dword [esp + 0x90]
or eax, dword [esp + 0x94]
je 0x41ab4b
mov dword [esp + 0x84], 3
jmp 0x41ab89
mov ecx, dword [esp + 0x18]
xor eax, eax
mov edx, dword [ecx]
test edx, edx
je 0x41ab7e
mov ecx, dword [ecx + 8]
lea ebx, [ebx]
cmp dword [ecx], ebx
je 0x41ab6e
inc eax
add ecx, 4
cmp eax, edx
jb 0x41ab60
jmp 0x41ab7e
mov dword [esp + 0x84], 1
cmp eax, 0xffffffff
jne 0x41ab89
mov dword [esp + 0x84], 2
push 0
lea eax, [esp + 0x80]
push eax
call fcn.0041a320
mov ecx, dword ds:[esp + 0xc]
test al, al
movzx ecx, cl
mov eax, 1
cmove ecx, eax
mov eax, esi
mov dword [esp + 0xc], ecx
mov ecx, dword [esp + 0x80]
add ecx, 0xfffffff8
lock xadd dword [ecx + 4], eax
dec eax
jne 0x41abc8
call fcn.004b3960
push dword [esp + 0x78]
call dword [sym.imp.ntdll.dll_NtClose]
cmp edi, 0xc0000022
jne 0x41aca2
lea eax, [esp + 0x10]
push eax
push ebx
call sym.ProcessHacker.exe_PhGetProcessImageFileNameByProcessId
mov edi, eax
test edi, edi
js 0x41aca2
mov esi, dword ds:[esp + 0x10]
push esi
mov dword [esp + 0x80], ebx
call sym.ProcessHacker.exe_PhGetFileName
lea ecx, [esi - 8]
mov dword [esp + 0x80], eax
or esi, 0xffffffff
mov eax, esi
lock xadd dword [ecx + 4], eax
dec eax
jne 0x41ac25
lea esp, [esp]
call fcn.004b3960
mov edi, dword [esp + 0x18]
xor eax, eax
mov edx, dword [edi]
test edx, edx
je 0x41ac56
mov ecx, dword [edi + 8]
cmp dword [ecx], ebx
je 0x41ac46
inc eax
add ecx, 4
cmp eax, edx
jb 0x41ac34
jmp 0x41ac56
mov dword [esp + 0x84], 1
cmp eax, 0xffffffff
jne 0x41ac61
mov dword [esp + 0x84], 2
push 0
lea eax, [esp + 0x80]
push eax
call fcn.0041a320
mov edx, dword [esp + 0xc]
test al, al
mov eax, 1
movzx ecx, dl
cmove ecx, eax
mov eax, esi
mov byte [esp + 0xc], cl
mov ecx, dword [esp + 0x80]
add ecx, 0xfffffff8
lock xadd dword [ecx + 4], eax
dec eax
jne 0x41acf5
call fcn.004b3960
mov edi, edi
jmp 0x41acf5
cmp edi, 0xc000000b
je 0x41acf5
mov eax, dword [esp + 0xc]
mov dword [esp + 0xc], eax
cmp edi, 0xc000000d
je 0x41acf5
mov dl, al
mov dword [esp + 0xc], edx
test edi, edi
jns 0x41acf5
mov byte [esp + 0xc], al
lea eax, [esp + 0x7c]
push 0
push eax
mov dword [esp + 0x84], ebx
mov dword [esp + 0x88], 0
mov dword [esp + 0x8c], 0
call fcn.0041a320
test al, al
je 0x41ad10
cmp byte [esp + 0xc], 0
jne 0x41ad10
add ebx, 4
mov ecx, 1
cmp ebx, 0x10000
jbe 0x41a941
mov ecx, dword [esp + 0x18]
add ecx, 0xfffffff8
lock xadd dword [ecx + 4], esi
dec esi
jne 0x41ad25
nop
call fcn.004b3960
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0xac]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0051e068
mov esp, ebp
pop ebp
ret