Function at 0x417170
Capabilities:
Query service status
Start service

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffac
push ebx
push esi
push edi
mov dword [ebp - 0x28], eax
mov eax, 0x4b8d70
call fcn.00497a7c
xor edx, edx
mov dword [ebp - 0x2c], edx
xor ecx, ecx
mov dword [ebp - 0x30], ecx
xor eax, eax
mov dword [ebp - 0x34], eax
mov word [ebp - 0x14], 8
push 0xf003f
push 0
push 0
call sub.advapi32.dll_OpenSCManagerA
mov dword [ebp - 0x2c], eax
push 0xf01ff
push 0x4b2489
push dword [ebp - 0x2c]
call sub.advapi32.dll_OpenServiceA
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
jne 0x41721e
call sub.kernel32.dll_GetLastError
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0x424
jne 0x4171f2
push 0x10
mov ecx, 0x4b24be
mov edx, 0x4b2497
mov eax, dword [sym.imp.vcl60.bpl__Forms_Application]
mov eax, dword [eax]
call fcn.00497b24
jmp 0x41720a
push 0x10
mov ecx, 0x4b24f6
mov edx, 0x4b24c3
mov eax, dword [sym.imp.vcl60.bpl__Forms_Application]
mov eax, dword [eax]
call fcn.00497b24
xor edx, edx
mov dword [ebp - 8], edx
lea ecx, [ebp - 0x24]
push ecx
call sub.CC3260MT.DLL___Return_unwind
pop ecx
jmp 0x4173df
push 0
push 0
push dword [ebp - 0x30]
call sub.advapi32.dll_StartServiceA
test eax, eax
jne 0x4172a9
call sub.kernel32.dll_GetLastError
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0x41d
jne 0x417274
push 0x10
mov ecx, 0x4b2515
mov edx, 0x4b24fb
mov eax, dword [sym.imp.vcl60.bpl__Forms_Application]
mov eax, dword [eax]
call fcn.00497b24
xor edx, edx
mov dword [ebp - 8], edx
lea ecx, [ebp - 0x24]
push ecx
call sub.CC3260MT.DLL___Return_unwind
pop ecx
jmp 0x4173df
cmp dword [ebp - 0x38], 0x420
je 0x4172a9
push 0x10
mov ecx, 0x4b255f
mov edx, 0x4b251a
mov eax, dword [sym.imp.vcl60.bpl__Forms_Application]
mov eax, dword [eax]
call fcn.00497b24
xor edx, edx
mov dword [ebp - 8], edx
lea ecx, [ebp - 0x24]
push ecx
call sub.CC3260MT.DLL___Return_unwind
pop ecx
jmp 0x4173df
mov eax, dword [ebp - 0x28]
call sub.vcl60.bpl__Controls_TControl_Refresh_qqrv
push 0x1194
call sub.kernel32.dll_Sleep
lea edx, [ebp - 0x54]
push edx
push dword [ebp - 0x30]
call sub.advapi32.dll_QueryServiceStatus
cmp dword [ebp - 0x50], 4
jne 0x417375
mov dl, 1
mov eax, dword [ebp - 0x28]
call fcn.00416f1c
mov eax, dword [ebp - 0x28]
call fcn.0040adec
test al, al
je 0x41739d
call fcn.004424f0
test al, al
je 0x41739d
push 0xf01ff
push 0x4b2564
push dword [ebp - 0x2c]
call sub.advapi32.dll_OpenServiceA
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
je 0x41739d
push 0
push 0
push dword [ebp - 0x34]
call sub.advapi32.dll_StartServiceA
test eax, eax
jne 0x41739d
call sub.kernel32.dll_GetLastError
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0x41d
jne 0x417352
push 0x10
mov ecx, 0x4b2590
mov edx, 0x4b2573
mov eax, dword [sym.imp.vcl60.bpl__Forms_Application]
mov eax, dword [eax]
call fcn.00497b24
jmp 0x41739d
cmp dword [ebp - 0x38], 0x420
je 0x41739d
push 0x10
mov ecx, 0x4b25e5
mov edx, 0x4b2595
mov eax, dword [sym.imp.vcl60.bpl__Forms_Application]
mov eax, dword [eax]
call fcn.00497b24
jmp 0x41739d
cmp dword [ebp - 0x50], 1
jne 0x41739d
xor edx, edx
mov eax, dword [ebp - 0x28]
call fcn.00416f1c
push 0x10
mov ecx, 0x4b262f
mov edx, 0x4b25ea
mov eax, dword [sym.imp.vcl60.bpl__Forms_Application]
mov eax, dword [eax]
call fcn.00497b24
mov word [ebp - 0x14], 0
cmp dword [ebp - 0x30], 0
je 0x4173b1
push dword [ebp - 0x30]
call sub.advapi32.dll_CloseServiceHandle
cmp dword [ebp - 0x34], 0
je 0x4173bf
push dword [ebp - 0x34]
call sub.advapi32.dll_CloseServiceHandle
cmp dword [ebp - 0x2c], 0
je 0x4173cd
push dword [ebp - 0x2c]
call sub.advapi32.dll_CloseServiceHandle
cmp word [ebp - 0x12], 0
je 0x4173d5
ret
mov edx, dword [ebp - 0x24]
mov dword fs:[0], edx
mov edi, dword [ebp - 0x60]
mov esi, dword [ebp - 0x5c]
mov ebx, dword [ebp - 0x58]
mov esp, ebp
pop ebp
ret