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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xa4
mov eax, dword [0x5c7004]
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 0x41d3e9
push dword [0x5cd4fc]
push 0xc
call sym.ProcessHacker.exe_PhCreateObject
mov edi, eax
push 0xa0
push 4
push dword [0x5cd55c]
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 0x41cfcb
add eax, eax
mov dword [edi + 4], eax
shl eax, 2
push eax
push dword [edi + 8]
push 4
push dword [0x5cd55c]
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 0x41cfe4
lea esp, [esp]
add esi, eax
jne 0x41cfa0
push dword [esp + 0x10]
push 0
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov ebx, 8
or esi, 0xffffffff
lea ecx, [ebx - 7]
cmp byte [0x5cd02b], 0
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], 0
je 0x41d085
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 [0x5cd6d8]
mov dword [esp + 0x3c], 0
test eax, eax
je 0x41d057
push 0
push 0
mov dword [esp + 0x44], eax
lea eax, [esp + 0x38]
push 0x10
push eax
lea eax, [esp + 0x78]
jmp 0x41d157
lea eax, [esp + 0x3c]
mov edx, 0x4dd530
mov dword [esp + 0x24], eax
lea eax, [esp + 0x24]
push eax
call fcn.004dd4c0
push 0
push 0
lea eax, [esp + 0x38]
push 0x10
push eax
lea eax, [esp + 0x78]
jmp 0x41d157
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 0x41d171
cmp byte [0x5cd02b], 0
je 0x41d171
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 [0x5cd6d8]
mov dword [esp + 0x4c], 0
test eax, eax
je 0x41d124
mov dword [esp + 0x4c], eax
jmp 0x41d145
lea eax, ds:[esp + 0x4c]
mov edx, 0x4dd530
mov dword [esp + 0x28], eax
mov ecx, 1
lea eax, [esp + 0x28]
push eax
call fcn.004dd4c0
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 [0x5cd6d4]
call dword [sym.imp.ntdll.dll_NtDeviceIoControlFile]
mov edi, eax
test edi, edi
js 0x41d292
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 0x41d288
lea eax, [esp + 0x10]
push eax
push dword [esp + 0x7c]
call sym.ProcessHacker.exe_PhGetProcessImageFileName
mov edi, eax
test edi, edi
js 0x41d288
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 0x41d1ee
call fcn.004c1f60
mov eax, dword [esp + 0x90]
or eax, dword [esp + 0x94]
je 0x41d20b
mov dword [esp + 0x84], 3
jmp 0x41d249
mov ecx, dword [esp + 0x18]
xor eax, eax
mov edx, dword [ecx]
test edx, edx
je 0x41d23e
mov ecx, dword [ecx + 8]
lea ebx, [ebx]
cmp dword [ecx], ebx
je 0x41d22e
inc eax
add ecx, 4
cmp eax, edx
jb 0x41d220
jmp 0x41d23e
mov dword [esp + 0x84], 1
cmp eax, 0xffffffff
jne 0x41d249
mov dword [esp + 0x84], 2
push 0
lea eax, [esp + 0x80]
push eax
call fcn.0041ca20
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 0x41d288
call fcn.004c1f60
push dword [esp + 0x78]
call dword [sym.imp.ntdll.dll_NtClose]
cmp edi, 0xc0000022
jne 0x41d362
lea eax, [esp + 0x10]
push eax
push ebx
call sym.ProcessHacker.exe_PhGetProcessImageFileNameByProcessId
mov edi, eax
test edi, edi
js 0x41d362
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 0x41d2e5
lea esp, [esp]
call fcn.004c1f60
mov edi, dword [esp + 0x18]
xor eax, eax
mov edx, dword [edi]
test edx, edx
je 0x41d316
mov ecx, dword [edi + 8]
cmp dword [ecx], ebx
je 0x41d306
inc eax
add ecx, 4
cmp eax, edx
jb 0x41d2f4
jmp 0x41d316
mov dword [esp + 0x84], 1
cmp eax, 0xffffffff
jne 0x41d321
mov dword [esp + 0x84], 2
push 0
lea eax, [esp + 0x80]
push eax
call fcn.0041ca20
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 0x41d3b5
call fcn.004c1f60
mov edi, edi
jmp 0x41d3b5
cmp edi, 0xc000000b
je 0x41d3b5
mov eax, dword [esp + 0xc]
mov dword [esp + 0xc], eax
cmp edi, 0xc000000d
je 0x41d3b5
mov dl, al
mov dword [esp + 0xc], edx
test edi, edi
jns 0x41d3b5
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.0041ca20
test al, al
je 0x41d3d0
cmp byte [esp + 0xc], 0
jne 0x41d3d0
add ebx, 4
mov ecx, 1
cmp ebx, 0x10000
jbe 0x41d001
mov ecx, dword [esp + 0x18]
add ecx, 0xfffffff8
lock xadd dword [ecx + 4], esi
dec esi
jne 0x41d3e5
nop
call fcn.004c1f60
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0xac]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00534c91
mov esp, ebp
pop ebp
ret