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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x101433fd
mov eax, dword fs:[0]
push eax
sub esp, 0x188
mov eax, dword [0x1019a128]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x44], edi
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
xor ebx, ebx
call esi
push 0xf003f
push ebx
push ebx
mov dword [ebp - 0x40], eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x3c], eax
test eax, eax
jne 0x10066b1c
lea edi, [ebx + 0x6e]
jmp 0x10066e9c
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 0x12c
lea eax, [edi + 4]
push eax
push dword [ebp - 0x3c]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, eax
test ebx, ebx
jne 0x10066b4e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test edi, edi
jne 0x10066e9c
jmp 0x10066b50
xor edi, edi
lea eax, [ebp - 0x14]
push eax
push 0x24
lea eax, [ebp - 0x38]
push eax
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x10066e4a
mov eax, dword [ebp - 0x34]
cmp eax, 1
je 0x10066e17
mov edi, 1
cmp eax, 3
jne 0x10066ce7
nop word [eax + eax]
push str.ServiceManager::Stop
mov edx, 0x10
lea ecx, [ebp - 0xec]
call fcn.1000aed0
add esp, 4
mov dword [ebp - 4], 2
cmp byte [eax + 0x48], 0
je 0x10066bc1
mov edx, str.Service_stop_pending...
mov ecx, eax
call fcn.100205a0
lea ecx, [ebp - 0xec]
mov dword [ebp - 4], 0xffffffff
call fcn.1000ad70
mov eax, 0xcccccccd
mul dword [ebp - 0x20]
shr edx, 3
cmp edx, 0x3e8
jae 0x10066bed
mov edx, 0x3e8
jmp 0x10066bfb
cmp edx, 0x2710
mov eax, 0x2710
cmova edx, eax
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x14]
push eax
push 0x24
lea eax, [ebp - 0x38]
push eax
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x10066c88
cmp dword [ebp - 0x34], 1
je 0x10066d95
call esi
sub eax, dword [ebp - 0x40]
cmp eax, 0x7530
ja 0x10066c3e
cmp dword [ebp - 0x34], 3
je 0x10066b90
jmp 0x10066ce7
push str.ServiceManager::Stop
mov edx, 8
lea ecx, [ebp - 0xec]
call fcn.1000aed0
add esp, 4
mov dword [ebp - 4], 4
cmp byte [eax + 0x48], 0
je 0x10066c6f
mov edx, str.Service_stop_timed_out.
mov ecx, eax
call fcn.100205a0
lea ecx, [ebp - 0xec]
mov dword [ebp - 4], 0xffffffff
call fcn.1000ad70
mov edi, 0x5b4
jmp 0x10066ce7
push str.ServiceManager::Stop
mov edx, 4
lea ecx, [ebp - 0xec]
call fcn.1000aed0
add esp, 4
mov esi, eax
mov dword [ebp - 4], 3
cmp byte [esi + 0x48], 0
je 0x10066cbb
mov edx, str.QueryServiceStatusEx_err
mov ecx, esi
call fcn.100205a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp byte [esi + 0x48], 0
je 0x10066ccf
push eax
mov ecx, esi
call fcn.100201d0
lea ecx, [ebp - 0xec]
mov dword [ebp - 4], 0xffffffff
call fcn.1000ad70
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
push dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x44]
call fcn.100673b0
lea eax, [ebp - 0x38]
push eax
push dword [ebp + 8]
push ebx
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x10066dc2
cmp dword [ebp - 0x34], 1
je 0x10066e9c
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x14]
push eax
push 0x24
lea eax, [ebp - 0x38]
push eax
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x10066d9c
cmp dword [ebp - 0x34], 1
je 0x10066d95
call esi
sub eax, dword [ebp - 0x40]
cmp eax, 0x7530
ja 0x10066d4f
cmp dword [ebp - 0x34], 1
jne 0x10066d12
jmp 0x10066e9c
push str.ServiceManager::Stop
mov edx, 4
lea ecx, [ebp - 0x194]
call fcn.1000aed0
add esp, 4
mov dword [ebp - 4], 7
cmp byte [eax + 0x48], 0
je 0x10066d80
mov edx, str.Wait_timed_out
mov ecx, eax
call fcn.100205a0
lea ecx, [ebp - 0x194]
call fcn.1000ad70
mov edi, 0x5b4
jmp 0x10066e9c
xor edi, edi
jmp 0x10066e9c
push str.ServiceManager::Stop
mov edx, 4
lea ecx, [ebp - 0xec]
call fcn.1000aed0
add esp, 4
mov esi, eax
mov dword [ebp - 4], 6
jmp 0x10066e6b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.ServiceManager::Stop
mov edx, 4
lea ecx, [ebp - 0xec]
mov edi, eax
call fcn.1000aed0
add esp, 4
mov esi, eax
mov dword [ebp - 4], 5
mov al, byte [esi + 0x48]
test al, al
je 0x10066e91
mov edx, str.ControlService_err
mov ecx, esi
call fcn.100205a0
mov al, byte [esi + 0x48]
test al, al
je 0x10066e91
push edi
mov ecx, esi
call fcn.10026c90
jmp 0x10066e91
push str.ServiceManager::Stop
mov edx, 0x10
lea ecx, [ebp - 0xec]
call fcn.1000aed0
add esp, 4
mov dword [ebp - 4], 1
cmp byte [eax + 0x48], 0
je 0x10066e91
mov edx, str.Service_is_already_stopped.
mov ecx, eax
call fcn.100205a0
jmp 0x10066e91
push str.ServiceManager::Stop
mov edx, 4
lea ecx, [ebp - 0xec]
call fcn.1000aed0
add esp, 4
mov esi, eax
mov dword [ebp - 4], 0
cmp byte [esi + 0x48], 0
je 0x10066e7d
mov edx, str.QueryServiceStatusEx_err
mov ecx, esi
call fcn.100205a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp byte [esi + 0x48], 0
je 0x10066e91
push eax
mov ecx, esi
call fcn.100201d0
lea ecx, [ebp - 0xec]
call fcn.1000ad70
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
call esi
push dword [ebp - 0x3c]
call esi
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.101157bc
mov esp, ebp
pop ebp
ret 4