Function at 0x46e868
Capabilities:
Enumerate services
Query service configuration

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffac
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 0x54], edx
mov dword [ebp - 0x50], edx
mov dword [ebp - 0x4c], edx
mov dword [ebp - 0x44], edx
mov dword [ebp - 0x48], edx
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x40], edx
mov dword [ebp - 0x34], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x46ec4c
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0x2c], eax
mov eax, 0x20015
push eax
push 0
push 0x46ec5c
call sub.advapi32.dll_OpenSCManagerA
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x46e8ea
call sub.kernel32.dll_GetLastError_1
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x40]
call fcn.0040879c
mov ecx, dword [ebp - 0x40]
lea eax, [ebp - 0x3c]
mov edx, 0x46ec68
call fcn.00404900
mov eax, dword [ebp - 0x3c]
call fcn.00467384
jmp 0x46ec23
xor eax, eax
mov dword [ebp - 0x1c], eax
mov eax, 0x24024
call fcn.0040271c
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
push 0x24024
mov eax, dword [ebp - 0x10]
push eax
push 3
push 0x30
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_EnumServicesStatusA
cmp eax, 1
sbb eax, eax
inc eax
test al, al
jne 0x46e956
call sub.kernel32.dll_GetLastError_1
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x48]
call fcn.0040879c
mov ecx, dword [ebp - 0x48]
lea eax, [ebp - 0x44]
mov edx, 0x46ec8c
call fcn.00404900
mov eax, dword [ebp - 0x44]
call fcn.00467384
jmp 0x46ec23
mov eax, dword [ebp - 0x18]
push eax
lea eax, [ebp - 0x34]
mov ecx, 1
mov edx, dword [0x46d8c4]
call fcn.00405678
add esp, 4
xor eax, eax
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x18]
dec eax
test eax, eax
jl 0x46eaa7
inc eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x24], 0
mov ebx, dword [ebp - 0x24]
lea ebx, [ebx + ebx*8]
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + ebx*4 + 4]
lea edx, [ebp - 0x4c]
call fcn.00409330
mov edx, dword [ebp - 0x4c]
mov eax, dword [ebp - 4]
call fcn.0046e724
cmp al, 1
jne 0x46ea9b
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + ebx*4 + 4]
lea edx, [ebp - 0x50]
call fcn.00409330
mov edx, dword [ebp - 0x50]
imul esi, dword [ebp - 0x28], 0xc3
mov eax, dword [ebp - 0x34]
lea eax, [eax + esi*4]
mov ecx, 0xff
call fcn.00404890
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + ebx*4]
lea edx, [ebp - 0x54]
call fcn.00409330
mov edx, dword [ebp - 0x54]
mov eax, dword [ebp - 0x34]
lea eax, [eax + esi*4 + 0x100]
mov ecx, 0xff
call fcn.00404890
push 1
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + ebx*4]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_OpenServiceA
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x46ea9b
lea eax, [ebp - 0x30]
push eax
push 0
mov eax, dword [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_QueryServiceConfigA
mov eax, dword [ebp - 0x30]
call fcn.0040271c
mov dword [ebp - 0x2c], eax
xor eax, eax
push ebp
push 0x46ea94
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x30]
push eax
mov eax, dword [ebp - 0x30]
push eax
mov eax, dword [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_QueryServiceConfigA
test eax, eax
je 0x46ea75
mov eax, dword [ebp - 0x34]
mov edx, dword [ebp - 0x2c]
mov edx, dword [edx + 4]
mov dword [eax + esi*4 + 0x300], edx
inc dword [ebp - 0x28]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x46ea9b
mov eax, dword [ebp - 0x2c]
call fcn.0040273c
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_CloseServiceHandle
ret
inc dword [ebp - 0x24]
dec dword [ebp - 0x38]
jne 0x46e98c
mov edx, 0x24024
mov eax, dword [ebp - 0x10]
call fcn.0040273c
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_CloseServiceHandle
mov eax, dword [ebp - 0x28]
push eax
lea eax, [ebp - 0x34]
mov ecx, 1
mov edx, dword [0x46d8c4]
call fcn.00405678
add esp, 4
mov eax, dword [ebp - 0x34]
call fcn.004054bc
dec eax
test eax, eax
jl 0x46ec23
inc eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x24], 0
mov byte [ebp - 0x1d], 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
call fcn.004054bc
mov edi, eax
dec edi
test edi, edi
jl 0x46eba2
inc edi
xor ebx, ebx
imul eax, ebx, 0xc3
mov edx, dword [ebp - 4]
mov edx, dword [edx + 8]
lea eax, [edx + eax*4]
imul esi, dword [ebp - 0x24], 0xc3
mov edx, dword [ebp - 0x34]
lea edx, [edx + esi*4]
xor ecx, ecx
mov cl, byte [eax]
inc ecx
call fcn.00403054
je 0x46eb5d
imul eax, ebx, 0xc3
mov edx, dword [ebp - 4]
mov edx, dword [edx + 8]
lea eax, [edx + eax*4]
mov edx, dword [ebp - 0x34]
lea edx, [edx + esi*4 + 0x100]
xor ecx, ecx
mov cl, byte [eax]
inc ecx
call fcn.00403054
jne 0x46eb9a
mov eax, dword [ebp - 0x34]
mov eax, dword [eax + esi*4 + 0x300]
imul edx, ebx, 0xc3
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 8]
mov dword [ecx + edx*4 + 0x300], eax
imul eax, ebx, 0xc3
mov edx, dword [ebp - 4]
mov edx, dword [edx + 8]
lea eax, [edx + eax*4]
mov edx, dword [ebp - 0x34]
lea edx, [edx + esi*4]
call fcn.00402fa8
mov byte [ebp - 0x1d], 1
jmp 0x46eba2
inc ebx
dec edi
jne 0x46eb10
cmp byte [ebp - 0x1d], 1
je 0x46ec17
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
call fcn.004054bc
mov ebx, eax
lea eax, [ebx + 1]
push eax
mov eax, dword [ebp - 4]
add eax, 8
mov ecx, 1
mov edx, dword [0x46d8c4]
call fcn.00405678
add esp, 4
imul edx, dword [ebp - 0x24], 0xc3
mov ecx, dword [ebp - 0x34]
imul eax, ebx, 0xc3
mov esi, dword [ebp - 4]
mov esi, dword [esi + 8]
lea edi, [esi + eax*4]
lea esi, [ecx + edx*4]
mov ecx, 0xc3
rep movsd dword es:[edi], dword [esi]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 8]
mov ecx, dword [0x4739d0]
mov dword [edx + eax*4 + 0x304], ecx
mov edx, dword [ebp - 4]
mov edx, dword [edx + 8]
xor ecx, ecx
mov dword [edx + eax*4 + 0x308], ecx
inc dword [ebp - 0x24]
dec dword [ebp - 0x38]
jne 0x46eaf3
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x46ec53
lea eax, [ebp - 0x54]
mov edx, 7
call fcn.00404618
lea eax, [ebp - 0x34]
mov edx, dword [0x46d8c4]
call fcn.00405684
ret