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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r14
sub rsp, 0x70
mov rax, qword [0x14005d020]
xor rax, rsp
mov qword [rsp + 0x68], rax
mov rbp, rcx
xor ebx, ebx
call qword [sym.imp.KERNEL32.dll_GetTickCount]
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
mov esi, eax
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rdi, rax
test rax, rax
jne 0x14000519b
lea rsi, str.CDriverInstaller::DeleteService__:_OpenSCManager_failed:_ErrorCode:___d__
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, rsi
jmp 0x1400052fd
cmp qword [0x14005dcb8], 8
lea rdx, [0x14005dca0]
mov r8d, 0x10024
mov rcx, rdi
cmovae rdx, qword [0x14005dca0]
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
test rax, rax
jne 0x1400051de
lea rsi, str.CDriverInstaller::DeleteService__:_OpenService_failed:_ErrorCode:___d__
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, rsi
jmp 0x1400052fd
lea rax, [rsp + 0x38]
mov r9d, 0x24
lea r8, [rsp + 0x40]
mov qword [rsp + 0x20], rax
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x140005217
lea rsi, str.DriverInstaller::DeleteService__:_QueryServiceStatusEx_failed___d__n
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, rsi
jmp 0x1400052fd
mov eax, dword [rsp + 0x44]
cmp eax, 1
je 0x1400052ce
cmp eax, 3
je 0x140005259
lea r8, [rsp + 0x40]
mov edx, 1
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x140005255
lea rsi, str.CDriverInstaller::DeleteService__:_ControlService_failed___d__n
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, rsi
jmp 0x1400052fd
mov eax, dword [rsp + 0x44]
cmp eax, 1
je 0x1400052ce
mov r14d, 0x3e8
mov eax, dword [rsp + 0x58]
cmp rax, 0x2710
jbe 0x140005277
mov eax, 0x2710
jmp 0x14000527e
cmp rax, r14
cmovb rax, r14
lea rcx, [rsp + 0x30]
mov qword [rsp + 0x30], rax
call fcn.1400060e0
lea rax, [rsp + 0x38]
mov r9d, 0x24
lea r8, [rsp + 0x40]
mov qword [rsp + 0x20], rax
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x14000532d
cmp dword [rsp + 0x44], 1
je 0x1400052ce
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, esi
cmp eax, 0x4e20
ja 0x140005313
cmp dword [rsp + 0x44], 1
jne 0x140005264
lea r8, str.CDriverInstaller::DeleteService__:_MonitorFunction_stopped_successfully_n
mov edx, 0xc8
lea rcx, [rbp + 0x18]
call fcn.1400083a0
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x14000533f
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, str.CDriverInstaller::DeleteService__:_DeleteService_failed:_ErrorCode:___d__
mov r9d, eax
lea rcx, [rbp + 0x18]
mov edx, 0xc8
call fcn.1400083a0
xor sil, sil
jmp 0x140005357
lea rcx, [rbp + 0x18]
mov edx, 0xc8
lea r8, str.CDriverInstaller::DeleteService__:_Wait_timed_out_n
call fcn.1400083a0
xor sil, sil
jmp 0x140005357
lea rsi, str.CDriverInstaller::DeleteService__:_QueryServiceStatusEx_failed___d__n
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, rsi
jmp 0x1400052fd
lea r8, str.CDriverInstaller::DeleteService__:_DeleteService_success_
mov edx, 0xc8
lea rcx, [rbp + 0x18]
call fcn.1400083a0
mov sil, 1
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
movzx eax, sil
mov rcx, qword [rsp + 0x68]
xor rcx, rsp
call fcn.14001f810
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret