Function at 0x40c680
Capabilities:
Accept command line arguments
Enumerate processes
Enumerate services
Get process image filename

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x684
mov eax, dword [0x455008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x228
lea eax, [ebp - 0x66c]
mov dword [ebp - 0x670], 0x22c
mov ebx, ecx
push 0
push eax
mov dword [ebp - 0x67c], ebx
call fcn.00417b90
mov esi, dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
add esp, 0xc
cmp byte [ebx + 0x79b], 0
je 0x40c7c7
push 0x228
lea eax, [ebp - 0x43c]
push 0
push eax
call fcn.00417b90
add esp, 0xc
lea eax, [ebp - 0x210]
xor ebx, ebx
push 0x208
push ebx
push eax
call fcn.00417b90
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push ebx
push 2
mov edi, eax
call esi
mov esi, eax
cmp esi, 0xffffffff
je 0x40c7a3
lea eax, [ebp - 0x440]
mov dword [ebp - 0x440], 0x22c
push eax
push esi
call dword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
je 0x40c754
cmp edi, dword [ebp - 0x438]
je 0x40c74e
lea eax, [ebp - 0x440]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_Process32NextW]
test eax, eax
jne 0x40c732
jmp 0x40c754
mov ebx, dword [ebp - 0x428]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x40c7a3
push ebx
push 0
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
test eax, eax
je 0x40c7a3
push 0x104
lea ecx, [ebp - 0x210]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_K32GetProcessImageFileNameW]
test eax, eax
je 0x40c7a3
push 0x44511c
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
test eax, eax
setne al
test al, al
jne 0x40c7c1
mov ecx, dword [ebp - 0x67c]
call fcn.0040cca0
push dword [0x456680]
push 0x448f20
call fcn.00401380
add esp, 8
mov esi, dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
push 0
push 2
call esi
mov edi, eax
test edi, edi
je 0x40cb4f
lea eax, [ebp - 0x670]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
je 0x40c8b6
push dword [0x456680]
call fcn.00420470
mov ebx, eax
add esp, 4
mov eax, dword [0x456680]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40c805
sub eax, edx
sar eax, 1
inc eax
push eax
push ebx
call fcn.004280db
add esp, 8
nop
lea eax, [ebp - 0x64c]
push eax
call fcn.00420470
add esp, 4
mov esi, eax
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40c834
sub eax, edx
sar eax, 1
inc eax
push eax
push esi
call fcn.004280db
mov eax, ebx
add esp, 8
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40c853
sub eax, edx
sar eax, 1
push eax
push ebx
push esi
call fcn.00428129
add esp, 0xc
test eax, eax
jne 0x40c888
cmp dword [0x456670], eax
jne 0x40c928
mov eax, dword [ebp - 0x668]
mov dword [0x456670], eax
push esi
call fcn.0041f006
add esp, 4
lea eax, [ebp - 0x670]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_Process32NextW]
test eax, eax
jne 0x40c820
push ebx
call fcn.0041f006
mov esi, dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [0x456670]
test ecx, ecx
jne 0x40c9c1
mov ebx, dword [ebp - 0x67c]
cmp byte [ebx + 0x79b], cl
je 0x40c8fb
mov eax, dword [0x456674]
test eax, eax
jne 0x40c900
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [0x456670]
test ecx, ecx
jne 0x40c9c1
mov eax, dword [0x456674]
cmp byte [ebx + 0x79b], 0
je 0x40c9c6
test eax, eax
je 0x40c7c7
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00415f69
mov esp, ebp
pop ebp
ret
push ebx
call fcn.0041f006
add esp, 4
push esi
call fcn.0041f006
mov edi, dword [ebp - 0x67c]
add esp, 4
push 0
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x40c98d
lea eax, [ebp - 0x674]
push eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov esi, eax
test esi, esi
je 0x40c982
push esi
lea edx, [ebp - 0x674]
call fcn.00402190
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x40c99d
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x40c99d
call dword [sym.imp.KERNEL32.dll_DebugBreak]
push 0x448f68
push 1
push 0
call fcn.00414dd0
add esp, 0xc
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00415f69
mov esp, ebp
pop ebp
ret
mov eax, dword [0x456674]
test eax, eax
jne 0x40c915
test ecx, ecx
jne 0x40c915
push 4
push ecx
push ecx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
mov dword [ebp - 0x684], edi
test edi, edi
je 0x40cae3
xor esi, esi
mov dword [ebp - 0x680], 0
push esi
lea eax, [ebp - 0x680]
push eax
lea eax, [ebp - 0x674]
push eax
lea eax, [ebp - 0x678]
push eax
push dword [ebp - 0x678]
push esi
push 1
push 0x30
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_EnumServicesStatusExW]
test eax, eax
jne 0x40ca8f
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
nop
call ebx
cmp eax, 0xea
jne 0x40ca8f
mov dword [ebp - 0x680], 0
test esi, esi
je 0x40ca50
push esi
call fcn.0041f006
add esp, 4
push dword [ebp - 0x678]
call fcn.0041f021
add esp, 4
mov esi, eax
lea eax, [ebp - 0x680]
push 0
push eax
lea eax, [ebp - 0x674]
push eax
lea eax, [ebp - 0x678]
push eax
push dword [ebp - 0x678]
push esi
push 1
push 0x30
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_EnumServicesStatusExW]
test eax, eax
je 0x40ca30
xor edi, edi
cmp dword [ebp - 0x674], edi
jbe 0x40cace
mov ebx, esi
nop dword [eax + eax]
push dword [ebx]
push dword [0x456680]
call fcn.0041eafa
add esp, 8
test eax, eax
je 0x40cac2
inc edi
add ebx, 0x2c
cmp edi, dword [ebp - 0x674]
jb 0x40caa0
jmp 0x40cace
imul eax, edi, 0x2c
mov eax, dword [eax + esi + 0x24]
mov dword [0x456670], eax
push esi
call fcn.0041f006
add esp, 4
push dword [ebp - 0x684]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp dword [0x456674], 0
jne 0x40c915
cmp dword [0x456670], 0
jne 0x40c915
mov ecx, dword [ebp - 0x67c]
call fcn.0040cca0
push 0x448fc8
call fcn.00401380
add esp, 4
push 0x449038
call fcn.00401380
add esp, 4
push 0x4490cc
call fcn.00401380
add esp, 4
push 0x449108
call fcn.00401380
add esp, 4
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00415f69
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 4]
xor al, al
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00415f69
mov esp, ebp
pop ebp
ret