Function at 0x10010b70
Capabilities:
Enumerate services

Disassembly:
sub esp, 0x20
push ebx
push ebp
push 5
push str.ServicesActive
xor ebp, ebp
push ebp
mov dword [esp + 0x18], 0x424
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
mov dword [esp + 0x14], ebx
cmp ebx, ebp
jne 0x10010ba3
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop ebp
pop ebx
add esp, 0x20
ret
push esi
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_EnumServicesStatusExW]
push ebp
push ebp
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x24]
push ecx
push ebp
push ebp
push 3
push 0x30
push ebp
push ebx
mov dword [esp + 0x40], ebp
mov dword [esp + 0x38], ebp
call edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, ebp
jne 0x10010dd5
cmp eax, 0xea
jne 0x10010dd5
mov edx, dword [esp + 0x18]
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push edx
push 8
call ebp
push eax
call fcn.10016d00
mov ebx, eax
mov dword [esp + 0x2c], ebx
test ebx, ebx
je 0x10010dcb
mov edx, dword [esp + 0x18]
push 0
push 0
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x24]
push ecx
push edx
push ebx
push 3
push 0x30
push 0
push eax
call edi
test eax, eax
je 0x10010d9f
xor esi, esi
cmp dword [esp + 0x10], esi
jbe 0x10010da9
mov edi, ebx
mov edi, edi
mov ecx, dword [edi]
push str.TermService
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x10010c7e
inc esi
add edi, 0x2c
cmp esi, dword [esp + 0x10]
jb 0x10010c40
push ebx
push 0
call ebp
push eax
call fcn.10015150
mov ebx, dword [esp + 0x1c]
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
imul esi, esi, 0x2c
mov esi, dword [esi + ebx + 0x24]
xor eax, eax
mov dword [esp + 0x24], esi
cmp esi, eax
jne 0x10010cb8
push ebx
push eax
mov dword [esp + 0x1c], 0x426
call ebp
push eax
call fcn.10015150
mov ebx, dword [esp + 0x1c]
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
mov edx, dword [esp + 0x34]
mov dword [esp + 0x14], eax
mov dword [edx], esi
mov dword [esp + 0x20], eax
cmp dword [esp + 0x10], eax
jbe 0x10010da9
mov esi, dword [esp + 0x3c]
mov edi, dword [esp + 0x38]
mov eax, dword [ebx]
push str.TermService
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x10010d63
mov ecx, dword [esp + 0x24]
cmp dword [ebx + 0x24], ecx
jne 0x10010d63
mov edx, dword [ebx]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp dword [edi], 0
mov dword [esp + 0x28], eax
jne 0x10010d19
push 4
push 8
mov dword [esi], 1
call ebp
push eax
call fcn.10016d00
jmp 0x10010d34
inc dword [esi]
mov eax, dword [esi]
mov ecx, dword [edi]
add eax, eax
add eax, eax
push eax
push ecx
push 0
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
test eax, eax
je 0x10010d63
mov edx, dword [esp + 0x28]
mov dword [edi], eax
lea eax, [edx + edx + 2]
push eax
push 8
call ebp
push eax
call fcn.10016d00
mov ecx, dword [esi]
mov edx, dword [edi]
mov dword [edx + ecx*4 - 4], eax
mov eax, dword [ebx]
mov ecx, dword [esi]
mov edx, dword [edi]
push eax
mov eax, dword [edx + ecx*4 - 4]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov eax, dword [esp + 0x20]
inc eax
add ebx, 0x2c
mov dword [esp + 0x20], eax
cmp eax, dword [esp + 0x10]
jb 0x10010cd8
mov ebx, dword [esp + 0x2c]
push ebx
push 0
call ebp
push eax
call fcn.10015150
mov ebx, dword [esp + 0x1c]
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x14], eax
push ebx
push 0
call ebp
push eax
call fcn.10015150
mov ebx, dword [esp + 0x1c]
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [esp + 0x1c]
push ebx
mov dword [esp + 0x18], eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret