Function at 0x4c3f50
Capabilities:
Get process image filename

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x560526
mov eax, dword fs:[0]
push eax
sub esp, 0x664
mov eax, dword [0x5c7cec]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x668], ebx
mov dword [ebp - 0x66c], eax
mov byte [ebp - 0x661], 0
test eax, eax
je 0x4c3fa4
mov dword [eax], 0
test edi, edi
je 0x4c3fae
mov dword [edi], 0
push 0x200
lea eax, [ebp - 0x210]
push 0
push eax
call fcn.005290f0
add esp, 0xc
test ebx, ebx
je 0x4c404c
push str.CicMarshalWnd
lea eax, [ebp - 0x210]
push 0x100
push eax
call fcn.00406577
add esp, 0xc
test eax, eax
jne 0x4c404c
lea eax, [ebp - 0x210]
push 0x100
push eax
call fcn.0040e4c5
add esp, 8
cmp eax, 0x100
jae 0x4c404c
lea ecx, [ebp - 0x210]
mov edx, ebx
lea ecx, [ecx + eax*2]
lea eax, [ebp - 0x10]
cmp ecx, eax
jae 0x4c4036
test edx, edx
je 0x4c4234
mov eax, edx
shr edx, 4
and eax, 0xf
add eax, 0x41
mov word [ecx], ax
add ecx, 2
lea eax, [ebp - 0x10]
cmp ecx, eax
jb 0x4c4016
push 0x200
lea eax, [ebp - 0x210]
push 0
push eax
call fcn.005290f0
add esp, 0xc
xor eax, eax
mov dword [ebp - 0x64c], 0
lea ecx, [ebp - 0x210]
mov dword [ebp - 0x648], 7
mov word [ebp - 0x65c], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4c4072
sub ecx, edx
lea eax, [ebp - 0x210]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x65c]
call fcn.00408740
cmp dword [ebp - 0x64c], 0
mov dword [ebp - 4], 0
je 0x4c42a9
cmp dword [ebp - 0x648], 8
lea eax, [ebp - 0x65c]
cmovae eax, dword [ebp - 0x65c]
push eax
push str.CicMarshalWndClass
push 0
push 0xfffffffffffffffd
call dword [sym.imp.USER32.dll_FindWindowExW]
mov dword [ebp - 0x670], eax
test eax, eax
je 0x4c42a9
lea ecx, [ebp - 0x62c]
mov dword [ebp - 0x62c], 0
push ecx
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
cmp eax, ebx
jne 0x4c42a9
push 0x20a
lea eax, [ebp - 0x628]
push 0
push eax
call fcn.005290f0
add esp, 0xc
xor bl, bl
push dword [ebp - 0x62c]
push 0
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x4c4192
push 0x20a
lea eax, [ebp - 0x41c]
push 0
push eax
call fcn.005290f0
add esp, 0xc
lea eax, [ebp - 0x41c]
push 0x105
push eax
push esi
call sub.PSAPI.DLL_GetProcessImageFileNameW
test eax, eax
je 0x4c418b
push 0
push 0
push 0x105
lea eax, [ebp - 0x628]
push eax
push 0
push 0
push 0
lea eax, [ebp - 0x41c]
push 0
push eax
call fcn.0040d6a5
add esp, 0x24
movzx ebx, bl
test eax, eax
mov ecx, 1
cmove ebx, ecx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test bl, bl
mov dword [ebp - 0x634], 0
mov eax, 0x569908
mov dword [ebp - 0x630], 7
lea edx, [ebp - 0x628]
cmove edx, eax
xor eax, eax
mov ecx, edx
mov word [ebp - 0x644], ax
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4c41c4
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x644]
call fcn.00408740
cmp dword [ebp - 0x630], 8
lea eax, [ebp - 0x644]
push str.explorer
cmovae eax, dword [ebp - 0x644]
push eax
mov byte [ebp - 4], 1
call fcn.0040b363
add esp, 8
test eax, eax
je 0x4c4249
cmp dword [ebp - 0x630], 8
lea eax, [ebp - 0x644]
push str.ctfmon
cmovae eax, dword [ebp - 0x644]
push eax
call fcn.0040b363
add esp, 8
test eax, eax
je 0x4c4249
xor bl, bl
jmp 0x4c424b
lea eax, [ebp - 0x10]
cmp ecx, eax
jae 0x4c4036
xor eax, eax
mov word [ecx], ax
jmp 0x4c404c
mov bl, 1
lea ecx, [ebp - 0x644]
mov byte [ebp - 4], 0
call fcn.00408e50
test bl, bl
je 0x4c42a9
lea eax, [ebp - 0x660]
mov dword [ebp - 0x660], 0
push eax
push 0x4c5680
push dword [ebp - 0x668]
call dword [sym.imp.USER32.dll_EnumThreadWindows]
mov eax, dword [ebp - 0x660]
test eax, eax
je 0x4c42a9
mov ecx, dword [ebp - 0x66c]
test ecx, ecx
je 0x4c429c
mov edx, dword [ebp - 0x670]
mov dword [ecx], edx
test edi, edi
je 0x4c42a2
mov dword [edi], eax
mov byte [ebp - 0x661], 1
lea ecx, [ebp - 0x65c]
call fcn.00408e50
mov al, byte [ebp - 0x661]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040154f
mov esp, ebp
pop ebp
ret