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

Disassembly:
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r14
lea rbp, [rsp - 0x410]
sub rsp, 0x510
mov rax, qword [0x14025ab40]
xor rax, rsp
mov qword [rbp + 0x400], rax
mov rdi, rcx
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r9, rdi
mov esi, eax
lea rax, [rbp + 0x360]
mov r8d, 0x50
sub r9, rax
lea rdx, [rbp + 0x360]
nop
lea rcx, [r8 + 0x7fffffae]
test rcx, rcx
je 0x140002fb4
movzx ecx, word [r9 + rdx]
test cx, cx
je 0x140002fb4
mov word [rdx], cx
add rdx, 2
dec r8
jne 0x140002f90
jmp 0x140002fb9
test r8, r8
jne 0x140002fbd
sub rdx, 2
xor eax, eax
lea rcx, [rsp + 0x60]
mov r8, rdi
mov word [rdx], ax
lea rdx, [0x14021ac38]
call qword [sym.imp.USER32.dll_wsprintfW]
lea rcx, [rsp + 0x60]
call fcn.140002620
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov r14, rax
test rax, rax
jne 0x140003026
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.In_DoStopSvc__ws_schSCManager_is_NULL_reason___d__r_n
lea rcx, [rsp + 0x60]
mov r9d, eax
mov r8, rdi
call qword [sym.imp.USER32.dll_wsprintfW]
lea rcx, [rsp + 0x60]
call fcn.140002620
jmp 0x140003323
lea rdx, [rbp + 0x360]
mov r8d, 0x2c
mov rcx, rax
mov qword [rsp + 0x538], rbx
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
test rax, rax
jne 0x140003082
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.In_DoStopSvc__ws_schService_is_NULL_reason___d__r_n
lea rcx, [rsp + 0x60]
mov r9d, eax
mov r8, rdi
call qword [sym.imp.USER32.dll_wsprintfW]
lea rcx, [rsp + 0x60]
call fcn.140002620
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x14000331b
lea rax, [rsp + 0x30]
lea r8, [rsp + 0x38]
mov r9d, 0x24
xor edx, edx
mov rcx, rbx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x1400030b7
lea rcx, str.In_DoStopSvc_QueryServiceStatusEx_failed__r_n
call fcn.140002620
jmp 0x1400032ea
mov eax, dword [rsp + 0x3c]
cmp eax, 1
jne 0x1400030e4
lea rdx, str.In_DoStopSvc__ws_Service_is_already_stopped__r_n
lea rcx, [rsp + 0x60]
mov r8, rdi
call qword [sym.imp.USER32.dll_wsprintfW]
lea rcx, [rsp + 0x60]
call fcn.140002620
jmp 0x1400032ea
mov qword [rsp + 0x540], r15
mov r15d, 0x2710
cmp eax, 3
jne 0x14000317f
nop dword [rax + rax]
lea rcx, str.In_DoStopSvc_Service_stop_pending...__r_n
call fcn.140002620
mov eax, 0xcccccccd
mul dword [rsp + 0x50]
shr edx, 3
cmp edx, 0x3e8
jae 0x140003127
mov edx, 0x3e8
jmp 0x14000312e
cmp edx, r15d
cmova edx, r15d
mov ecx, edx
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rax, [rsp + 0x30]
lea r8, [rsp + 0x38]
mov r9d, 0x24
xor edx, edx
mov rcx, rbx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x140003219
cmp dword [rsp + 0x3c], 1
je 0x1400031fa
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, esi
cmp eax, 0x7530
ja 0x1400031db
cmp dword [rsp + 0x3c], 3
je 0x140003100
lea rcx, [0x14021af60]
call fcn.140002620
call fcn.140002780
lea rcx, str.__StopDependentServices_r_n
call fcn.140002620
lea r8, [rsp + 0x38]
mov edx, 1
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x14000323e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.ControlService_failed___d__r_n
lea rcx, [rsp + 0x60]
mov r8d, eax
call fcn.1401911ac
lea rcx, [rsp + 0x60]
jmp 0x1400032dd
lea rdx, str._ws_In_DoStopSvc_Service_stop_timed_out...__r_n
lea rcx, [rsp + 0x60]
mov r8, rdi
call qword [sym.imp.USER32.dll_wsprintfW]
lea rcx, [rsp + 0x60]
jmp 0x1400032dd
lea rdx, str._wsService_stopped_successfully._r_n
lea rcx, [rsp + 0x60]
mov r8, rdi
call qword [sym.imp.USER32.dll_wsprintfW]
lea rcx, [rsp + 0x60]
jmp 0x1400032dd
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.QueryServiceStatusEx_failed___d__r_n
lea rcx, [rsp + 0x60]
mov r8d, eax
call qword [sym.imp.USER32.dll_wsprintfW]
lea rcx, [rsp + 0x60]
jmp 0x1400032dd
cmp dword [rsp + 0x3c], 1
je 0x1400032d6
nop dword [rax]
mov eax, 0xcccccccd
mul dword [rsp + 0x50]
shr edx, 3
cmp edx, 0x3e8
jae 0x14000326b
mov edx, 0x3e8
jmp 0x140003272
cmp edx, r15d
cmova edx, r15d
mov ecx, edx
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rax, [rsp + 0x30]
lea r8, [rsp + 0x38]
mov r9d, 0x24
xor edx, edx
mov rcx, rbx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x140003219
cmp dword [rsp + 0x3c], 1
je 0x1400032ca
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, esi
cmp eax, 0x7530
ja 0x1400032c1
cmp dword [rsp + 0x3c], 1
jne 0x140003250
jmp 0x1400032d6
lea rcx, str.Wait_timed_out__r_n
jmp 0x1400032dd
lea rcx, str.Service_Stopped._r_n
call fcn.140002620
lea rcx, str.In_DoStopSvc_Service_stopped_successfully__r_n
call fcn.140002620
mov r15, qword [rsp + 0x540]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rdx, str._____ws_DoStopSvc___r_n
lea rcx, [rsp + 0x60]
mov r8, rdi
call qword [sym.imp.USER32.dll_wsprintfW]
lea rcx, [rsp + 0x60]
call fcn.140002620
mov rbx, qword [rsp + 0x538]
mov rcx, qword [rbp + 0x400]
xor rcx, rsp
call fcn.140190940
mov rsi, qword [rsp + 0x548]
add rsp, 0x510
pop r14
pop rdi
pop rbp
ret