Function at 0x40ae80
Capabilities:
Enumerate services

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x581702
mov eax, dword fs:[0]
push eax
sub esp, 0x60
push ebx
push esi
push edi
mov eax, dword [0x6531f0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov byte [ebp - 0x11], 0
push 4
xor edi, edi
push edi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
mov dword [ebp - 0x24], ebx
cmp ebx, edi
je 0x40b0e3
mov eax, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
push ebx
lea esi, [ebp - 0x40]
call fcn.00413890
mov dword [ebp - 4], edi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x20], edi
push edi
push edi
lea ecx, [ebp - 0x20]
push ecx
lea edx, [ebp - 0x1c]
push edx
push edi
push edi
push 3
mov eax, dword [ebp + 0xc]
push eax
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_EnumServicesStatusExW]
mov esi, dword [ebp - 0x1c]
cmp esi, edi
je 0x40b0c6
mov byte [ebp - 4], 1
push esi
call fcn.004fe27d
add esp, 4
mov edi, eax
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x30], edi
push 0
push 0
lea ecx, [ebp - 0x20]
push ecx
lea edx, [ebp - 0x1c]
push edx
push esi
push edi
push 3
mov eax, dword [ebp + 0xc]
push eax
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_EnumServicesStatusExW]
test eax, eax
je 0x40b0b6
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 0x2c], ecx
xor esi, esi
mov dword [ebp - 0x28], esi
lea ebx, [ebx]
cmp esi, dword [ebp - 0x2c]
jae 0x40b0b6
mov edx, esi
imul edx, edx, 0x2c
mov eax, dword [ebp - 0x30]
add eax, edx
mov dword [ebp - 0x34], eax
push 1
mov ecx, dword [eax]
push ecx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
mov dword [ebp - 0x44], edi
test edi, edi
je 0x40b09d
mov edx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edx
push edi
lea esi, [ebp - 0x38]
call fcn.00413890
mov byte [ebp - 4], 2
mov dword [ebp - 0x18], 0
lea eax, [ebp - 0x18]
push eax
push 0
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
cmp dword [ebp - 0x18], 0
je 0x40b08e
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x18]
mov esi, eax
push eax
call fcn.004fe27d
add esp, 4
mov ebx, eax
lea ecx, [ebp - 0x18]
push ecx
push esi
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
je 0x40b07b
mov eax, dword [ebx + 4]
cmp eax, 2
je 0x40aff1
test eax, eax
je 0x40aff1
cmp eax, 1
jne 0x40b07b
lea edx, [ebp - 0x50]
push edx
call fcn.004074a0
mov byte [ebp - 4], 4
mov dword [ebp - 0x50], 1
mov eax, reloc.OLEAUT32.dll_SysReAllocString
call fcn.00413760
mov edx, eax
lea edi, [ebp - 0x4c]
call fcn.004027b0
mov edx, 0x63132c
call fcn.0040cc10
mov edx, str.SYSTEMCurrentControlSetServices
call fcn.0040cc10
mov edx, 0x63132c
call fcn.0040cc10
mov eax, dword [ebp - 0x34]
mov edx, dword [eax]
call fcn.0040cc10
mov eax, dword [ebx + 0xc]
lea ecx, [ebp - 0x6c]
call fcn.0040c640
mov byte [ebp - 4], 5
mov ecx, dword [ebp + 8]
push ecx
lea ecx, [ebp - 0x50]
lea edx, [ebp - 0x6c]
call fcn.004089b0
add esp, 4
mov byte [ebp - 4], 4
lea esi, [ebp - 0x6c]
call fcn.0042f9c0
mov byte [ebp - 4], 3
lea edx, [ebp - 0x50]
push edx
call fcn.00407500
push ebx
call fcn.004fe160
add esp, 4
mov dword [ebp - 4], 2
mov ebx, dword [ebp - 0x24]
mov byte [ebp - 4], 1
lea esi, [ebp - 0x38]
call fcn.00406860
mov esi, dword [ebp - 0x28]
inc esi
mov dword [ebp - 0x28], esi
mov edi, dword [ebp - 0x3c]
jmp 0x40af50
push edi
call fcn.004fe160
add esp, 4
mov dword [ebp - 4], 0
mov dword [ebp - 4], 0xffffffff
mov esi, dword [ebp - 0x40]
mov eax, dword [esi]
mov ecx, esi
mov edx, dword [eax]
call edx
mov eax, dword [esi]
push 1
mov ecx, esi
mov edx, dword [eax + 4]
call edx
mov al, byte [ebp - 0x11]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret