Function at 0x1400032b0
Capabilities:
Check for time delay via gettickcount
Query service status
Start service

Disassembly:
push rbp
push r14
mov rbp, rsp
sub rsp, 0x78
mov rax, qword [0x140046030]
xor rax, rsp
mov qword [rbp - 0x18], rax
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov r14, rax
test rax, rax
jne 0x1400032fc
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenSCManager_failed___d__n
call fcn.140001190
xor eax, eax
jmp 0x14000361b
mov r8d, 0xf01ff
mov qword [rsp + 0x90], rbx
lea rdx, str.psnotify
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
test rax, rax
jne 0x140003346
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenService_failed___d__n
call fcn.140001190
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x140003613
lea rax, [rbp - 0x48]
mov r9d, 0x24
lea r8, [rbp - 0x40]
mov qword [rsp + 0x20], rax
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x140003395
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.QueryServiceStatusEx_failed___d__n
call fcn.140001190
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x140003613
mov eax, dword [rbp - 0x3c]
dec eax
test eax, 0xfffffffd
je 0x1400033c6
lea rcx, str.Cannot_start_the_service_because_it_is_already_running_n
call fcn.140001190
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x140003613
mov qword [rsp + 0x98], rsi
mov qword [rsp + 0xa0], rdi
mov qword [rsp + 0x70], r15
call qword [sym.imp.KERNEL32.dll_GetTickCount]
cmp dword [rbp - 0x3c], 3
mov r15d, 0x2710
mov edi, dword [rbp - 0x2c]
mov esi, eax
jne 0x140003466
mov eax, 0xcccccccd
mul dword [rbp - 0x28]
shr edx, 3
cmp edx, 0x3e8
jae 0x14000340c
mov edx, 0x3e8
jmp 0x140003413
cmp edx, r15d
cmova edx, r15d
mov ecx, edx
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rax, [rbp - 0x48]
mov r9d, 0x24
lea r8, [rbp - 0x40]
mov qword [rsp + 0x20], rax
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x1400034c3
cmp dword [rbp - 0x2c], edi
jbe 0x140003453
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, dword [rbp - 0x2c]
mov esi, eax
jmp 0x140003460
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, esi
cmp eax, dword [rbp - 0x28]
ja 0x140003487
cmp dword [rbp - 0x3c], 3
je 0x1400033f2
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x140003495
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.StartService_failed___d__n
jmp 0x1400034d0
lea rcx, str.Timeout_waiting_for_service_to_stop_n
call fcn.140001190
jmp 0x1400034d7
lea rcx, str.Service_start_pending..._n
call fcn.140001190
lea rax, [rbp - 0x48]
mov r9d, 0x24
lea r8, [rbp - 0x40]
mov qword [rsp + 0x20], rax
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x1400034f0
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.QueryServiceStatusEx_failed___d__n
mov edx, eax
call fcn.140001190
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x1400035fe
call qword [sym.imp.KERNEL32.dll_GetTickCount]
cmp dword [rbp - 0x3c], 2
mov esi, eax
mov edi, dword [rbp - 0x2c]
jne 0x14000358b
mov eax, 0xcccccccd
mul dword [rbp - 0x28]
shr edx, 3
cmp edx, 0x3e8
jae 0x14000351f
mov edx, 0x3e8
jmp 0x140003526
cmp edx, r15d
cmova edx, r15d
mov ecx, edx
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rax, [rbp - 0x48]
mov r9d, 0x24
lea r8, [rbp - 0x40]
mov qword [rsp + 0x20], rax
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x140003577
cmp dword [rbp - 0x2c], edi
jbe 0x140003562
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, dword [rbp - 0x2c]
mov esi, eax
jmp 0x14000356f
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, esi
cmp eax, dword [rbp - 0x28]
ja 0x14000358b
cmp dword [rbp - 0x3c], 2
je 0x140003505
jmp 0x14000358b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.QueryServiceStatusEx_failed___d__n
call fcn.140001190
cmp dword [rbp - 0x3c], 4
jne 0x14000359f
lea rcx, str.Service_started_successfully._n
call fcn.140001190
jmp 0x1400035e7
lea rcx, str.Service_not_started.__n
call fcn.140001190
mov edx, dword [rbp - 0x3c]
lea rcx, str.__Current_State:__d_n
call fcn.140001190
mov edx, dword [rbp - 0x34]
lea rcx, str.__Exit_Code:__d_n
call fcn.140001190
mov edx, dword [rbp - 0x2c]
lea rcx, str.__Check_Point:__d_n
call fcn.140001190
mov edx, dword [rbp - 0x28]
lea rcx, str.__Wait_Hint:__d_n
call fcn.140001190
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, 1
mov rdi, qword [rsp + 0xa0]
mov rsi, qword [rsp + 0x98]
mov r15, qword [rsp + 0x70]
mov rbx, qword [rsp + 0x90]
mov rcx, qword [rbp - 0x18]
xor rcx, rsp
call fcn.14000bd90
add rsp, 0x78
pop r14
pop rbp
ret