Function at 0x40766c
Capabilities:
Enumerate services

Disassembly:
push 0x6c
mov eax, 0x5ba22c
call fcn.00580e9e
mov edi, 0x6c8ddc
call fcn.004093fc
xor ebx, ebx
mov byte [ebp - 0x11], bl
push 4
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
mov dword [ebp - 0x40], edi
cmp edi, ebx
je 0x4078e7
push dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
lea esi, [ebp - 0x50]
call fcn.0040e46d
mov dword [ebp - 4], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x28], ebx
push ebx
push ebx
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x24]
push eax
push ebx
push ebx
push 3
push 0x30
push ebx
push edi
mov esi, dword [sym.imp.ADVAPI32.dll_EnumServicesStatusExW]
call esi
mov eax, dword [ebp - 0x24]
cmp eax, ebx
je 0x4078d1
mov dword [ebp - 0x1c], eax
mov byte [ebp - 4], 1
push eax
call fcn.00573e8f
pop ecx
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x3c], eax
push ebx
push ebx
lea ecx, [ebp - 0x28]
push ecx
lea ecx, [ebp - 0x24]
push ecx
push dword [ebp - 0x1c]
push eax
push 3
push 0x30
push ebx
push edi
call esi
test eax, eax
je 0x4078c5
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x20], ebx
mov eax, dword [ebp - 0x38]
cmp dword [ebp - 0x20], eax
jae 0x4078c5
mov eax, dword [ebp - 0x20]
imul eax, eax, 0x2c
mov ecx, dword [ebp - 0x3c]
lea edi, [eax + ecx]
push 1
push dword [edi]
push dword [ebp - 0x40]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [ebp - 0x2c], eax
cmp eax, ebx
je 0x4078bd
push dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
lea esi, [ebp - 0x48]
call fcn.0040e46d
mov byte [ebp - 4], 2
mov dword [ebp - 0x1c], ebx
lea eax, [ebp - 0x1c]
push eax
push ebx
push ebx
push dword [ebp - 0x2c]
mov esi, dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
call esi
cmp dword [ebp - 0x1c], ebx
je 0x4078b1
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x44], eax
push eax
call fcn.00573e8f
pop ecx
mov dword [ebp - 0x34], eax
lea ecx, [ebp - 0x1c]
push ecx
push dword [ebp - 0x44]
push eax
push dword [ebp - 0x2c]
call esi
test eax, eax
je 0x407890
lea eax, [ebp - 0x5c]
push eax
call fcn.0040512b
mov byte [ebp - 4], 4
mov dword [ebp - 0x5c], 1
push str.HKEY_LOCAL_MACHINE
lea eax, [ebp - 0x58]
push eax
call fcn.00408606
mov esi, 0x670fe8
push esi
lea eax, [ebp - 0x58]
push eax
call fcn.00408624
push str.SYSTEMCurrentControlSetServices
lea eax, [ebp - 0x58]
push eax
call fcn.00408624
push esi
lea eax, [ebp - 0x58]
push eax
call fcn.00408624
push dword [edi]
lea eax, [ebp - 0x58]
push eax
call fcn.00408624
lea eax, [ebp - 0x18]
push eax
call fcn.0040850b
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x34]
push dword [eax + 0xc]
lea esi, [ebp - 0x78]
call fcn.004081bb
mov byte [ebp - 4], 6
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x5c]
push eax
push dword [ebp + 8]
mov ecx, esi
call fcn.0040644d
add esp, 0xc
mov byte [ebp - 4], 5
push ebx
push 1
call fcn.00409c0f
mov eax, dword [ebp - 0x18]
mov eax, dword [eax - 0xc]
cmp eax, ebx
je 0x407877
lea eax, [ebp - 0x18]
call fcn.004087b3
push dword [ebp - 0x18]
lea eax, [ebp - 0x30]
push eax
call fcn.00408561
mov byte [ebp - 4], 7
push dword [edi]
lea eax, [ebp - 0x30]
push eax
push 0x6c8ddc
call fcn.004092d3
push eax
call fcn.00408606
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x30]
call fcn.004085a2
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x18]
call fcn.004085a2
mov byte [ebp - 4], 3
lea eax, [ebp - 0x5c]
push eax
call fcn.0040515e
push dword [ebp - 0x34]
call fcn.00573db2
pop ecx
mov dword [ebp - 4], 2
jmp 0x4078b1
mov byte [ebp - 4], 1
lea esi, [ebp - 0x48]
call fcn.004047a2
inc dword [ebp - 0x20]
jmp 0x407716
push dword [ebp - 0x4c]
call fcn.00573db2
pop ecx
mov dword [ebp - 4], ebx
or dword [ebp - 4], 0xffffffff
mov esi, dword [ebp - 0x50]
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax + 4]
mov al, byte [ebp - 0x11]
call fcn.00580f43
ret