Function at 0x408080
Capabilities:
Enumerate services

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff60
push ebx
push esi
push edi
mov eax, 0x5c5be4
call fcn.00496c14
mov word [ebp - 0x54], 8
xor edx, edx
mov dword [ebp - 0x7c], edx
mov word [ebp - 0x54], 8
mov dl, 1
mov eax, dword [0x480fc4]
call fcn.004035b0
mov dword [ebp - 0x84], eax
mov word [ebp - 0x54], 0x14
lea eax, [ebp - 4]
call fcn.00401ad8
inc dword [ebp - 0x48]
mov word [ebp - 0x54], 0x20
mov word [ebp - 0x54], 0x2c
lea eax, [ebp - 8]
call fcn.00401ad8
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.0049621c
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 0x40831d
mov eax, dword [ebp - 0x80]
lea eax, [eax + eax*8]
mov edx, dword [ebp - 0x70]
cmp dword [edx + eax*4 + 0xc], 4
jne 0x408194
mov word [ebp - 0x54], 0x38
mov edx, str.Started
lea eax, [ebp - 0xc]
call fcn.004a451c
inc dword [ebp - 0x48]
lea edx, [ebp - 0xc]
lea eax, [ebp - 8]
call fcn.004a46f0
dec dword [ebp - 0x48]
lea eax, [ebp - 0xc]
mov edx, 2
call fcn.004a46c0
jmp 0x4081c5
mov word [ebp - 0x54], 0x44
mov edx, str.Stopped
lea eax, [ebp - 0x10]
call fcn.004a451c
inc dword [ebp - 0x48]
lea edx, [ebp - 0x10]
lea eax, [ebp - 8]
call fcn.004a46f0
dec dword [ebp - 0x48]
lea eax, [ebp - 0x10]
mov edx, 2
call fcn.004a46c0
mov word [ebp - 0x54], 0x50
lea eax, [ebp - 0x1c]
call fcn.00401ad8
push eax
inc dword [ebp - 0x48]
mov edx, 0x5bf416
lea eax, [ebp - 0x18]
call fcn.004a451c
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.004a451c
inc dword [ebp - 0x48]
pop edx
pop ecx
call fcn.004a4718
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x24]
call fcn.00401ad8
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.004a451c
mov edx, eax
inc dword [ebp - 0x48]
pop ecx
pop eax
call fcn.004a4718
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x2c]
call fcn.00401ad8
push eax
inc dword [ebp - 0x48]
mov edx, 0x5bf418
lea eax, [ebp - 0x28]
call fcn.004a451c
inc dword [ebp - 0x48]
lea edx, [ebp - 0x28]
pop ecx
pop eax
call fcn.004a4718
lea edx, [ebp - 0x2c]
push edx
lea eax, [ebp - 0x30]
call fcn.00401ad8
mov ecx, eax
inc dword [ebp - 0x48]
lea edx, [ebp - 8]
pop eax
call fcn.004a4718
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.004a46c0
dec dword [ebp - 0x48]
lea eax, [ebp - 0x2c]
mov edx, 2
call fcn.004a46c0
dec dword [ebp - 0x48]
lea eax, [ebp - 0x28]
mov edx, 2
call fcn.004a46c0
dec dword [ebp - 0x48]
lea eax, [ebp - 0x24]
mov edx, 2
call fcn.004a46c0
dec dword [ebp - 0x48]
lea eax, [ebp - 0x20]
mov edx, 2
call fcn.004a46c0
dec dword [ebp - 0x48]
lea eax, [ebp - 0x1c]
mov edx, 2
call fcn.004a46c0
dec dword [ebp - 0x48]
lea eax, [ebp - 0x18]
mov edx, 2
call fcn.004a46c0
dec dword [ebp - 0x48]
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.004a46c0
inc dword [ebp - 0x80]
mov ecx, dword [ebp - 0x80]
cmp ecx, dword [ebp - 0x78]
jb 0x408151
push dword [ebp - 0x68]
call sub.ADVAPI32.DLL_CloseServiceHandle
mov word [ebp - 0x54], 0x5c
lea eax, [ebp - 0x34]
call fcn.00401ad8
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.004a46f0
dec dword [ebp - 0x48]
lea eax, [ebp - 0x34]
mov edx, 2
call fcn.004a46c0
mov ecx, dword [ebp - 0x84]
mov dword [ebp - 0x3c], ecx
cmp dword [ebp - 0x3c], 0
je 0x40838e
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
push dword [ebp - 0x70]
call fcn.0049622c
pop ecx
mov word [ebp - 0x54], 0x80
lea edx, [ebp - 4]
mov eax, dword [ebp + 8]
call fcn.004a46f0
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.004a46c0
dec dword [ebp - 0x48]
lea eax, [ebp - 4]
mov edx, 2
call fcn.004a46c0
pop eax
mov word [ebp - 0x54], 0x20
mov edx, dword [ebp - 0x64]
mov dword fs:[0], edx
jmp 0x40844e
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret