Function at 0x727374
Capabilities:
Enumerate services
Query service status

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffa4
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 0x5c], edx
mov dword [ebp - 4], edx
mov dword [ebp - 8], edx
mov dword [ebp - 0xc], eax
xor eax, eax
push ebp
push 0x72783d
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0xc]
call fcn.0072798c
mov eax, dword [ebp - 0xc]
lea ecx, [eax + 0x14]
mov eax, dword [ebp - 0xc]
mov edx, dword [eax + 4]
mov eax, dword [ebp - 0xc]
call fcn.00727b8c
mov dl, 1
mov eax, dword [sym.imp.rtl120.bpl__Classes_TList_]
call sub.rtl120.bpl__System_TObject__bctr_qqrv
mov edx, dword [ebp - 0xc]
mov dword [edx + 8], eax
xor ebx, ebx
push 0x80000000
push 0x727850
push 0
call sub.advapi32.dll_OpenSCManagerW
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jbe 0x72781a
xor eax, eax
push ebp
push 0x727813
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0x1c], eax
xor eax, eax
mov dword [ebp - 0x20], eax
xor eax, eax
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
push 0
mov eax, dword [ebp - 0x14]
push eax
push 1
push 0x30
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_EnumServicesStatusW
call sub.kernel32.dll_GetLastError
cmp eax, 0xea
jne 0x7277f6
mov eax, dword [ebp - 0x18]
call sub.rtl120.bpl__System_AllocMem_qqrui
mov dword [ebp - 0x14], eax
xor eax, eax
push ebp
push 0x7277ef
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x14]
push eax
push 1
push 0x30
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_EnumServicesStatusW
test eax, eax
je 0x7277d9
mov eax, dword [ebp - 0x1c]
dec eax
test eax, eax
jl 0x7277d9
inc eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x24], 0
lea eax, [ebp - 4]
mov ebx, dword [ebp - 0x24]
lea ebx, [ebx + ebx*8]
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + ebx*4]
call sub.rtl120.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
lea eax, [ebp - 8]
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + ebx*4 + 4]
call sub.rtl120.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
push 0x80000000
mov eax, dword [ebp - 4]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_OpenServiceW
mov dword [ebp - 0x28], eax
xor eax, eax
push ebp
push 0x7277c6
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x58]
push eax
mov eax, dword [ebp - 0x28]
push eax
call sub.advapi32.dll_QueryServiceStatus
cmp dword [ebp - 0x54], 4
je 0x7274f4
call sub.rtl120.bpl__System__TryFinallyExit_qqrv
jmp 0x7277cd
xor eax, eax
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
push eax
push 0
push 0
mov eax, dword [ebp - 0x28]
push eax
call sub.advapi32.dll_QueryServiceConfigW
call sub.kernel32.dll_GetLastError
cmp eax, 0x7a
jne 0x7277af
mov eax, dword [ebp - 0x1c]
call sub.rtl120.bpl__System_AllocMem_qqrui
mov dword [ebp - 0x2c], eax
xor eax, eax
push ebp
push 0x7277a8
push dword fs:[eax]
mov dword fs:[eax], esp
mov bl, 1
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x28]
push eax
call sub.advapi32.dll_QueryServiceConfigW
test eax, eax
je 0x727567
lea eax, [ebp - 0x5c]
mov edx, dword [ebp - 0x2c]
mov edx, dword [edx + 0xc]
call sub.rtl120.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
mov edx, dword [ebp - 0x5c]
mov eax, dword [ebp - 0xc]
call fcn.00727a24
mov ebx, eax
test bl, bl
je 0x72758f
mov eax, dword [ebp - 0xc]
mov edx, dword [eax + 0x14]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0xc]
call fcn.007278f8
test al, al
je 0x72758f
call sub.rtl120.bpl__System__TryFinallyExit_qqrv
call sub.rtl120.bpl__System__TryFinallyExit_qqrv
jmp 0x7277cd
test bl, bl
jne 0x7275b1
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0xc]
call fcn.00727870
test al, al
je 0x7275b1
call sub.rtl120.bpl__System__TryFinallyExit_qqrv
call sub.rtl120.bpl__System__TryFinallyExit_qqrv
jmp 0x7277cd
mov eax, 0x18
call sub.rtl120.bpl__System_AllocMem_qqrui
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 4]
call sub.rtl120.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
mov eax, dword [ebp - 0x30]
add eax, 4
mov edx, dword [ebp - 8]
call sub.rtl120.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
mov eax, dword [ebp - 0x30]
mov byte [eax + 0xc], bl
mov eax, dword [ebp - 0x24]
lea eax, [eax + eax*8]
mov edx, dword [ebp - 0x14]
cmp dword [edx + eax*4 + 0xc], 4
sete al
mov edx, dword [ebp - 0x30]
mov byte [edx + 0xd], al
mov eax, dword [ebp - 0x30]
add eax, 8
xor edx, edx
call sub.rtl120.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
mov eax, dword [0x806860]
cmp dword [eax], 0
je 0x727697
lea eax, [ebp - 0x1c]
push eax
push 0
push 0
push 1
mov eax, dword [ebp - 0x28]
push eax
mov eax, dword [0x806860]
mov eax, dword [eax]
call eax
call sub.kernel32.dll_GetLastError
cmp eax, 0x7a
jne 0x727697
mov eax, dword [ebp - 0x1c]
inc eax
call sub.rtl120.bpl__System_AllocMem_qqrui
mov dword [ebp - 0x34], eax
xor eax, eax
push ebp
push 0x727690
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x1c]
inc eax
push eax
mov eax, dword [ebp - 0x34]
push eax
push 1
mov eax, dword [ebp - 0x28]
push eax
mov eax, dword [0x806860]
mov eax, dword [eax]
call eax
test eax, eax
je 0x72767a
mov eax, dword [ebp - 0x30]
add eax, 8
mov edx, dword [ebp - 0x34]
mov edx, dword [edx]
call sub.rtl120.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x727697
mov eax, dword [ebp - 0x34]
call sub.rtl120.bpl__System__FreeMem_qqrpv
ret
mov eax, dword [ebp - 0x30]
xor edx, edx
mov dword [eax + 0x10], edx
mov eax, dword [ebp - 0x30]
xor edx, edx
mov dword [eax + 0x14], edx
xor eax, eax
mov dword [ebp - 0x18], eax
xor eax, eax
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
push 0
mov eax, dword [ebp - 0x38]
push eax
push 3
mov eax, dword [ebp - 0x28]
push eax
call sub.advapi32.dll_EnumDependentServicesW
call sub.kernel32.dll_GetLastError
cmp eax, 0xea
jne 0x727784
mov eax, dword [ebp - 0x18]
call sub.rtl120.bpl__System_AllocMem_qqrui
mov dword [ebp - 0x38], eax
xor eax, eax
push ebp
push 0x72777d
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x38]
push eax
push 3
mov eax, dword [ebp - 0x28]
push eax
call sub.advapi32.dll_EnumDependentServicesW
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x1c]
mov dword [eax + 0x14], edx
mov eax, dword [ebp - 0x1c]
add eax, eax
add eax, eax
add eax, eax
call sub.rtl120.bpl__System_AllocMem_qqrui
mov edx, dword [ebp - 0x30]
mov dword [edx + 0x10], eax
mov esi, dword [ebp - 0x1c]
dec esi
test esi, esi
jl 0x727767
inc esi
xor ebx, ebx
mov eax, dword [ebp - 0x30]
mov eax, dword [eax + 0x10]
lea eax, [eax + ebx*8]
lea edi, [ebx + ebx*8]
mov edx, dword [ebp - 0x38]
mov edx, dword [edx + edi*4]
call sub.rtl120.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
mov eax, dword [ebp - 0x30]
mov eax, dword [eax + 0x10]
lea eax, [eax + ebx*8 + 4]
mov edx, dword [ebp - 0x38]
mov edx, dword [edx + edi*4 + 4]
call sub.rtl120.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
inc ebx
dec esi
jne 0x727736
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x727784
mov eax, dword [ebp - 0x38]
call sub.rtl120.bpl__System__FreeMem_qqrpv
ret
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 8]
mov edx, dword [ebp - 0x30]
call sub.rtl120.bpl__Classes_TList_Add_qqrpv
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x7277af
mov eax, dword [ebp - 0x2c]
call sub.rtl120.bpl__System__FreeMem_qqrpv
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x7277cd
mov eax, dword [ebp - 0x28]
push eax
call sub.advapi32.dll_CloseServiceHandle
ret
inc dword [ebp - 0x24]
dec dword [ebp - 0x3c]
jne 0x72748c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x7277f6
mov eax, dword [ebp - 0x14]
call sub.rtl120.bpl__System__FreeMem_qqrpv
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x72781a
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_CloseServiceHandle
mov eax, dword [ebp - 0xc]
mov ebx, dword [eax + 8]
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x727844
lea eax, [ebp - 0x5c]
call sub.rtl120.bpl__System__UStrClr_qqrpv
lea eax, [ebp - 8]
mov edx, 2
call sub.rtl120.bpl__System__UStrArrayClr_qqrpvi
ret