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

Disassembly:
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x70
mov rax, qword [0x140046030]
xor rax, rsp
mov qword [rsp + 0x60], rax
call qword [sym.imp.KERNEL32.dll_GetTickCount]
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
mov edi, eax
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rsi, rax
test rax, rax
jne 0x140003684
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenSCManager_failed___d__n
call fcn.140001190
xor eax, eax
jmp 0x1400038a2
mov r8d, 0x2c
mov qword [rsp + 0x80], rbx
lea rdx, str.psnotify
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
test rax, rax
jne 0x1400036ce
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenService_failed___d__n
call fcn.140001190
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x14000389a
lea rax, [rsp + 0x30]
mov r9d, 0x24
lea r8, [rsp + 0x38]
mov qword [rsp + 0x20], rax
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x14000370b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.QueryServiceStatusEx_failed___d__n
call fcn.140001190
jmp 0x140003883
mov eax, dword [rsp + 0x3c]
cmp eax, 1
jne 0x140003725
lea rcx, str.Service_is_already_stopped._n
call fcn.140001190
jmp 0x140003883
mov qword [rsp + 0x88], rbp
cmp eax, 3
jne 0x1400037b9
mov ebp, 0x2710
nop dword [rax + rax]
lea rcx, str.Service_stop_pending..._n
call fcn.140001190
mov eax, 0xcccccccd
mul dword [rsp + 0x50]
shr edx, 3
cmp edx, 0x3e8
jae 0x140003767
mov edx, 0x3e8
jmp 0x14000376c
cmp edx, ebp
cmova edx, ebp
mov ecx, edx
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rax, [rsp + 0x30]
mov r9d, 0x24
lea r8, [rsp + 0x38]
mov qword [rsp + 0x20], rax
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x1400038c6
cmp dword [rsp + 0x3c], 1
je 0x1400037fe
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, edi
cmp eax, 0x7530
ja 0x1400037f5
cmp dword [rsp + 0x3c], 3
je 0x140003740
lea rcx, str.Stopping_service..._n
call fcn.140001190
lea r8, [rsp + 0x38]
mov edx, 1
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x140003807
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ControlService_failed___d__n
call fcn.140001190
jmp 0x14000387b
lea rcx, str.Service_stop_timed_out._n
jmp 0x140003876
lea rcx, str.Service_stopped_successfully._n
jmp 0x140003876
cmp dword [rsp + 0x3c], 1
je 0x14000386f
nop
mov ecx, dword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rax, [rsp + 0x30]
mov r9d, 0x24
lea r8, [rsp + 0x38]
mov qword [rsp + 0x20], rax
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x1400038c6
mov edx, dword [rsp + 0x3c]
lea rcx, str.Service_status:__d_n
call fcn.140001190
cmp dword [rsp + 0x3c], 1
je 0x14000386f
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, edi
cmp eax, 0x7530
ja 0x1400038bd
cmp dword [rsp + 0x3c], 1
jne 0x140003810
lea rcx, str.Service_stopped_successfully_n
call fcn.140001190
mov rbp, qword [rsp + 0x88]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, 1
mov rbx, qword [rsp + 0x80]
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.14000bd90
mov rsi, qword [rsp + 0x90]
add rsp, 0x70
pop rdi
ret
lea rcx, str.Wait_timed_out_n
jmp 0x140003876
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.QueryServiceStatusEx_failed___d__n
call fcn.140001190
jmp 0x14000387b