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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor ebx, ebx
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
cmp dword [ebp + 8], ebx
jne 0x46a7c6
push 0xf003f
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp + 8], eax
cmp eax, ebx
jne 0x46a7bf
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
mov ecx, esp
mov dword [ebp + 8], esp
push eax
push str.OpenSCManager_failed___d_
push ecx
call fcn.004622a0
add esp, 0xc
call fcn.0046a6f0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 8], 1
mov edx, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
push 0x2c
push edx
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
cmp esi, ebx
jne 0x46a814
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
mov ecx, esp
mov dword [ebp + 8], esp
push eax
push str.OpenService_failed___d_
push ecx
call fcn.004622a0
add esp, 0xc
call fcn.0046a6f0
add esp, 4
cmp dword [ebp - 8], ebx
je 0x46a80b
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
lea edx, [ebp - 0xc]
push edx
push 0x24
lea eax, [ebp - 0x38]
push eax
push ebx
push esi
call edi
test eax, eax
jne 0x46a851
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
mov ecx, esp
mov dword [ebp - 0x10], esp
push eax
push str.QueryServiceStatusEx_failed___d_
push ecx
call fcn.004622a0
add esp, 0xc
call fcn.0046a6f0
jmp 0x46aa0e
mov eax, dword [ebp - 0x34]
cmp eax, 1
jne 0x46a86a
push ecx
mov edx, esp
mov dword [ebp - 0x10], esp
push str.Service_is_already_stopped.
push edx
jmp 0x46a9fa
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
cmp eax, 3
jne 0x46a8f2
push ecx
mov eax, esp
mov dword [ebp - 0x14], esp
push str.Service_stop_pending...
push eax
call fcn.004622a0
add esp, 8
call fcn.0046a6f0
mov eax, 0xcccccccd
mul dword [ebp - 0x20]
shr edx, 3
add esp, 4
cmp edx, 0x3e8
jae 0x46a8ab
mov edx, 0x3e8
jmp 0x46a8b8
cmp edx, 0x2710
jbe 0x46a8b8
mov edx, 0x2710
push edx
call ebx
lea ecx, [ebp - 0xc]
push ecx
push 0x24
lea edx, [ebp - 0x38]
push edx
push 0
push esi
call edi
test eax, eax
je 0x46a940
cmp dword [ebp - 0x34], 1
je 0x46a965
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x10]
cmp eax, 0x7530
ja 0x46a976
cmp dword [ebp - 0x34], 3
je 0x46a875
mov ecx, dword [ebp + 8]
push ecx
mov ecx, esi
call fcn.0046aa50
add esp, 4
lea edx, [ebp - 0x38]
push edx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x46a9af
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x426
jne 0x46a991
call edi
push ecx
mov ecx, esp
mov dword [ebp - 0x14], esp
push eax
push str.Service_already_stopped
push ecx
call fcn.004622a0
add esp, 0xc
jmp 0x46aa02
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
mov ecx, esp
mov dword [ebp - 0x14], esp
push eax
push str.QueryServiceStatusEx_failed___d_
push ecx
call fcn.004622a0
add esp, 0xc
call fcn.0046a6f0
jmp 0x46aa0e
push ecx
mov edx, esp
mov dword [ebp - 0x14], esp
push str.Service_stopped_successfully.
push edx
jmp 0x46a9fa
push ecx
mov eax, esp
mov dword [ebp - 0x14], esp
push str.Service_stop_timed_out.
push eax
call fcn.004622a0
add esp, 8
call fcn.0046a6f0
jmp 0x46aa0e
call edi
push ecx
mov edx, esp
mov dword [ebp - 0x14], esp
push eax
push str.ControlService_failed___d_
push edx
call fcn.004622a0
add esp, 0xc
call fcn.0046a6f0
jmp 0x46aa0e
cmp dword [ebp - 0x34], 1
je 0x46a9ee
mov eax, dword [ebp - 0x20]
push eax
call ebx
lea ecx, [ebp - 0xc]
push ecx
push 0x24
lea edx, [ebp - 0x38]
push edx
push 0
push esi
call edi
test eax, eax
je 0x46a940
cmp dword [ebp - 0x34], 1
je 0x46a9ee
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x10]
cmp eax, 0x7530
ja 0x46aa30
cmp dword [ebp - 0x34], 1
jne 0x46a9b5
push ecx
mov eax, esp
mov dword [ebp - 0x14], esp
push str.Service_stopped_successfully
push eax
call fcn.004622a0
add esp, 8
call fcn.0046a6f0
mov dword [ebp - 4], 1
add esp, 4
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
cmp dword [ebp - 8], 0
je 0x46aa26
mov ecx, dword [ebp + 8]
push ecx
call esi
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ecx
mov edx, esp
mov dword [ebp - 0x14], esp
push str.Wait_timed_out
push edx
call fcn.004622a0
add esp, 8
call fcn.0046a6f0
jmp 0x46aa0e