Function at 0x478e60
Capabilities:
Enumerate services
Query service configuration

Disassembly:
push ebp
mov ebp, esp
push eax
mov eax, 9
add esp, 0xfffff004
push eax
dec eax
jne 0x478e69
mov eax, dword [ebp - 4]
add esp, 0xffffffa8
push ebx
xor ebx, ebx
mov dword [ebp - 0x905c], ebx
mov dword [ebp - 0x9058], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x4790e5
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0x28], eax
push 4
push 0
push 0
call sub.advapi32.dll_OpenSCManagerA
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x478ebd
call fcn.0040d038
xor edx, edx
push ebp
push 0x4790c0
push dword fs:[edx]
mov dword fs:[edx], esp
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x20]
push eax
push 0x24
lea eax, [ebp - 0x9054]
push eax
push 3
push 0x30
mov eax, dword [ebp - 0x18]
push eax
call sub.advapi32.dll_EnumServicesStatusA
neg eax
sbb ebx, ebx
neg ebx
test bl, bl
jne 0x4790a9
call sub.kernel32.dll_GetLastError_1
cmp eax, 0xea
jne 0x4790a9
mov eax, dword [ebp - 0x20]
add eax, 0x24
lea edx, [ebp - 0x28]
push edx
lea edx, [ebp - 0x24]
push edx
lea edx, [ebp - 0x20]
push edx
push eax
lea eax, [ebp - 0x9054]
push eax
push 3
push 0x30
mov eax, dword [ebp - 0x18]
push eax
call sub.advapi32.dll_EnumServicesStatusA
mov eax, 0xff0
call fcn.00408914
mov dword [ebp - 0x14], eax
xor edx, edx
push ebp
push 0x4790a2
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebp - 0x24]
dec eax
test eax, eax
jb 0x47908c
inc eax
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x9054]
mov dword [ebp - 0x30], eax
push 0xf01ff
mov eax, dword [ebp - 0x30]
mov eax, dword [eax]
push eax
mov eax, dword [ebp - 0x18]
push eax
call sub.advapi32.dll_OpenServiceA
mov dword [ebp - 0x1c], eax
xor eax, eax
push ebp
push 0x479078
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x10]
push eax
push 0xff0
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x1c]
push eax
call sub.advapi32.dll_QueryServiceConfigA
cmp dword [ebp - 4], 0
je 0x478fce
lea eax, [ebp - 0x9058]
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 0x10]
call fcn.00403ddc
mov eax, dword [ebp - 0x9058]
mov edx, dword [ebp - 4]
call fcn.00408a84
test al, al
je 0x479061
cmp dword [ebp - 8], 0
je 0x478ff6
lea eax, [ebp - 0x905c]
mov edx, dword [ebp - 0x30]
mov edx, dword [edx]
call fcn.00403ddc
mov eax, dword [ebp - 0x905c]
mov edx, dword [ebp - 8]
call fcn.00408a84
test al, al
je 0x479061
mov dl, 1
mov eax, dword [0x478b84]
call fcn.00402e70
mov ebx, eax
lea eax, [ebx + 0xc]
mov edx, dword [ebp - 0x30]
mov edx, dword [edx]
call fcn.00403ddc
lea eax, [ebx + 0x14]
mov edx, dword [ebp - 0x30]
mov edx, dword [edx + 4]
call fcn.00403ddc
lea eax, [ebx + 0x10]
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 0xc]
call fcn.00403ddc
lea eax, [ebx + 8]
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 0x1c]
call fcn.00403ddc
lea eax, [ebx + 4]
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 0x18]
call fcn.00403ddc
lea eax, [ebx + 0x18]
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 0xc]
call fcn.00403ddc
mov edx, ebx
mov eax, dword [ebp - 0xc]
call fcn.004248f8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x47907f
mov eax, dword [ebp - 0x1c]
push eax
call sub.advapi32.dll_CloseServiceHandle
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4790a9
mov eax, dword [ebp - 0x14]
call fcn.00402750
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4790c7
mov eax, dword [ebp - 0x18]
push eax
call sub.advapi32.dll_CloseServiceHandle
ret