Function at 0x4c8aa0
Capabilities:
Enumerate services

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb0
xor edx, edx
mov dword [ebp - 0x50], edx
mov dword [ebp - 0x4c], edx
mov dword [ebp - 0x48], edx
mov dword [ebp - 0x44], edx
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x40], edx
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x2c], edx
mov dword [ebp - 8], eax
xor eax, eax
push ebp
push 0x4c8ce1
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x80000000
push 0
push 0
call sub.advapi32.dll_OpenSCManagerW
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x4c8cb6
lea eax, [ebp - 0x28]
call fcn.0040661c
xor eax, eax
mov dword [ebp - 0x1c], eax
xor eax, eax
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x28]
call fcn.00406ad8
test eax, eax
jle 0x4c8b1d
lea eax, [ebp - 0x28]
call fcn.00406b9c
mov dword [ebp - 0x20], eax
jmp 0x4c8b22
xor eax, eax
mov dword [ebp - 0x20], eax
xor eax, eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x28]
call fcn.00406ad8
push eax
mov eax, dword [ebp - 0x20]
push eax
push 3
push 0x13f
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_EnumServicesStatusW
mov dword [ebp - 0x24], eax
call sub.kernel32.dll_GetLastError_2
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x18], 0
jbe 0x4c8c8a
cmp dword [ebp - 0x24], 0
jne 0x4c8b78
cmp dword [ebp - 0x10], 0xea
jne 0x4c8c8a
mov eax, dword [ebp - 0x18]
dec eax
test eax, eax
jb 0x4c8c8a
inc eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0xc], 0
mov eax, dword [ebp - 8]
call fcn.0042c230
test eax, eax
jle 0x4c8ba5
xor edx, edx
mov eax, dword [ebp - 8]
call fcn.0042be70
lea eax, [ebp - 0x38]
mov edx, dword [ebp - 0x20]
mov edx, dword [edx]
call fcn.00407320
mov ecx, dword [ebp - 0x38]
lea eax, [ebp - 0x34]
mov edx, 0x4c8cf8
call fcn.004074b8
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 8]
call fcn.0042be70
lea eax, [ebp - 0x40]
mov edx, dword [ebp - 0x20]
mov edx, dword [edx + 4]
call fcn.00407320
mov ecx, dword [ebp - 0x40]
lea eax, [ebp - 0x3c]
mov edx, 0x4c8d20
call fcn.004074b8
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp - 8]
call fcn.0042be70
push ebp
lea edx, [ebp - 0x44]
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 8]
call fcn.004c8190
pop ecx
mov edx, dword [ebp - 0x44]
lea eax, [ebp - 0x2c]
call fcn.00406a04
cmp dword [ebp - 0x2c], 0
je 0x4c8c32
lea eax, [ebp - 0x48]
mov ecx, dword [ebp - 0x2c]
mov edx, 0x4c8d48
call fcn.004074b8
mov edx, dword [ebp - 0x48]
mov eax, dword [ebp - 8]
call fcn.0042be70
push ebp
lea edx, [ebp - 0x4c]
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0xc]
call fcn.004c83d0
pop ecx
mov edx, dword [ebp - 0x4c]
lea eax, [ebp - 0x2c]
call fcn.00406a04
cmp dword [ebp - 0x2c], 0
je 0x4c8c6e
lea eax, [ebp - 0x50]
mov ecx, dword [ebp - 0x2c]
mov edx, 0x4c8d70
call fcn.004074b8
mov edx, dword [ebp - 0x50]
mov eax, dword [ebp - 8]
call fcn.0042be70
push ebp
mov eax, dword [ebp - 0x20]
mov eax, dword [eax]
call fcn.004c87a0
pop ecx
add dword [ebp - 0x20], 0x24
inc dword [ebp - 0xc]
dec dword [ebp - 0x30]
jne 0x4c8b8f
cmp dword [ebp - 0x24], 0
jne 0x4c8ca3
cmp dword [ebp - 0x14], 0
jbe 0x4c8ca3
lea eax, [ebp - 0x28]
xor ecx, ecx
mov edx, dword [ebp - 0x14]
call fcn.0040706c
cmp dword [ebp - 0x24], 0
jne 0x4c8cb6
cmp dword [ebp - 0x10], 0xea
je 0x4c8aff
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4c8ce8
lea eax, [ebp - 0x50]
mov edx, 8
call fcn.00406658
lea eax, [ebp - 0x2c]
call fcn.004065f8
lea eax, [ebp - 0x28]
call fcn.0040661c
ret