Function at 0x10051404
Capabilities:
Enumerate services
Query service configuration

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0xbaa
push 0
push 0
dec ecx
jne 0x1005140c
push ebx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x10051758
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
call fcn.10004524
push 4
push 0
push 0
call sub.advapi32.dll_OpenSCManagerA
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x1005173a
xor edx, edx
push ebp
push 0x10051733
push dword fs:[edx]
mov dword fs:[edx], esp
mov ebx, 0x5800
xor eax, eax
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x5b20]
mov dword [ebp - 0x18], eax
push 0
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x14]
push eax
push ebx
lea eax, [ebp - 0x5820]
push eax
push 3
push 0x30
push 0
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_EnumServicesStatusExA
test eax, eax
je 0x1005171c
mov ax, word [ebp - 8]
dec eax
test ax, ax
jb 0x1005171c
inc eax
mov word [ebp - 0x1a], ax
lea eax, [ebp - 0x5820]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 4]
push dword [eax]
lea eax, [ebp - 0x5d28]
mov edx, dword [ebp - 0x20]
mov edx, dword [edx]
call fcn.1000471c
push dword [ebp - 0x5d28]
push 0x1005176c
lea eax, [ebp - 0x5d2c]
mov edx, dword [ebp - 0x20]
mov edx, dword [edx + 4]
call fcn.1000471c
push dword [ebp - 0x5d2c]
push 0x10051778
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0xc]
xor edx, edx
push edx
push eax
lea edx, [ebp - 0x5d30]
xor eax, eax
call fcn.1004b514
push dword [ebp - 0x5d30]
push 0x1005176c
mov eax, dword [ebp - 4]
mov edx, 7
call fcn.100048c0
push 0xf01ff
mov eax, dword [ebp - 0x20]
mov eax, dword [eax]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_OpenServiceA
mov dword [ebp - 0x10], eax
xor eax, eax
push ebp
push 0x100516f7
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
lea eax, [ebp - 0x14]
push eax
push 0x300
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_QueryServiceConfigA
test eax, eax
je 0x1005157a
cmp dword [ebp - 0x14], 0x300
ja 0x1005157a
cmp dword [ebp - 0x14], 0x300
jae 0x10051578
mov eax, dword [ebp - 0x14]
mov byte [ebp + eax - 0x5b20], 0
mov bl, 1
test bl, bl
je 0x1005162e
mov eax, dword [ebp - 4]
push dword [eax]
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 4]
xor edx, edx
push edx
push eax
lea edx, [ebp - 0x5d34]
xor eax, eax
call fcn.1004b514
push dword [ebp - 0x5d34]
push 0x1005176c
lea eax, [ebp - 0x5d38]
mov edx, dword [ebp - 0x18]
mov edx, dword [edx + 0x1c]
call fcn.1000471c
push dword [ebp - 0x5d38]
push 0x1005176c
lea edx, [ebp - 0x5d3c]
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0x24]
call fcn.1004d868
push dword [ebp - 0x5d3c]
push 0x1005176c
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0x24]
xor edx, edx
push edx
push eax
lea edx, [ebp - 0x5d40]
xor eax, eax
call fcn.1004b514
push dword [ebp - 0x5d40]
push 0x1005176c
lea eax, [ebp - 0x5d44]
mov edx, dword [ebp - 0x18]
mov edx, dword [edx + 0xc]
call fcn.1000471c
push dword [ebp - 0x5d44]
push 0x10051788
mov eax, dword [ebp - 4]
mov edx, 0xb
call fcn.100048c0
jmp 0x1005169c
mov eax, dword [ebp - 4]
push dword [eax]
push 0x10051798
push 0x1005176c
push 0x100517a4
push 0x1005176c
lea edx, [ebp - 0x5d48]
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0x24]
call fcn.1004d868
push dword [ebp - 0x5d48]
push 0x1005176c
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0x24]
xor edx, edx
push edx
push eax
lea edx, [ebp - 0x5d4c]
xor eax, eax
call fcn.1004b514
push dword [ebp - 0x5d4c]
push 0x1005176c
push 0x100517a4
push 0x10051788
mov eax, dword [ebp - 4]
mov edx, 0xb
call fcn.100048c0
mov byte [ebp - 0x5d20], 0
lea eax, [ebp - 0x14]
push eax
push 0x204
lea eax, [ebp - 0x5d24]
push eax
push 1
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_QueryServiceConfig2A
lea eax, [ebp - 0x5d50]
lea edx, [ebp - 0x5d20]
call fcn.1000471c
mov edx, dword [ebp - 0x5d50]
mov eax, dword [ebp - 4]
call fcn.10004808
mov eax, dword [ebp - 4]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x100516fe
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_CloseServiceHandle
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x1005173a
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_CloseServiceHandle
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x1005175f
lea eax, [ebp - 0x5d50]
mov edx, 0xb
call fcn.10004548
ret