Function at 0x1000c560
Capabilities:
Enumerate services

Disassembly:
sub esp, 0x2f8
push ebx
push ebp
push esi
push edi
xor ebp, ebp
push 0xf003f
push ebp
mov dword [esp + 0x20], ecx
push ebp
mov dword [esp + 0x38], ebp
mov dword [esp + 0x30], ebp
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
cmp edi, ebp
mov dword [esp + 0x28], edi
jne 0x1000c59e
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x2f8
ret 4
mov esi, dword [sym.imp.KERNEL32.dll_LocalAlloc]
push 0x10000
push 0x40
call esi
mov ebx, eax
cmp ebx, ebp
mov dword [esp + 0x1c], ebx
jne 0x1000c5d3
mov eax, dword [esp + 0x30c]
pop edi
pop esi
pop ebp
mov dword [eax], 0xffffffff
xor eax, eax
pop ebx
add esp, 0x2f8
ret 4
lea ecx, [esp + 0x24]
lea edx, [esp + 0x10]
push ecx
lea eax, [esp + 0x30]
push edx
push eax
push 0x10000
push ebx
push 3
push 0x30
push edi
call dword [sym.imp.ADVAPI32.dll_EnumServicesStatusA]
test eax, eax
jne 0x1000c611
mov ecx, dword [esp + 0x30c]
pop edi
pop esi
pop ebp
mov dword [ecx], 0xffffffff
pop ebx
add esp, 0x2f8
ret 4
mov eax, dword [esp + 0x10]
lea ecx, [eax + eax*4]
lea edx, [ecx + ecx*8]
lea eax, [eax + edx*2]
lea ecx, [eax*8 + 2]
push ecx
push 0x40
call esi
mov esi, eax
mov eax, dword [esp + 0x10]
mov edi, esi
mov dword [esp + 0x20], esi
lea ecx, [eax + eax*4]
lea edx, [ecx + ecx*8]
lea eax, [eax + edx*2]
lea ecx, [eax*8 + 2]
xor eax, eax
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov byte [esi], 0x86
mov eax, dword [esp + 0x10]
cmp eax, ebp
jbe 0x1000c72e
inc esi
add ebx, 0xc
mov dword [esp + 0x14], esi
mov esi, dword [ebx - 0xc]
mov ecx, 0xb6
xor eax, eax
lea edi, [esp + 0x30]
rep stosd dword es:[edi], eax
mov edi, esi
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [esp + 0x30]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebx - 8]
or ecx, 0xffffffff
mov edi, esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [esp + 0x71]
mov edx, ecx
mov eax, dword [ebx]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
cmp eax, 4
rep movsb byte es:[edi], byte [esi]
jne 0x1000c6ce
mov dword [esp + 0x2fc], 2
jmp 0x1000c6ee
cmp eax, 1
jne 0x1000c6dc
mov dword [esp + 0x2fc], eax
jmp 0x1000c6ee
xor ecx, ecx
cmp eax, 7
setne cl
add ecx, 3
mov dword [esp + 0x2fc], ecx
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x30]
push edx
call fcn.1000c780
mov eax, dword [esp + 0x14]
mov ecx, 0xb6
mov edi, eax
lea esi, [esp + 0x30]
add eax, 0x2d8
inc ebp
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x10]
add ebx, 0x24
cmp ebp, eax
jb 0x1000c66d
mov ebx, dword [esp + 0x1c]
mov esi, dword [esp + 0x20]
mov eax, dword [esp + 0x28]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [esp + 0x30c]
mov eax, dword [esp + 0x10]
push 0x42
mov dword [ecx], eax
lea ecx, [eax + eax*4]
lea edx, [ecx + ecx*8]
lea eax, [eax + edx*2]
lea ecx, [eax*8 + 2]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_LocalReAlloc]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2f8
ret 4