Function at 0x40f7b4
Capabilities:
Enumerate services
Query service configuration

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffbc4
push ebx
xor edx, edx
mov dword [ebp - 0x20], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x40fa2a
push dword fs:[eax]
mov dword fs:[eax], esp
push 0
push 0
mov eax, dword [ebp - 4]
call fcn.00406824
push 0xf003f
push 0
push 0
call sub.advapi32.dll_OpenSCManagerA
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x40fa0e
xor eax, eax
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
push 0
mov eax, dword [ebp - 0x20]
push eax
push 3
push 0x30
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_EnumServicesStatusA
mov eax, dword [ebp - 0x14]
mov ecx, 0x24
xor edx, edx
div ecx
inc eax
push eax
lea eax, [ebp - 0x20]
mov ecx, 1
mov edx, dword [0x40f790]
call fcn.00404994
add esp, 4
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x20]
push eax
push 3
push 0x30
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_EnumServicesStatusA
mov eax, dword [ebp - 0x18]
dec eax
test eax, eax
jl 0x40f9ed
inc eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 8], 0
lea eax, [ebp - 0x43c]
xor ecx, ecx
mov edx, 0x408
call fcn.00402f54
lea eax, [ebp - 0x43c]
mov ebx, dword [ebp - 8]
lea ebx, [ebx + ebx*8]
mov edx, dword [ebp - 0x20]
mov edx, dword [edx + ebx*4]
call fcn.004031b0
lea eax, [ebp - 0x33c]
mov edx, dword [ebp - 0x20]
mov edx, dword [edx + ebx*4 + 4]
call fcn.004031b0
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + ebx*4 + 0xc]
mov dword [ebp - 0x13c], eax
push 0xf01ff
mov eax, dword [ebp - 8]
lea eax, [eax + eax*8]
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + eax*4]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_OpenServiceA
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x40f9e1
xor eax, eax
push ebp
push 0x40f9d1
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x2c]
push eax
push 0
push 0
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_QueryServiceConfigA
mov eax, dword [ebp - 0x2c]
call fcn.004055fc
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_QueryServiceConfigA
lea eax, [ebp - 0x30]
push eax
push 0
push 0
push 1
mov eax, dword [ebp - 0x10]
push eax
mov eax, dword [0x41e094]
mov eax, dword [eax]
call eax
mov eax, dword [ebp - 0x30]
call fcn.004055fc
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x30]
push eax
mov eax, dword [ebp - 0x30]
push eax
mov eax, dword [ebp - 0x28]
push eax
push 1
mov eax, dword [ebp - 0x10]
push eax
mov eax, dword [0x41e094]
mov eax, dword [eax]
call eax
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 4]
mov dword [ebp - 0x138], eax
mov eax, dword [ebp - 0x24]
mov ebx, dword [eax + 0xc]
test ebx, ebx
je 0x40f98a
lea eax, [ebp - 0x134]
mov edx, ebx
call fcn.004031b0
mov eax, dword [ebp - 0x28]
mov ebx, dword [eax]
test ebx, ebx
je 0x40f9a0
lea eax, [ebp - 0x23c]
mov edx, ebx
call fcn.004031b0
lea edx, [ebp - 0x43c]
mov ecx, 0x408
mov eax, dword [ebp - 4]
call fcn.0040697c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40f9d8
mov eax, dword [ebp - 0x24]
call fcn.0040289c
mov eax, dword [ebp - 0x28]
call fcn.0040289c
ret
inc dword [ebp - 8]
dec dword [ebp - 0x34]
jne 0x40f87b
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_CloseServiceHandle
push 0
lea eax, [ebp - 0x20]
mov ecx, 1
mov edx, dword [0x40f790]
call fcn.00404994
add esp, 4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40fa31
lea eax, [ebp - 0x20]
mov edx, dword [0x40f790]
call fcn.004049a0
ret