Function at 0x4b6598
Capabilities:
Enumerate services
Query service configuration
Query service status

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff9c
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x64], ebx
mov dword [ebp - 0x60], ebx
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x54], ebx
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x2c], ebx
mov edi, ecx
mov esi, edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.0040436c
xor eax, eax
push ebp
push 0x4b69cd
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
push 0xf003f
push 0
mov eax, dword [ebp - 4]
call fcn.0040437c
push eax
call sub.advapi32.dll_OpenSCManagerA
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jbe 0x4b699d
xor eax, eax
mov dword [ebp - 0x18], eax
mov eax, 0x24024
call fcn.004027bc
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x10]
push eax
push 0x24024
mov eax, dword [ebp - 0x1c]
push eax
push edi
push esi
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_EnumServicesStatusA
mov dl, 1
mov eax, dword [0x4b5c60]
call fcn.00403168
mov edx, dword [0x5674d8]
mov dword [edx], eax
mov eax, dword [0x5674d8]
mov eax, dword [eax]
call fcn.004b5cd8
mov eax, dword [ebp - 0x14]
dec eax
test eax, eax
jl 0x4b6979
inc eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 8], 0
mov eax, dword [0x567568]
mov eax, dword [eax]
call fcn.0045184c
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x20c]
call fcn.00462450
mov ebx, eax
mov ecx, 3
xor edx, edx
mov eax, ebx
call fcn.004620c8
mov esi, dword [ebp - 8]
lea esi, [esi + esi*8]
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + esi*4 + 4]
lea edx, [ebp - 0x50]
call fcn.0040a658
mov edx, dword [ebp - 0x50]
mov eax, ebx
call fcn.00461f24
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + esi*4 + 4]
lea edx, [ebp - 0x54]
call fcn.0040a658
mov edx, dword [ebp - 0x54]
lea ecx, [ebp - 0x28]
mov eax, dword [ebp - 4]
call fcn.004b64d4
push 5
mov eax, dword [ebp - 0x28]
call fcn.0040437c
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_OpenServiceA
mov esi, eax
test esi, esi
je 0x4b6960
lea eax, [ebp - 0x24]
push eax
push 0
push 0
push esi
call sub.advapi32.dll_QueryServiceConfigA
test eax, eax
jne 0x4b696d
call sub.kernel32.dll_GetLastError_1
cmp eax, 0x7a
jne 0x4b6951
mov eax, dword [ebp - 0x24]
inc eax
call fcn.004027bc
mov dword [ebp - 0x20], eax
xor edx, edx
push ebp
push 0x4b694a
push dword fs:[edx]
mov dword fs:[edx], esp
lea eax, [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x20]
push eax
push esi
call sub.advapi32.dll_QueryServiceConfigA
test eax, eax
jne 0x4b674f
mov eax, dword [ebx + 8]
mov edx, 0x4b69e8
mov ecx, dword [eax]
call dword [ecx + 0x34]
jmp 0x4b6929
lea eax, [ebp - 0x58]
mov edx, dword [ebp - 0x20]
mov edx, dword [edx + 0xc]
call fcn.004040f0
mov edx, dword [ebp - 0x58]
mov eax, dword [ebx + 8]
mov ecx, dword [eax]
call dword [ecx + 0x34]
lea eax, [ebp - 0x2c]
mov edx, dword [ebp - 0x20]
mov edx, dword [edx + 0xc]
call fcn.004040f0
lea edx, [ebp - 0x5c]
mov eax, dword [ebp - 0x2c]
call fcn.004098e8
mov edx, dword [ebp - 0x5c]
lea eax, [ebp - 0x2c]
call fcn.00403fd0
cmp dword [ebp - 0x2c], 0
je 0x4b6899
mov eax, dword [ebp - 0x2c]
cmp byte [eax], 0x22
jne 0x4b67bf
lea eax, [ebp - 0x2c]
call fcn.00404388
mov byte [eax], 0x20
lea edx, [ebp - 0x60]
mov eax, dword [ebp - 0x2c]
call fcn.004098e8
mov edx, dword [ebp - 0x60]
lea eax, [ebp - 0x2c]
call fcn.00403fd0
mov eax, dword [ebp - 0x2c]
call fcn.0040437c
mov edx, 0x4b6a04
call fcn.0040a5e4
test eax, eax
je 0x4b67ec
mov eax, dword [ebp - 0x2c]
call fcn.0040437c
mov edx, 0x4b6a04
call fcn.0040a5e4
mov byte [eax], 0
jmp 0x4b6857
mov eax, dword [ebp - 0x2c]
call fcn.0040437c
mov edx, 0x4b6a08
call fcn.0040a5e4
test eax, eax
je 0x4b681a
mov eax, dword [ebp - 0x2c]
call fcn.0040437c
mov edx, 0x4b6a08
call fcn.0040a5e4
mov byte [eax + 4], 0
jmp 0x4b6857
mov eax, dword [ebp - 0x2c]
call fcn.0040437c
mov edx, 0x4b6a10
call fcn.0040a5e4
test eax, eax
je 0x4b6857
mov eax, dword [ebp - 0x2c]
call fcn.0040437c
mov edx, 0x4b6a10
call fcn.0040a5e4
mov byte [eax], 0
mov eax, dword [ebp - 0x2c]
call fcn.0040437c
mov edx, 0x4b6a08
call fcn.0040a518
mov eax, dword [0x5674d8]
mov eax, dword [eax]
mov edx, dword [ebp - 0x2c]
call fcn.004b5d04
lea ecx, [ebp - 0x64]
mov eax, dword [0x5674d8]
mov eax, dword [eax]
mov edx, 0x4b6a1c
call fcn.004b6150
mov edx, dword [ebp - 0x64]
mov eax, 0x4b6a34
call fcn.004044a4
test eax, eax
jg 0x4b6899
mov ecx, 6
xor edx, edx
mov eax, ebx
call fcn.004620c8
lea eax, [ebp - 0x4c]
push eax
push esi
call sub.advapi32.dll_QueryServiceStatus
test eax, eax
je 0x4b68e1
mov eax, dword [ebp - 0x48]
cmp eax, 7
jne 0x4b68be
mov eax, dword [ebx + 8]
mov edx, 0x4b6a4c
mov ecx, dword [eax]
call dword [ecx + 0x34]
jmp 0x4b68ee
cmp eax, 4
jne 0x4b68d2
mov eax, dword [ebx + 8]
mov edx, 0x4b6a5c
mov ecx, dword [eax]
call dword [ecx + 0x34]
jmp 0x4b68ee
mov eax, dword [ebx + 8]
mov edx, 0x4b6a6c
mov ecx, dword [eax]
call dword [ecx + 0x34]
jmp 0x4b68ee
mov eax, dword [ebx + 8]
mov edx, 0x4b6a7c
mov ecx, dword [eax]
call dword [ecx + 0x34]
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 4]
cmp eax, 4
jne 0x4b6908
mov eax, dword [ebx + 8]
mov edx, 0x4b6a8c
mov ecx, dword [eax]
call dword [ecx + 0x34]
jmp 0x4b6929
cmp eax, 3
jne 0x4b691c
mov eax, dword [ebx + 8]
mov edx, 0x4b6aa0
mov ecx, dword [eax]
call dword [ecx + 0x34]
jmp 0x4b6929
mov eax, dword [ebx + 8]
mov edx, 0x4b6ab0
mov ecx, dword [eax]
call dword [ecx + 0x34]
mov eax, dword [ebx + 8]
mov edx, dword [ebp - 0x28]
mov ecx, dword [eax]
call dword [ecx + 0x34]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4b696d
mov eax, dword [ebp - 0x20]
call fcn.004027d4
ret
mov eax, dword [ebx + 8]
mov edx, 0x4b6ac4
mov ecx, dword [eax]
call dword [ecx + 0x34]
jmp 0x4b696d
mov eax, dword [ebx + 8]
mov edx, 0x4b6ae8
mov ecx, dword [eax]
call dword [ecx + 0x34]
inc dword [ebp - 8]
dec dword [ebp - 0x30]
jne 0x4b6665
mov eax, dword [0x5674d8]
mov eax, dword [eax]
call fcn.00403198
mov bl, 1
mov edx, 0x24024
mov eax, dword [ebp - 0x1c]
call fcn.004027d4
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_CloseServiceHandle
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4b69d4
lea eax, [ebp - 0x64]
mov edx, 6
call fcn.00403f5c
lea eax, [ebp - 0x2c]
mov edx, 2
call fcn.00403f5c
lea eax, [ebp - 4]
call fcn.00403f38
ret