Function at 0x10008620
Capabilities:
Enumerate services

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10011e88
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x54
push ebx
push esi
xor esi, esi
xor ebx, ebx
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x5c], esi
mov dword [ebp - 0x58], esi
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x48], esi
mov dword [ebp - 4], esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x20], esi
cmp edi, esi
je 0x10008811
push 4
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x1c], eax
cmp eax, esi
je 0x10008811
mov eax, 0x8000
lea ecx, [ebp - 0x5c]
call fcn.10009940
test eax, eax
je 0x10008807
mov ebx, dword [ebp - 0x58]
push esi
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x4c]
lea ecx, [ebp - 0x10]
push ecx
mov ecx, dword [ebp - 0x1c]
lea edx, [ebp - 0x14]
push edx
push ebx
push eax
push 1
push 0xb
push esi
push ecx
mov dword [ebp - 0x10], esi
call dword [sym.imp.ADVAPI32.dll_EnumServicesStatusExW]
mov dword [ebp - 0x28], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x18], esi
cmp dword [ebp - 0x10], esi
jbe 0x10008794
mov ebx, dword [ebp - 0x4c]
mov edx, dword [ebx]
xor eax, eax
push edx
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
call dword [sym.imp.msvcrt.dll__wcslwr]
mov ecx, dword [ebx]
add esp, 4
lea eax, [ebp - 0x44]
push eax
push ecx
call fcn.10006640
add esp, 8
test eax, eax
je 0x1000877e
mov esi, dword [edi + 4]
test esi, esi
jne 0x10008711
xor ecx, ecx
jmp 0x10008727
mov ecx, dword [edi + 8]
sub ecx, esi
mov eax, 0x66666667
imul ecx
sar edx, 3
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
test esi, esi
je 0x1000876d
mov edx, dword [edi + 0xc]
sub edx, esi
mov eax, 0x66666667
imul edx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ecx, eax
jae 0x1000876d
mov eax, dword [ebp - 0x30]
mov esi, dword [edi + 8]
mov byte [ebp - 0x24], 0
mov edx, dword [ebp - 0x24]
push edx
push eax
push esi
lea edx, [ebp - 0x44]
mov ecx, 1
call fcn.10009250
add esp, 0xc
add esi, 0x14
mov dword [edi + 8], esi
jmp 0x1000877c
mov eax, dword [edi + 8]
lea ecx, [ebp - 0x44]
push ecx
push eax
mov ecx, edi
call fcn.10008ed0
xor esi, esi
mov eax, dword [ebp - 0x18]
inc eax
add ebx, 0x2c
mov dword [ebp - 0x18], eax
cmp eax, dword [ebp - 0x10]
jb 0x100086d6
mov ebx, dword [ebp - 0x58]
cmp dword [ebp - 0x28], esi
jne 0x10008802
cmp dword [ebp - 0x2c], 0xea
jne 0x10008802
mov eax, dword [ebp - 0x14]
cmp eax, ebx
jbe 0x100087e2
add eax, 0x20
lea ecx, [ebp - 0x5c]
mov dword [ebp - 0x14], eax
call fcn.10009940
test eax, eax
jne 0x10008694
mov ecx, dword [ebp - 0x58]
mov eax, dword [ebp - 0x4c]
cmp ecx, esi
je 0x100087d7
lea esp, [esp]
mov byte [eax], 0
inc eax
dec ecx
jne 0x100087d0
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x50], esi
jmp 0x10008694
mov eax, dword [ebp - 0x4c]
mov ecx, ebx
cmp ebx, esi
je 0x100087f7
jmp 0x100087f0
mov byte [eax], 0
inc eax
dec ecx
jne 0x100087f0
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x50], esi
jmp 0x10008694
mov ebx, 1
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea esi, [ebp - 0x5c]
call fcn.10009870
mov ecx, dword [ebp - 0xc]
pop esi
mov eax, ebx
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret