Function at 0x40805c
Capabilities:
Enumerate services

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff60
push ebx
push esi
push edi
mov eax, 0x5c2c7c
call fcn.00496b84
mov word [ebp - 0x54], 8
xor edx, edx
mov dword [ebp - 0x7c], edx
mov word [ebp - 0x54], 8
mov dl, 1
mov eax, dword [0x480f34]
call fcn.0040358c
mov dword [ebp - 0x84], eax
mov word [ebp - 0x54], 0x14
lea eax, [ebp - 4]
call fcn.00401ab4
inc dword [ebp - 0x48]
mov word [ebp - 0x54], 0x20
mov word [ebp - 0x54], 0x2c
lea eax, [ebp - 8]
call fcn.00401ab4
inc dword [ebp - 0x48]
mov word [ebp - 0x54], 0x20
push 0xf003f
push 0
push 0
call sub.ADVAPI32.DLL_OpenSCManagerA
mov dword [ebp - 0x68], eax
lea edx, [ebp - 0x7c]
push edx
lea ecx, [ebp - 0x78]
push ecx
lea eax, [ebp - 0x74]
push eax
push 0
push 0
push dword [ebp + 0xc]
push 0x30
push dword [ebp - 0x68]
call sub.ADVAPI32.DLL_EnumServicesStatusA
push dword [ebp - 0x74]
call fcn.0049618c
pop ecx
mov dword [ebp - 0x70], eax
lea edx, [ebp - 0x7c]
push edx
lea ecx, [ebp - 0x78]
push ecx
lea eax, [ebp - 0x74]
push eax
push dword [ebp - 0x74]
push dword [ebp - 0x70]
push dword [ebp + 0xc]
push 0x30
push dword [ebp - 0x68]
call sub.ADVAPI32.DLL_EnumServicesStatusA
xor edx, edx
mov dword [ebp - 0x80], edx
mov ecx, dword [ebp - 0x80]
cmp ecx, dword [ebp - 0x78]
jae 0x4082f9
mov eax, dword [ebp - 0x80]
lea eax, [eax + eax*8]
mov edx, dword [ebp - 0x70]
cmp dword [edx + eax*4 + 0xc], 4
jne 0x408170
mov word [ebp - 0x54], 0x38
mov edx, str.Started
lea eax, [ebp - 0xc]
call fcn.004a448c
inc dword [ebp - 0x48]
lea edx, [ebp - 0xc]
lea eax, [ebp - 8]
call fcn.004a4660
dec dword [ebp - 0x48]
lea eax, [ebp - 0xc]
mov edx, 2
call fcn.004a4630
jmp 0x4081a1
mov word [ebp - 0x54], 0x44
mov edx, str.Stopped
lea eax, [ebp - 0x10]
call fcn.004a448c
inc dword [ebp - 0x48]
lea edx, [ebp - 0x10]
lea eax, [ebp - 8]
call fcn.004a4660
dec dword [ebp - 0x48]
lea eax, [ebp - 0x10]
mov edx, 2
call fcn.004a4630
mov word [ebp - 0x54], 0x50
lea eax, [ebp - 0x1c]
call fcn.00401ab4
push eax
inc dword [ebp - 0x48]
mov edx, 0x5bc496
lea eax, [ebp - 0x18]
call fcn.004a448c
inc dword [ebp - 0x48]
lea edx, [ebp - 0x18]
push edx
mov ecx, dword [ebp - 0x80]
lea ecx, [ecx + ecx*8]
mov eax, dword [ebp - 0x70]
mov edx, dword [eax + ecx*4 + 4]
lea eax, [ebp - 0x14]
call fcn.004a448c
inc dword [ebp - 0x48]
pop edx
pop ecx
call fcn.004a4688
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x24]
call fcn.00401ab4
push eax
inc dword [ebp - 0x48]
mov edx, dword [ebp - 0x80]
lea edx, [edx + edx*8]
mov ecx, dword [ebp - 0x70]
mov edx, dword [ecx + edx*4]
lea eax, [ebp - 0x20]
call fcn.004a448c
mov edx, eax
inc dword [ebp - 0x48]
pop ecx
pop eax
call fcn.004a4688
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x2c]
call fcn.00401ab4
push eax
inc dword [ebp - 0x48]
mov edx, 0x5bc498
lea eax, [ebp - 0x28]
call fcn.004a448c
inc dword [ebp - 0x48]
lea edx, [ebp - 0x28]
pop ecx
pop eax
call fcn.004a4688
lea edx, [ebp - 0x2c]
push edx
lea eax, [ebp - 0x30]
call fcn.00401ab4
mov ecx, eax
inc dword [ebp - 0x48]
lea edx, [ebp - 8]
pop eax
call fcn.004a4688
lea edx, [ebp - 0x30]
mov edx, dword [edx]
mov eax, dword [ebp - 0x84]
mov ecx, dword [eax]
call dword [ecx + 0x34]
dec dword [ebp - 0x48]
lea eax, [ebp - 0x30]
mov edx, 2
call fcn.004a4630
dec dword [ebp - 0x48]
lea eax, [ebp - 0x2c]
mov edx, 2
call fcn.004a4630
dec dword [ebp - 0x48]
lea eax, [ebp - 0x28]
mov edx, 2
call fcn.004a4630
dec dword [ebp - 0x48]
lea eax, [ebp - 0x24]
mov edx, 2
call fcn.004a4630
dec dword [ebp - 0x48]
lea eax, [ebp - 0x20]
mov edx, 2
call fcn.004a4630
dec dword [ebp - 0x48]
lea eax, [ebp - 0x1c]
mov edx, 2
call fcn.004a4630
dec dword [ebp - 0x48]
lea eax, [ebp - 0x18]
mov edx, 2
call fcn.004a4630
dec dword [ebp - 0x48]
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.004a4630
inc dword [ebp - 0x80]
mov ecx, dword [ebp - 0x80]
cmp ecx, dword [ebp - 0x78]
jb 0x40812d
push dword [ebp - 0x68]
call sub.ADVAPI32.DLL_CloseServiceHandle
mov word [ebp - 0x54], 0x5c
lea eax, [ebp - 0x34]
call fcn.00401ab4
mov edx, eax
inc dword [ebp - 0x48]
mov eax, dword [ebp - 0x84]
mov ecx, dword [eax]
call dword [ecx + 0x1c]
lea edx, [ebp - 0x34]
lea eax, [ebp - 4]
call fcn.004a4660
dec dword [ebp - 0x48]
lea eax, [ebp - 0x34]
mov edx, 2
call fcn.004a4630
mov ecx, dword [ebp - 0x84]
mov dword [ebp - 0x3c], ecx
cmp dword [ebp - 0x3c], 0
je 0x40836a
mov eax, dword [ebp - 0x3c]
mov edx, dword [eax]
mov dword [ebp - 0x38], edx
mov word [ebp - 0x54], 0x74
mov edx, 3
mov eax, dword [ebp - 0x3c]
mov ecx, dword [eax]
call dword [ecx - 4]
mov word [ebp - 0x54], 0x68
mov word [ebp - 0x54], 0x80
lea edx, [ebp - 4]
mov eax, dword [ebp + 8]
call fcn.004a4660
mov eax, dword [ebp + 8]
mov word [ebp - 0x54], 0x8c
push eax
dec dword [ebp - 0x48]
lea eax, [ebp - 8]
mov edx, 2
call fcn.004a4630
dec dword [ebp - 0x48]
lea eax, [ebp - 4]
mov edx, 2
call fcn.004a4630
pop eax
mov word [ebp - 0x54], 0x20
mov edx, dword [ebp - 0x64]
mov dword fs:[0], edx
jmp 0x408421
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret