Function at 0x10041bb0
Capabilities:
Enumerate services

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x44
mov eax, dword [0x101a49d4]
xor eax, esp
mov dword [esp + 0x40], eax
push ebx
push esi
push edi
push 4
push 0
mov esi, ecx
mov dword [esp + 0x3c], 0
push 0
mov dword [esp + 0x3c], esi
mov dword [esp + 0x50], 0
mov dword [esp + 0x54], 7
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
mov dword [esp + 0x2c], ebx
test ebx, ebx
je 0x10041ded
mov edi, dword [sym.imp.ADVAPI32.dll_EnumServicesStatusW]
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x20]
mov dword [esp + 0x18], 0
push eax
lea eax, [esp + 0x1c]
mov dword [esp + 0x24], 0
push eax
push 0
push 0
push 3
push 0x30
push ebx
mov dword [esp + 0x44], 0
call edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x10041de6
push dword [esp + 0x14]
call fcn.10126050
add esp, 4
mov dword [esp + 0x20], eax
test eax, eax
je 0x10041de6
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x20]
push ecx
lea ecx, [esp + 0x1c]
push ecx
push dword [esp + 0x20]
push eax
push 3
push 0x30
push ebx
call edi
test eax, eax
je 0x10041dda
xor edi, edi
mov dword [esp + 0x28], edi
cmp dword [esp + 0x1c], edi
jbe 0x10041dda
mov esi, dword [esp + 0x20]
push 1
push dword [esi]
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, eax
test ebx, ebx
je 0x10041dc0
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0
push eax
push 0
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
push dword [esp + 0x18]
call fcn.10126050
mov edi, eax
add esp, 4
test edi, edi
je 0x10041db5
lea eax, [esp + 0x18]
push eax
push dword [esp + 0x1c]
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
je 0x10041dac
mov edx, dword [edi + 0x20]
mov ecx, edx
lea eax, [ecx + 2]
mov dword [esp + 0x10], eax
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10041d00
sub ecx, dword [esp + 0x10]
sar ecx, 1
push ecx
push edx
lea ecx, [esp + 0x3c]
call fcn.100520e0
push 3
push 0x10191aa8
lea ecx, [esp + 0x3c]
call fcn.100520e0
cmp dword [esi + 0xc], 4
mov eax, str.Stopped
mov edx, str.Running
cmovne edx, eax
mov ecx, edx
lea eax, [ecx + 2]
mov dword [esp + 0x10], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10041d46
sub ecx, dword [esp + 0x10]
sar ecx, 1
push ecx
push edx
lea ecx, [esp + 0x3c]
call fcn.100520e0
push 3
push 0x10191aa8
lea ecx, [esp + 0x3c]
call fcn.100520e0
mov edx, dword [edi + 0xc]
mov eax, edx
lea ecx, [eax + 2]
mov dword [esp + 0x10], ecx
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x10041d80
sub eax, dword [esp + 0x10]
lea ecx, [esp + 0x34]
sar eax, 1
push eax
push edx
call fcn.100520e0
push 1
push 0x1018f8a8
lea ecx, [esp + 0x3c]
call fcn.100520e0
push edi
call fcn.10124e2f
add esp, 4
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, dword [esp + 0x28]
mov ebx, dword [esp + 0x2c]
inc edi
add esi, 0x24
mov dword [esp + 0x28], edi
cmp edi, dword [esp + 0x1c]
jb 0x10041c97
mov esi, dword [esp + 0x30]
push dword [esp + 0x20]
call fcn.10124e2f
add esp, 4
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0x18
lea eax, [esp + 0x38]
mov dword [esi], 0
push eax
mov dword [esi + 0x10], 0
push esi
mov dword [esi + 0x14], 0
call fcn.1011b630
mov ecx, dword [esp + 0x58]
add esp, 0xc
mov eax, esi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.1011a2e1
mov esp, ebp
pop ebp
ret