Function at 0x1400071e0
Capabilities:
Create service
Delete service
Persist via windows service
Query service status
Stop service

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r14
lea rbp, [rsp - 0x3e0]
sub rsp, 0x4e0
mov rax, qword [0x1400af008]
xor rax, rsp
mov qword [rbp + 0x3d0], rax
mov rdi, r8
mov rbx, rcx
cmp edx, 1
jle 0x1400075a9
mov rdx, qword [r8 + 8]
mov ecx, 0xfffd
movzx eax, word [rdx]
sub ax, 0x2d
test cx, ax
jne 0x1400075a9
add rdx, 2
lea rcx, str.install
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x1400073a2
mov rsi, qword [rbx + 0x18]
lea rcx, [rbp - 0x50]
mov r14, qword [rbx + 0x10]
xor edx, edx
mov rdi, qword [rbx + 8]
mov r8d, 0x208
call sub.VCRUNTIME140.dll_memset
mov r8d, 0x104
lea rdx, [rbp + 0x1c0]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x14000729e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.GetModuleFileName_failed_w_err_0x_08lx_n
call fcn.140006e90
jmp 0x14000762e
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 3]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rbx, rax
test rax, rax
je 0x1400073ea
lea r8, [0x140068678]
mov edx, 0x104
lea rcx, [rbp - 0x50]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
lea r8, [rbp + 0x1c0]
mov edx, 0x104
lea rcx, [rbp - 0x50]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
lea r8, [0x140068678]
mov edx, 0x104
lea rcx, [rbp - 0x50]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
xor eax, eax
lea rcx, [0x140066d90]
mov qword [rsp + 0x60], rax
mov r9d, 4
mov qword [rsp + 0x58], rsi
mov r8, r14
mov qword [rsp + 0x50], rcx
mov rdx, rdi
mov qword [rsp + 0x48], rax
mov rcx, rbx
mov qword [rsp + 0x40], rax
lea rax, [rbp - 0x50]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], 0x10
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rsi, rax
test rax, rax
jne 0x14000737c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.CreateService_failed_w_err_0x_08lx_n
call fcn.140006e90
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x14000762e
mov rdx, rdi
lea rcx, str._s_is_installed._n
call fcn.140006e90
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x14000762e
mov rdx, qword [rdi + 8]
lea rcx, str.remove
add rdx, 2
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x14000751c
mov rdi, qword [rbx + 8]
xor eax, eax
xorps xmm0, xmm0
mov qword [rbp - 0x80], rax
xor edx, edx
mov dword [rbp - 0x78], eax
xor ecx, ecx
lea r8d, [rax + 1]
movups xmmword [rsp + 0x70], xmm0
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rsi, rax
test rax, rax
jne 0x140007403
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenSCManager_failed_w_err_0x_08lx_n
call fcn.140006e90
jmp 0x14000762e
mov r8d, 0x10024
mov rdx, rdi
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
test rax, rax
jne 0x14000743f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenService_failed_w_err_0x_08lx_n
call fcn.140006e90
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x14000762e
lea r8, [rsp + 0x70]
mov edx, 1
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x1400074d3
mov rdx, rdi
lea rcx, str.Stopping__s.
call fcn.140006e90
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [rsp + 0x70]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x1400074b4
mov eax, dword [rsp + 0x74]
cmp eax, 3
jne 0x1400074b8
lea rcx, [0x140068754]
call fcn.140006e90
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [rsp + 0x70]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x140007482
mov eax, dword [rsp + 0x74]
lea rcx, [0x140068758]
mov rdx, rdi
cmp eax, 1
je 0x1400074ce
lea rcx, str._n_s_failed_to_stop._n
call fcn.140006e90
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x1400074f6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.DeleteService_failed_w_err_0x_08lx_n
call fcn.140006e90
jmp 0x140007505
mov rdx, rdi
lea rcx, str._s_is_removed._n
call fcn.140006e90
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x14000762e
mov rdx, qword [rdi + 8]
lea rcx, str.console
add rdx, 2
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x14000762e
mov rdx, qword [rbx]
lea rsi, [rdx + 0x70]
cmp qword [rsi + 0x18], 8
jb 0x14000754a
mov rsi, qword [rsi]
mov rbx, qword [rdx + 0x68]
lea rcx, [rsp + 0x70]
mov rdi, qword [rdx + 0x60]
add rdx, 0x50
call fcn.140005b50
mov r9, rsi
mov r8, rbx
mov rdx, rdi
mov rcx, rax
call fcn.140041240
xor eax, eax
lea rcx, [rsp + 0x70]
mov qword [rbp - 0x58], rax
call fcn.1400414c0
mov ebx, eax
test eax, eax
je 0x14000762e
call qword [sym.imp.Logging.dll_public:_static_class_Hp::Bridge::Logging::TraceLogger____ptr64___cdecl_Hp::Bridge::Logging::LogManager::GetLogger_void_]
mov r8d, ebx
lea rdx, str.RpcServiceHost::Listen
mov rcx, rax
call qword [sym.imp.Logging.dll_public:_void___cdecl_Hp::Bridge::Logging::TraceLogger::LogLastError_wchar_t_const____ptr64__unsigned_long_int____ptr64]
jmp 0x14000762e
lea rcx, str.Parameters:_n
call fcn.140006e90
lea rcx, str.__install__to_install_the_service._n
call fcn.140006e90
lea rcx, str.__remove___to_remove_the_service._n
call fcn.140006e90
lea rcx, str.__console__to_run_in_console_mode._n
call fcn.140006e90
mov rax, qword [rbx]
lea rcx, [rsp + 0x70]
mov qword [0x1400b3ff0], rax
mov rax, qword [rax + 0x10]
mov qword [rsp + 0x70], rax
lea rax, [0x1400076e0]
mov qword [rsp + 0x78], rax
xor eax, eax
mov qword [rbp - 0x80], rax
mov qword [rbp - 0x78], rax
call qword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherW]
test eax, eax
jne 0x14000762e
mov rbx, qword [rbx + 0x20]
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Service_failed_to_run_w_err_0x_08lx_n
mov rcx, rbx
mov r8d, eax
call qword [sym.imp.Logging.dll_public:_void___cdecl_Hp::Bridge::Logging::TraceLogger::LogError_wchar_t_const____ptr64____ptr64]
xor eax, eax
mov rcx, qword [rbp + 0x3d0]
xor rcx, rsp
call fcn.140059800
lea r11, [rsp + 0x4e0]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret