Function at 0x10066b2
Capabilities:
Enumerate services

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x28
push esi
xor esi, esi
mov dword [ebp - 8], esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 4], esi
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x28], esi
cmp dword [ebp + 8], esi
je 0x10066ed
cmp dword [ebp + 8], 0xffffffff
je 0x10066ed
cmp dword [ebp + 0x10], esi
je 0x10066ed
cmp dword [ebp + 0x14], esi
jne 0x10066f7
mov esi, 0x80070057
jmp 0x10069e5
push ebx
push edi
push 4
push 0x1001714
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0xc], eax
mov ebx, 0x80070000
cmp eax, esi
jne 0x1006730
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, esi
jle 0x1006724
and eax, 0xffff
or eax, ebx
mov esi, eax
test esi, esi
jl 0x1006991
xor esi, esi
mov edi, dword [sym.imp.ADVAPI32.dll_EnumServicesStatusExW]
push esi
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x10]
push eax
push esi
push esi
push 1
push 0x30
push esi
push dword [ebp - 0xc]
call edi
test eax, eax
jne 0x1006760
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
je 0x100677d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, esi
jle 0x1006771
and eax, 0xffff
or eax, ebx
mov esi, eax
test esi, esi
jl 0x1006991
xor esi, esi
push dword [ebp - 0x10]
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x1c], eax
cmp eax, esi
jne 0x100679b
mov esi, 0x8007000e
jmp 0x1006991
push esi
lea ecx, [ebp - 0x24]
push ecx
lea ecx, [ebp - 4]
push ecx
lea ecx, [ebp - 0x10]
push ecx
push dword [ebp - 0x10]
mov dword [ebp - 0x24], esi
push eax
push 1
push 0x30
push esi
push dword [ebp - 0xc]
call edi
test eax, eax
jne 0x10067da
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, esi
jle 0x10067ce
and eax, 0xffff
or eax, ebx
mov esi, eax
test esi, esi
jl 0x1006991
xor esi, esi
xor eax, eax
cmp dword [ebp - 4], esi
jbe 0x10067fc
mov edx, dword [ebp - 0x1c]
lea ecx, [edx + 0x24]
mov edi, dword [ecx]
cmp edi, dword [ebp + 0xc]
je 0x10067f7
inc eax
add ecx, 0x2c
cmp eax, dword [ebp - 4]
jb 0x10067e7
cmp eax, dword [ebp - 4]
jb 0x1006806
mov esi, 0x80070490
jmp 0x1006991
imul eax, eax, 0x2c
add eax, edx
mov ecx, dword [eax + 8]
cmp ecx, 0x10
jne 0x100681a
mov eax, dword [eax]
jmp 0x1006969
cmp ecx, 0x20
jne 0x100695f
push 1
push dword [eax]
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [ebp - 8], eax
cmp eax, esi
jne 0x1006858
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, esi
mov edi, 0xffff
jle 0x100684a
and eax, edi
or eax, ebx
mov esi, eax
test esi, esi
jl 0x1006982
xor esi, esi
jmp 0x100685d
mov edi, 0xffff
lea eax, [ebp - 0x14]
push eax
push esi
push esi
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x100687b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x1006895
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, esi
jle 0x1006889
and eax, edi
or eax, ebx
mov esi, eax
test esi, esi
jl 0x1006982
xor esi, esi
push dword [ebp - 0x14]
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x18], eax
cmp eax, esi
jne 0x10068b3
mov esi, 0x8007000e
jmp 0x1006982
lea ecx, [ebp - 0x14]
push ecx
push dword [ebp - 0x14]
push eax
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x10068e2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, esi
jle 0x10068d6
and eax, edi
or eax, ebx
mov esi, eax
test esi, esi
jl 0x1006982
xor esi, esi
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0xc]
lea ecx, [ebp - 0x28]
push ecx
push eax
mov dword [ebp + 0xc], eax
call fcn.010065ce
mov edx, eax
mov dword [ebp - 0x20], edx
cmp edx, esi
jne 0x1006917
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, esi
jle 0x100690c
and eax, edi
or eax, ebx
mov esi, eax
test esi, esi
jl 0x1006982
mov edx, dword [ebp - 0x20]
xor esi, esi
mov edi, dword [ebp - 0x28]
xor eax, eax
cmp edi, esi
jle 0x1006958
mov ecx, dword [edx + eax*4]
push 0x2d
pop esi
cmp si, word [ecx]
jne 0x1006946
movzx ecx, word [ecx + 2]
push 0x6b
pop esi
cmp si, cx
je 0x100693f
push 0x4b
pop esi
cmp si, cx
jne 0x1006946
lea ecx, [edi - 1]
cmp eax, ecx
jne 0x100694d
inc eax
cmp eax, edi
jl 0x1006920
jmp 0x1006954
mov ecx, dword [edx + eax*4 + 4]
mov dword [ebp + 0xc], ecx
cmp eax, edi
jl 0x1006966
mov esi, 0x80070490
jmp 0x1006982
mov esi, 0x80004005
jmp 0x1006991
mov eax, dword [ebp + 0xc]
push eax
push dword [ebp + 0x10]
push 0x1001708
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call fcn.01002f19
add esp, 0x14
mov esi, eax
cmp dword [ebp - 8], 0
je 0x1006991
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor ebx, ebx
cmp dword [ebp - 0xc], ebx
je 0x10069a1
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [ebp - 0x18], ebx
je 0x10069be
push dword [ebp - 0x18]
push ebx
push dword [ebp + 8]
call edi
test eax, eax
jne 0x10069be
mov esi, 0x8007000e
cmp dword [ebp - 0x1c], ebx
je 0x10069d5
push dword [ebp - 0x1c]
push ebx
push dword [ebp + 8]
call edi
test eax, eax
jne 0x10069d5
mov esi, 0x8007000e
cmp dword [ebp - 0x20], ebx
pop edi
pop ebx
je 0x10069e5
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, esi
pop esi
leave
ret 0x10