Function at 0x4f63c8
Capabilities:
Query service status

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffa4
push ebx
push esi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call sub.rtl250.bpl__System__IntfAddRef_qqrx44System__DelphiInterface_17System_IInterface_
xor eax, eax
push ebp
push 0x4f65ef
push dword fs:[eax]
mov dword fs:[eax], esp
push 0xf003f
push 0
push 0
call sub.advapi32.dll_OpenSCManagerW
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x4f65d9
xor eax, eax
push ebp
push 0x4f65d2
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0x10], eax
xor ebx, ebx
xor eax, eax
mov dword [ebp - 0x1c], eax
xor eax, eax
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x10]
push eax
push ebx
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x1c]
push eax
mov ecx, 3
mov edx, 0x30
mov eax, dword [ebp - 0xc]
call fcn.0041952c
cmp dword [ebp - 0x14], 0
jne 0x4f6459
call sub.rtl250.bpl__System__TryFinallyExit_qqrv
jmp 0x4f65d9
mov eax, dword [ebp - 0x14]
call sub.rtl250.bpl__System_AllocMem_qqri
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x4f65bb
xor eax, eax
push ebp
push 0x4f65b4
push dword fs:[eax]
mov dword fs:[eax], esp
mov ebx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
push eax
push ebx
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x1c]
push eax
mov ecx, 3
mov edx, 0x30
mov eax, dword [ebp - 0xc]
call fcn.0041952c
test al, al
je 0x4f64ac
cmp dword [ebp - 0x18], 0
jne 0x4f64bb
call sub.rtl250.bpl__System__TryFinallyExit_qqrv
call sub.rtl250.bpl__System__TryFinallyExit_qqrv
jmp 0x4f65d9
xor eax, eax
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x18]
jae 0x4f659e
cmp dword [ebp - 8], 0
je 0x4f64dc
xor edx, edx
mov eax, dword [ebp - 8]
call sub.AxComponentsRTL.bpl__Axrtl_System_Thread_TThread_SleepByAndCheck_qqrui
mov ebx, dword [ebp - 0x20]
add ebx, ebx
add ebx, ebx
lea ebx, [ebx + ebx*8]
add ebx, dword [ebp - 0x10]
mov esi, dword [ebx + 0xc]
cmp esi, 1
je 0x4f658f
cmp esi, 3
je 0x4f658f
push 0x2c
mov eax, dword [ebx]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_OpenServiceW
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
je 0x4f658f
xor eax, eax
push ebp
push 0x4f6588
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x48]
xor ecx, ecx
mov edx, 0x24
call fcn.004029b0
lea eax, [ebp - 0x14]
push eax
push 0x24
lea eax, [ebp - 0x48]
push eax
push 0
mov eax, dword [ebp - 0x24]
push eax
call sub.advapi32.dll_QueryServiceStatusEx
test eax, eax
je 0x4f6571
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x50], ebx
lea eax, [ebp - 0x48]
mov dword [ebp - 0x4c], eax
lea edx, [ebp - 0x5c]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 0xc]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4f658f
mov eax, dword [ebp - 0x24]
push eax
call sub.advapi32.dll_CloseServiceHandle
ret
inc dword [ebp - 0x20]
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x18]
jb 0x4f64cc
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4f65bb
mov eax, dword [ebp - 0x10]
call sub.rtl250.bpl__System__FreeMem_qqrpv
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4f65d9
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_CloseServiceHandle
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4f65f6
lea eax, [ebp - 4]
call sub.rtl250.bpl__System__IntfClear_qqrr44System__DelphiInterface_17System_IInterface_
ret