Function at 0x40761a
Capabilities:
Enumerate services

Disassembly:
push 0x6c
mov eax, 0x5c0def
call fcn.0058708e
call fcn.00409342
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 0x40788e
push dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
lea esi, [ebp - 0x50]
call fcn.0040e4f6
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 0x407878
mov dword [ebp - 0x1c], eax
mov byte [ebp - 4], 1
push eax
call fcn.00579e3f
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 0x40786c
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 0x40786c
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 0x407864
push dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
lea esi, [ebp - 0x48]
call fcn.0040e4f6
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 0x407858
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x44], eax
push eax
call fcn.00579e3f
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 0x407837
lea eax, [ebp - 0x5c]
push eax
call fcn.0040510b
mov byte [ebp - 4], 4
mov dword [ebp - 0x5c], 1
push str.HKEY_LOCAL_MACHINE
lea eax, [ebp - 0x58]
push eax
call fcn.004085bd
push 0x691bdc
lea eax, [ebp - 0x58]
push eax
call fcn.004085db
push 0x691be0
lea eax, [ebp - 0x58]
push eax
call fcn.004085db
push 0x691c24
lea eax, [ebp - 0x58]
push eax
call fcn.004085db
push dword [edi]
lea eax, [ebp - 0x58]
push eax
call fcn.004085db
lea eax, [ebp - 0x18]
push eax
call fcn.004084c2
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x34]
push dword [eax + 0xc]
lea esi, [ebp - 0x78]
call fcn.00408172
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.00406400
add esp, 0xc
mov byte [ebp - 4], 5
push ebx
push 1
call fcn.00409bf1
mov eax, dword [ebp - 0x18]
mov eax, dword [eax - 0xc]
cmp eax, ebx
je 0x40781e
lea eax, [ebp - 0x18]
call fcn.0040876a
push dword [ebp - 0x18]
lea eax, [ebp - 0x30]
push eax
call fcn.00408518
mov byte [ebp - 4], 7
push dword [edi]
lea eax, [ebp - 0x30]
push eax
call fcn.00409221
push eax
call fcn.004085bd
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x30]
call fcn.00408559
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x18]
call fcn.00408559
mov byte [ebp - 4], 3
lea eax, [ebp - 0x5c]
push eax
call fcn.00412ceb
push dword [ebp - 0x34]
call fcn.00579d62
pop ecx
mov dword [ebp - 4], 2
jmp 0x407858
mov byte [ebp - 4], 1
lea esi, [ebp - 0x48]
call fcn.00404782
inc dword [ebp - 0x20]
jmp 0x4076bf
push dword [ebp - 0x4c]
call fcn.00579d62
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.00587133
ret