Function at 0x4c8522
Capabilities:
Check if file exists
Enumerate processes
Get common file path
Get file attributes

Disassembly:
sub esp, 0x704
lea eax, [esp + 0x2f0]
push ebx
push ebp
push esi
push edi
xor esi, esi
mov ebx, ecx
push esi
push 0x19
push eax
push esi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x4c8553
lea eax, [esp + 0x300]
push eax
jmp 0x4c8863
push esi
push 2
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov edi, eax
cmp edi, 0xffffffff
je 0x4c885e
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], esi
call fcn.004cefaf
mov dword [esp + 0x18], eax
lea eax, [esp + 0xd0]
push eax
push edi
mov dword [esp + 0xd8], 0x22c
call dword [sym.imp.KERNEL32.dll_Process32FirstW]
jmp 0x4c865b
push dword [esp + 0xd8]
xor eax, eax
mov dword [esp + 0x4c], esi
push esi
push 0x400
mov dword [esp + 0x58], 7
mov word [esp + 0x44], ax
mov dword [esp + 0x6c], esi
mov dword [esp + 0x70], 7
mov word [esp + 0x5c], ax
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ebp, eax
test ebp, ebp
je 0x4c863a
lea eax, [esp + 0x14]
mov dword [esp + 0x14], esi
push eax
push 8
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x4c85f3
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4c863a
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x50]
push eax
lea edx, [esp + 0x3c]
call fcn.004c83f5
pop ecx
push dword [esp + 0x14]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x4c8638
push dword [esp + 0x14]
lea eax, [esp + 0x3c]
push eax
push ecx
lea eax, [esp + 0x8c]
push eax
lea ecx, [esp + 0x28]
call fcn.004d0855
xor esi, esi
lea ecx, [esp + 0x50]
call fcn.0043c274
lea ecx, [esp + 0x38]
call fcn.0043c274
lea eax, [esp + 0xd0]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_Process32NextW]
test eax, eax
jne 0x4c8597
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
push 0x19
lea eax, [esp + 0x510]
push eax
push esi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x4c8837
xor eax, eax
mov dword [esp + 0x30], esi
mov word [esp + 0x20], ax
lea ecx, [esp + 0x20]
lea eax, [esp + 0x508]
mov dword [esp + 0x34], 7
push eax
call fcn.0043c2b9
cmp dword [esp + 0x34], 8
lea ecx, [esp + 0x20]
mov esi, dword [esp + 0x30]
mov edx, esi
cmovae ecx, dword [esp + 0x20]
push ecx
push 0xffffffffffffffff
call fcn.004d009f
add esp, 8
mov edi, eax
sub esi, edi
lea eax, [esp + 0x38]
dec esi
push esi
lea ecx, [edi + 1]
push ecx
push eax
lea ecx, [esp + 0x2c]
call fcn.0049fcbe
cmp dword [esp + 0x34], 8
lea ecx, [esp + 0x20]
mov edx, dword [esp + 0x30]
lea eax, [edi - 1]
cmovae ecx, dword [esp + 0x20]
push ecx
push eax
call fcn.004d009f
add esp, 8
lea ecx, [esp + 0x20]
push eax
push 0
lea eax, [esp + 0x70]
push eax
call fcn.0049fcbe
mov eax, dword [esp + 0x18]
mov esi, dword [eax]
cmp esi, eax
je 0x4c881c
mov edi, 0x559268
push edi
lea edx, [esp + 0x6c]
lea ecx, [esp + 0xbc]
call fcn.0043de19
pop ecx
lea ecx, [esi + 0x10]
push ecx
mov ecx, eax
call fcn.0043c3ca
push eax
lea ecx, [esp + 0x8c]
call fcn.0043a41d
push edi
lea edx, [esp + 0x8c]
lea ecx, [esp + 0xa4]
call fcn.0043de86
cmp dword [esp + 0x50], 8
pop ecx
push dword [esp + 0x48]
lea ecx, [esp + 0x3c]
cmovae ecx, dword [esp + 0x3c]
push ecx
mov ecx, eax
call fcn.0043d30e
push eax
lea ecx, [esp + 0x54]
call fcn.0043a41d
lea ecx, [esp + 0xa0]
call fcn.0043c274
lea ecx, [esp + 0x88]
call fcn.0043c274
lea ecx, [esp + 0xb8]
call fcn.0043c274
cmp dword [esp + 0x64], 8
lea eax, [esp + 0x50]
cmovae eax, dword [esp + 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4c87cb
test al, 0x10
jne 0x4c8877
lea ecx, [esp + 0x50]
call fcn.0043c274
cmp byte [esi + 0xd], 0
jne 0x4c8812
mov eax, dword [esi + 8]
cmp byte [eax + 0xd], 0
jne 0x4c87fb
mov esi, eax
mov ecx, dword [esi]
cmp byte [ecx + 0xd], 0
jne 0x4c8812
mov eax, dword [ecx]
mov esi, ecx
mov ecx, eax
cmp byte [eax + 0xd], 0
je 0x4c87ed
jmp 0x4c8812
mov eax, dword [esi + 4]
jmp 0x4c880a
cmp esi, dword [eax + 8]
jne 0x4c8810
mov esi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0xd], 0
je 0x4c8800
mov esi, eax
cmp esi, dword [esp + 0x18]
jne 0x4c8722
lea ecx, [esp + 0x68]
call fcn.0043c274
lea ecx, [esp + 0x38]
call fcn.0043c274
lea ecx, [esp + 0x20]
call fcn.0043c274
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x18]
push eax
push dword [eax]
lea eax, [esp + 0x1c]
push eax
call fcn.004cd048
push 4
push 0x28
push 1
push dword [esp + 0x24]
call fcn.0043467a
add esp, 0x10
push 0x54de54
mov ecx, ebx
call fcn.0043a44d
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x704
ret
lea eax, [esp + 0x50]
mov ecx, ebx
push eax
call fcn.0043a41d
lea ecx, [esp + 0x50]
call fcn.0043c274
lea ecx, [esp + 0x68]
call fcn.0043c274
lea ecx, [esp + 0x38]
call fcn.0043c274
lea ecx, [esp + 0x20]
call fcn.0043c274
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x18]
push eax
push dword [eax]
lea eax, [esp + 0x1c]
push eax
call fcn.004cd048
push 4
push 0x28
push 1
push dword [esp + 0x24]
call fcn.0043467a
add esp, 0x10
jmp 0x4c886a