Function at 0x140008840
Capabilities:
Delete service
Query service status
Stop service

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xc0
mov qword [rbp - 0x31], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x14006b9c0]
xor rax, rsp
mov qword [rbp + 0x27], rax
mov r14, rcx
lea rax, str.RemoveService
mov qword [rbp - 0x29], rax
lea r12, str.__RemoveService_
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x20], 3
lea r9, [0x1400278f0]
mov r8d, 0x111
lea rdx, str.Thpsvr.cpp
lea rcx, [rbp - 0x21]
call fcn.1400013d0
mov r8, qword [rbp - 0x29]
lea rdx, str.ENTER__s
lea rcx, [rbp - 0x21]
call fcn.1400013f0
nop
xor r13d, r13d
mov dword [rbp + 7], r13d
xor eax, eax
mov qword [rbp + 0xb], rax
mov qword [rbp + 0x13], rax
mov qword [rbp + 0x1b], rax
lea ebx, [rax + 0xa]
xor edx, edx
xor ecx, ecx
lea r8d, [r13 + 1]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov r15, rax
test rax, rax
jne 0x14000893e
mov esi, 0x80004003
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x20], r13d
lea r9, [0x1400278f0]
mov r8d, 0x119
lea rdx, str.Thpsvr.cpp
lea rcx, [rbp - 0x59]
call fcn.1400013d0
mov rcx, rax
mov r8d, esi
lea rdx, str.Error_Code:_0x_x
call fcn.1400013f0
jmp 0x140008bd0
mov r8d, 0x10024
mov rdx, r14
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rdi, rax
test rax, rax
jne 0x14000899b
mov esi, 0x80004003
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x20], r13d
lea r9, [0x1400278f0]
mov r8d, 0x11c
lea rdx, str.Thpsvr.cpp
lea rcx, [rbp - 0x59]
call fcn.1400013d0
mov rcx, rax
mov r8d, esi
lea rdx, str.Error_Code:_0x_x
call fcn.1400013f0
jmp 0x140008bc6
mov esi, r13d
lea rdx, [rbp + 7]
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
cmp dword [rbp + 0xb], 1
je 0x140008b31
lea r8, [rbp + 7]
mov edx, 1
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x140008af0
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x20], 3
lea r9, [0x1400278f0]
mov r8d, 0x123
lea rdx, str.Thpsvr.cpp
lea rcx, [rbp - 0x59]
call fcn.1400013d0
mov rcx, rax
mov r8, r14
lea rdx, str.Stopping__s
call fcn.1400013f0
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [rbp + 7]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x140008a86
mov eax, dword [rbp + 0xb]
cmp eax, 3
jne 0x140008a89
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x20], eax
lea r9, [0x1400278f0]
mov r8d, 0x12a
lea rdx, str.Thpsvr.cpp
lea rcx, [rbp - 0x59]
call fcn.1400013d0
mov rcx, rax
lea rdx, [0x1400203b8]
call fcn.1400013f0
test ebx, ebx
jle 0x140008a86
dec ebx
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [rbp + 7]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x140008a27
mov eax, dword [rbp + 0xb]
mov qword [rsp + 0x28], r12
lea r9, [0x1400278f0]
lea rdx, str.Thpsvr.cpp
lea rcx, [rbp - 0x59]
cmp eax, 1
jne 0x140008acc
mov dword [rsp + 0x20], 3
mov r8d, 0x137
call fcn.1400013d0
mov rcx, rax
mov r8, r14
lea rdx, str._s_stopped
call fcn.1400013f0
jmp 0x140008b31
mov dword [rsp + 0x20], r13d
mov r8d, 0x139
call fcn.1400013d0
mov rcx, rax
mov r8, r14
lea rdx, str._s_failed_to_stop
call fcn.1400013f0
jmp 0x140008b31
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x20], r13d
lea r9, [0x1400278f0]
mov r8d, 0x13d
lea rdx, str.Thpsvr.cpp
lea rcx, [rbp - 0x59]
call fcn.1400013d0
mov rcx, rax
mov r8d, ebx
lea rdx, str.ControlService_error:__d
call fcn.1400013f0
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
je 0x140008b7c
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x20], 3
lea r9, [0x1400278f0]
mov r8d, 0x143
lea rdx, str.Thpsvr.cpp
lea rcx, [rbp - 0x59]
call fcn.1400013d0
mov rcx, rax
mov r8, r14
lea rdx, str._s_removed
call fcn.1400013f0
jmp 0x140008bbd
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x20], r13d
lea r9, [0x1400278f0]
mov r8d, 0x147
lea rdx, str.Thpsvr.cpp
lea rcx, [rbp - 0x59]
call fcn.1400013d0
mov rcx, rax
mov r8d, ebx
lea rdx, str.DeleteService_error:__d
call fcn.1400013f0
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
mov r8, qword [rbp - 0x29]
lea rdx, str.LEAVE__s
lea rcx, [rbp - 0x21]
call fcn.1400013f0
mov eax, esi
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.14000b090
lea r11, [rsp + 0xc0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret