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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x5c4680]
xor eax, ebp
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x40], 0x7530
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
jne 0x4785c1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenSCManager_failed___d__n
call fcn.00478b70
add esp, 8
jmp 0x4787e8
push 0x2c
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x34]
push ecx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
jne 0x4785fd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenService_failed___d__n
call fcn.00478b70
add esp, 8
mov edx, dword [ebp - 0x34]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x4787e8
lea eax, [ebp - 0x38]
push eax
push 0x24
lea ecx, [ebp - 0x28]
push ecx
push 0
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x478635
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x57c960
call fcn.00478b70
add esp, 8
jmp 0x4787d4
cmp dword [ebp - 0x24], 1
jne 0x478652
push str.Service_is_already_stopped._n
call fcn.00478b70
add esp, 4
jmp 0x4787d4
cmp dword [ebp - 0x24], 3
jne 0x478723
push str.Service_stop_pending..._n
call fcn.00478b70
add esp, 4
mov eax, dword [ebp - 0x10]
xor edx, edx
mov ecx, 0xa
div ecx
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0x3e8
jae 0x47868a
mov dword [ebp - 0x30], 0x3e8
jmp 0x47869a
cmp dword [ebp - 0x30], 0x2710
jbe 0x47869a
mov dword [ebp - 0x30], 0x2710
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x38]
push eax
push 0x24
lea ecx, [ebp - 0x28]
push ecx
push 0
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x4786dc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x57c9c0
call fcn.00478b70
add esp, 8
jmp 0x4787d4
cmp dword [ebp - 0x24], 1
jne 0x4786f9
push str.Service_stopped_successfully._n
call fcn.00478b70
add esp, 4
jmp 0x4787d4
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x3c]
cmp eax, dword [ebp - 0x40]
jbe 0x47871e
push str.Service_stop_timed_out._n
call fcn.00478b70
add esp, 4
jmp 0x4787d4
jmp 0x478652
mov eax, dword [ebp - 0x2c]
push eax
mov ecx, dword [ebp - 0x34]
push ecx
call fcn.00478890
lea edx, [ebp - 0x28]
push edx
push 1
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x47875c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ControlService_failed___d__n
call fcn.00478b70
add esp, 8
jmp 0x4787d4
cmp dword [ebp - 0x24], 1
je 0x4787c7
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea edx, [ebp - 0x38]
push edx
push 0x24
lea eax, [ebp - 0x28]
push eax
push 0
mov ecx, dword [ebp - 0x2c]
push ecx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x47879e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.QueryServiceStatusEx_failed___d__n
call fcn.00478b70
add esp, 8
jmp 0x4787d4
cmp dword [ebp - 0x24], 1
jne 0x4787a6
jmp 0x4787c7
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x3c]
cmp eax, dword [ebp - 0x40]
jbe 0x4787c5
push str.Wait_timed_out_n
call fcn.00478b70
add esp, 4
jmp 0x4787d4
jmp 0x47875c
push str.Service_stopped_successfully_n
call fcn.00478b70
add esp, 4
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp - 0x34]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005313f0
mov esp, ebp
pop ebp
ret 4