Function at 0x66552c
Capabilities:
Enumerate services

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc8
push ebx
push esi
xor eax, eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 4], eax
mov dword [ebp - 8], eax
xor eax, eax
push ebp
push 0x665742
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x78cb04]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov edx, dword [eax]
call dword [edx + 0x44]
xor edx, edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov edx, 0x665760
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
call dword [ecx + 0x38]
xor edx, edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
call dword [ecx + 0x38]
xor eax, eax
mov dword [ebp - 0x10], eax
xor eax, eax
mov dword [ebp - 0x14], eax
xor eax, eax
mov dword [ebp - 0x18], eax
xor eax, eax
mov dword [ebp - 0x24], eax
xor edx, edx
push ebp
push 0x665718
push dword fs:[edx]
mov dword fs:[edx], esp
push 0xf003f
push 0
push 0
call sub.advapi32.dll_OpenSCManagerW
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x6655c1
call sub.rtl120.bpl__System__TryFinallyExit_qqrv
jmp 0x66571f
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_LockServiceDatabase
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x6655e9
call sub.kernel32.dll_GetLastError
cmp eax, 0x41f
jne 0x6655e9
call sub.rtl120.bpl__System__TryFinallyExit_qqrv
jmp 0x66571f
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1c]
push eax
push 0
mov eax, dword [ebp - 0x18]
push eax
push 3
push 0xb
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_EnumServicesStatusW
cmp dword [ebp - 0x1c], 0
ja 0x665618
call sub.rtl120.bpl__System__TryFinallyExit_qqrv
jmp 0x66571f
mov eax, dword [ebp - 0x1c]
call sub.rtl120.bpl__System_AllocMem_qqrui
mov dword [ebp - 0x18], eax
xor ebx, ebx
jmp 0x66564d
inc ebx
cmp ebx, 0xa
jbe 0x665637
call sub.rtl120.bpl__System__TryFinallyExit_qqrv
jmp 0x66571f
call sub.kernel32.dll_GetLastError
cmp eax, 0xea
je 0x66564d
call sub.rtl120.bpl__System__TryFinallyExit_qqrv
jmp 0x66571f
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x18]
push eax
push 3
push 0xb
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_EnumServicesStatusW
test eax, eax
je 0x665627
cmp dword [ebp - 0x20], 0
ja 0x665682
call sub.rtl120.bpl__System__TryFinallyExit_qqrv
jmp 0x66571f
mov ebx, dword [ebp - 0x18]
mov esi, dword [ebp - 0x20]
dec esi
test esi, esi
jl 0x6656de
inc esi
lea eax, [ebp - 4]
mov edx, dword [ebx]
call sub.rtl120.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
lea eax, [ebp - 8]
mov edx, dword [ebx + 4]
call sub.rtl120.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
lea eax, [ebp - 0x28]
push eax
mov eax, dword [ebp - 4]
mov dword [ebp - 0x38], eax
mov byte [ebp - 0x34], 0x11
mov eax, dword [ebp - 8]
mov dword [ebp - 0x30], eax
mov byte [ebp - 0x2c], 0x11
lea edx, [ebp - 0x38]
mov ecx, 1
mov eax, 0x665794
call fcn.0040fdb0
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
call dword [ecx + 0x38]
add ebx, 0x24
dec esi
jne 0x66568e
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x66571f
cmp dword [ebp - 0x18], 0
je 0x6656f9
mov eax, dword [ebp - 0x18]
call sub.rtl120.bpl__System__FreeMem_qqrpv
cmp dword [ebp - 0x14], 0
je 0x665708
mov eax, dword [ebp - 0x14]
push eax
call sub.advapi32.dll_UnlockServiceDatabase
cmp dword [ebp - 0x10], 0
je 0x665717
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_CloseServiceHandle
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x665749
lea eax, [ebp - 0x28]
call sub.rtl120.bpl__System__UStrClr_qqrpv
lea eax, [ebp - 8]
mov edx, 2
call sub.rtl120.bpl__System__UStrArrayClr_qqrpvi
ret