Function at 0x40eee0
Capabilities:
Check for time delay via gettickcount
Query service status
Stop service

Disassembly:
push 0xffffffffffffffff
push 0x446538
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4630d0]
xor eax, esp
push eax
lea eax, [esp + 0x44]
mov dword fs:[0], eax
mov dword [esp + 0x4c], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0xf003f
push 0
push 0
mov dword [esp + 0x24], eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
mov dword [esp + 0x1c], edi
jne 0x40ef70
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenSCManager_failed___d__n
call fcn.00431b6c
add esp, 8
lea ecx, [esp + 0x54]
mov dword [esp + 0x4c], 0xffffffff
call fcn.0040fd60
mov eax, 0x64
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
mov eax, dword [esp + 0x58]
cmp dword [eax - 4], 1
jle 0x40ef8b
mov eax, dword [eax - 0xc]
push eax
lea ecx, [esp + 0x5c]
call fcn.00401bf0
mov eax, dword [esp + 0x58]
push 0x2c
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
jne 0x40efb8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenService_failed___d__n
call fcn.00431b6c
add esp, 8
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x40ef46
mov edi, dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
lea ecx, [esp + 0x14]
push ecx
push 0x24
lea edx, [esp + 0x28]
push edx
push 0
push esi
call edi
test eax, eax
jne 0x40efec
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.QueryServiceStatusEx_failed___d__n
call fcn.00431b6c
add esp, 8
jmp 0x40f0e0
mov eax, dword [esp + 0x24]
cmp eax, 1
je 0x40f0e0
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
mov ebp, 3
cmp eax, ebp
jne 0x40f046
mov eax, dword [esp + 0x38]
push eax
call ebx
lea ecx, [esp + 0x14]
push ecx
push 0x24
lea edx, [esp + 0x28]
push edx
push 0
push esi
call edi
test eax, eax
je 0x40efd3
cmp dword [esp + 0x24], 1
je 0x40f0e0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esp + 0x18]
cmp eax, 0x7530
ja 0x40f080
cmp dword [esp + 0x24], ebp
je 0x40f008
mov eax, dword [esp + 0x1c]
push esi
push eax
call fcn.0040ebc0
add esp, 8
lea ecx, [esp + 0x20]
push ecx
mov ebp, 1
push ebp
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x40f087
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ControlService_failed___d__n
call fcn.00431b6c
add esp, 8
jmp 0x40f0e0
push str.Service_stop_timed_out._n
jmp 0x40f0d8
cmp dword [esp + 0x5c], 0
je 0x40f0e0
cmp dword [esp + 0x24], ebp
je 0x40f0e0
mov edx, dword [esp + 0x38]
push edx
call ebx
lea eax, [esp + 0x14]
push eax
push 0x24
lea ecx, [esp + 0x28]
push ecx
push 0
push esi
call edi
test eax, eax
je 0x40efd3
cmp dword [esp + 0x24], ebp
je 0x40f0e0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esp + 0x18]
cmp eax, 0x7530
ja 0x40f0d3
cmp dword [esp + 0x24], ebp
jne 0x40f094
jmp 0x40f0e0
push str.Wait_timed_out_n
call fcn.00431b6c
add esp, 4
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
mov edx, dword [esp + 0x1c]
push edx
call esi
lea ecx, [esp + 0x54]
mov dword [esp + 0x4c], 0xffffffff
call fcn.0040fd60
xor eax, eax
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret