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

Disassembly:
mov qword [rsp + 0x18], rbx
push rsi
sub rsp, 0x70
mov rax, qword [0x1401f0b90]
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 ebx, eax
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rsi, rax
test rax, rax
jne 0x140001b12
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.StopService:_OpenSCManager_failed___d_
mov edx, eax
call fcn.1400052e0
jmp 0x140001d60
lea rdx, str.BTWDINS
mov r8d, 0x2c
mov rcx, rax
mov qword [rsp + 0x88], rdi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rdi, rax
test rax, rax
jne 0x140001b59
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.BTWDINS
lea rcx, str.StopService:__S_OpenService_failed___d_
mov r8d, eax
call fcn.1400052e0
jmp 0x140001d4f
lea rax, [rsp + 0x30]
lea r8, [rsp + 0x38]
mov r9d, 0x24
xor edx, edx
mov rcx, rdi
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x140001b9e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.BTWDINS
lea rcx, str.StopService:__S_QueryServiceStatusEx_failed___d_
mov r8d, eax
call fcn.1400052e0
jmp 0x140001d46
mov eax, dword [rsp + 0x3c]
cmp eax, 1
jne 0x140001bbf
lea rdx, str.BTWDINS
lea rcx, str.StopService:__S_service_is_already_stopped
call fcn.1400052e0
jmp 0x140001d46
mov qword [rsp + 0x80], rbp
cmp eax, 3
jne 0x140001c5c
mov ebp, 0x2710
nop word [rax + rax]
lea rdx, str.BTWDINS
lea rcx, str.StopService:__S_Service_stop_pending...
call fcn.1400052e0
mov eax, 0xcccccccd
mul dword [rsp + 0x50]
shr edx, 3
cmp edx, 0x3e8
jae 0x140001c0e
mov edx, 0x3e8
jmp 0x140001c13
cmp edx, ebp
cmova edx, ebp
mov ecx, edx
call qword [sym.imp.KERNEL32.dll_Sleep]
lea r11, [rsp + 0x30]
lea r8, [rsp + 0x38]
mov r9d, 0x24
xor edx, edx
mov rcx, rdi
mov qword [rsp + 0x20], r11
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x140001cb4
cmp dword [rsp + 0x3c], 1
je 0x140001cab
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, ebx
cmp eax, 0x7530
ja 0x140001c9f
cmp dword [rsp + 0x3c], 3
je 0x140001be0
mov rdx, rdi
mov rcx, rsi
call fcn.140001db0
lea r8, [rsp + 0x38]
mov edx, 1
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x140001cd2
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.BTWDINS
lea rcx, str.StopService:__S_ControlService_failed___d__n
mov r8d, eax
call fcn.1400052e0
jmp 0x140001d3e
lea rcx, str.StopService:__S_Service_stop_timed_out
jmp 0x140001d32
lea rcx, str.StopService:__S_Service_stopped_successfully
jmp 0x140001d32
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.BTWDINS
lea rcx, str.StopService:__S_QueryServiceStatusEx_failed___d_
mov r8d, eax
call fcn.1400052e0
jmp 0x140001d3e
cmp dword [rsp + 0x3c], 1
je 0x140001d2b
nop dword [rax]
mov ecx, dword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_Sleep]
lea r11, [rsp + 0x30]
lea r8, [rsp + 0x38]
mov r9d, 0x24
xor edx, edx
mov rcx, rdi
mov qword [rsp + 0x20], r11
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x140001d8d
cmp dword [rsp + 0x3c], 1
je 0x140001d84
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, ebx
cmp eax, 0x7530
ja 0x140001d7b
cmp dword [rsp + 0x3c], 1
jne 0x140001ce0
lea rcx, str.StopService:__S_service_stopped_successfully
lea rdx, str.BTWDINS
call fcn.1400052e0
mov rbp, qword [rsp + 0x80]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rdi, qword [rsp + 0x88]
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.14013f9a0
mov rbx, qword [rsp + 0x90]
add rsp, 0x70
pop rsi
ret
lea rcx, str.StopService:__S_Service_stop_timed_out_2
jmp 0x140001d32
lea rcx, str.StopService:__S_Service_stopped_successfully_2
jmp 0x140001d32
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.BTWDINS
lea rcx, str.StopService:__S_QueryServiceStatusEx_2_failed___d_
mov r8d, eax
call fcn.1400052e0
jmp 0x140001d3e