Function at 0x1400011e0
Capabilities:
Create service
Delete service
Query service status
Stop service
Terminate process

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
lea rbp, [rsp - 0x200]
sub rsp, 0x300
mov rax, qword [0x14001e010]
xor rax, rsp
mov qword [rbp + 0x1f0], rax
mov rbx, rdx
cmp ecx, 1
jle 0x1400015e3
mov rdx, qword [rdx + 8]
movzx eax, word [rdx]
sub ax, 0x2d
mov ecx, 0xfffd
test cx, ax
jne 0x1400015e3
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 0x14000135d
mov r8d, 0x104
lea rdx, [rbp - 0x20]
xor ecx, ecx
call qword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_GetModuleFileNameW]
test eax, eax
jne 0x14000127d
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov edx, eax
lea rcx, str.GetModuleFileName_failed_w_err_0x_08lx_n
call fcn.140001740
jmp 0x140001700
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 3]
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_OpenSCManagerW]
mov rsi, rax
test rax, rax
jne 0x1400012ac
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenSCManager_failed_w_err_0x_08lx_n
call fcn.140001740
jmp 0x140001700
xor ebx, ebx
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x58], rbx
lea rax, [0x140017208]
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x40], rbx
lea rax, [rbp - 0x20]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], 0x10
lea r9d, [rbx + 4]
lea r8, str.Sound_Research_SECOMNService
lea rdi, str.SECOMNService
mov rdx, rdi
mov rcx, rsi
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CreateServiceW]
mov rbx, rax
test rax, rax
jne 0x140001337
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov edx, eax
lea rcx, str.CreateService_failed_w_err_0x_08lx_n
call fcn.140001740
mov rcx, rsi
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CloseServiceHandle]
jmp 0x140001700
lea rcx, str._s_is_installed._n
mov rdx, rdi
call fcn.140001740
mov rcx, rsi
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CloseServiceHandle]
mov rcx, rbx
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CloseServiceHandle]
jmp 0x140001700
mov rdx, qword [rbx + 8]
add rdx, 2
lea rcx, str.remove
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x1400014a8
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp - 0x40], xmm0
mov qword [rbp - 0x30], rax
mov dword [rbp - 0x28], eax
xor edx, edx
xor ecx, ecx
lea r8d, [rax + 1]
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_OpenSCManagerW]
mov rsi, rax
test rax, rax
je 0x140001293
mov r8d, 0x10024
lea rdi, str.SECOMNService
mov rdx, rdi
mov rcx, rax
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_OpenServiceW]
mov rbx, rax
test rax, rax
jne 0x1400013e7
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenService_failed_w_err_0x_08lx_n
call fcn.140001740
mov rcx, rsi
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CloseServiceHandle]
jmp 0x140001700
lea r8, [rbp - 0x40]
mov edx, 1
mov rcx, rbx
call qword [sym.imp.api_ms_win_service_winsvc_l1_1_0.dll_ControlService]
test eax, eax
je 0x140001476
mov rdx, rdi
lea rcx, str.Stopping__s.
call fcn.140001740
mov ecx, 0x3e8
call qword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_Sleep]
lea rdx, [rbp - 0x40]
mov rcx, rbx
call qword [sym.imp.api_ms_win_service_winsvc_l1_1_0.dll_QueryServiceStatus]
test eax, eax
je 0x140001458
mov eax, dword [rbp - 0x3c]
cmp eax, 3
jne 0x14000145b
lea rcx, [0x140018b74]
call fcn.140001740
mov ecx, 0x3e8
call qword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_Sleep]
lea rdx, [rbp - 0x40]
mov rcx, rbx
call qword [sym.imp.api_ms_win_service_winsvc_l1_1_0.dll_QueryServiceStatus]
test eax, eax
jne 0x140001428
mov eax, dword [rbp - 0x3c]
mov rdx, rdi
cmp eax, 1
lea rcx, [0x140018b78]
je 0x140001471
lea rcx, str._n_s_failed_to_stop._n
call fcn.140001740
mov rcx, rbx
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_DeleteService]
test eax, eax
jne 0x14000149c
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov edx, eax
lea rcx, str.DeleteService_failed_w_err_0x_08lx_n
call fcn.140001740
jmp 0x140001346
lea rcx, str._s_is_removed._n
jmp 0x14000133e
mov rdx, qword [rbx + 8]
add rdx, 2
lea rcx, str.console
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x1400016d0
xorps xmm0, xmm0
movups xmmword [rsp + 0x70], xmm0
movups xmmword [rbp - 0x80], xmm0
movups xmmword [rbp - 0x70], xmm0
movups xmmword [rbp - 0x60], xmm0
movups xmmword [rbp - 0x50], xmm0
lea rsi, vtable.CServiceBase.0
mov qword [rsp + 0x70], rsi
lea rdi, str.SECOMNService
mov qword [rsp + 0x78], rdi
xor ebx, ebx
mov qword [rbp - 0x60], rbx
mov dword [rbp - 0x80], 0x10
mov dword [rbp - 0x7c], 2
mov qword [rbp - 0x78], 5
mov qword [rbp - 0x70], rbx
mov dword [rbp - 0x68], ebx
lea r9, [rbp - 0x58]
xor r8d, r8d
xor edx, edx
lea rcx, [0x1400189f0]
call qword [sym.imp.api_ms_win_eventing_provider_l1_1_0.dll_EventRegister]
test eax, eax
je 0x140001540
mov edx, eax
lea rcx, str.Provider_not_registered._EventRegister_failed_with__d_n
call fcn.140001740
lea rax, vtable.CSampleService.0
mov qword [rsp + 0x70], rax
mov qword [rbp - 0x50], rbx
lea rax, [rsp + 0x70]
mov qword [0x14002f2f0], rax
mov byte [rbp - 0x48], 1
mov r8b, 4
lea rdx, str.Starting_Rpc_Server..
lea rcx, [rsp + 0x70]
call qword [0x140018700]
mov r8b, 4
lea rdx, str.SECOMNRpcEndpoint.2F0652D5_A8C1_4125_9DE2_115DFCD3504B
lea rcx, [rsp + 0x70]
mov rax, qword [rsp + 0x70]
call qword [rax + 0x30]
call fcn.140002ff0
mov ebx, eax
test eax, eax
je 0x1400015c6
mov edx, eax
lea rcx, str.RpcServerConnect_returned:_0x_x_n
call fcn.140007180
mov r8b, 4
lea rdx, str.Starting_Rpc_Server..
lea rcx, [rsp + 0x70]
mov r9, qword [rsp + 0x70]
call qword [r9 + 0x30]
mov ecx, ebx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
nop
mov qword [rsp + 0x70], rsi
mov rcx, qword [rbp - 0x58]
test rcx, rcx
je 0x140001700
call qword [sym.imp.api_ms_win_eventing_provider_l1_1_0.dll_EventUnregister]
jmp 0x140001700
xor ebx, ebx
mov qword [rbp - 0x68], rbx
mov qword [rbp - 0x58], rbx
xorps xmm0, xmm0
movdqa xmmword [rbp - 0x50], xmm0
lea rsi, vtable.CServiceBase.0
mov qword [rsp + 0x70], rsi
lea rdi, str.SECOMNService
mov qword [rsp + 0x78], rdi
mov qword [rbp - 0x60], rbx
mov dword [rbp - 0x80], 0x10
mov dword [rbp - 0x7c], 2
mov qword [rbp - 0x78], 5
mov qword [rbp - 0x70], rbx
lea r9, [rbp - 0x58]
xor r8d, r8d
xor edx, edx
lea rcx, [0x1400189f0]
call qword [sym.imp.api_ms_win_eventing_provider_l1_1_0.dll_EventRegister]
test eax, eax
je 0x140001653
mov edx, eax
lea rcx, str.Provider_not_registered._EventRegister_failed_with__d_n
call fcn.140001740
lea rax, vtable.CSampleService.0
mov qword [rsp + 0x70], rax
mov qword [rbp - 0x50], rbx
mov byte [rbp - 0x48], bl
lea rax, [rsp + 0x70]
mov qword [0x14002f2f0], rax
lea rax, [rsp + 0x70]
mov qword [0x14002f2f8], rax
mov rax, qword [rsp + 0x78]
mov qword [rbp - 0x40], rax
lea rax, [0x1400072a0]
mov qword [rbp - 0x38], rax
mov qword [rbp - 0x30], rbx
mov qword [rbp - 0x28], rbx
lea rcx, [rbp - 0x40]
call qword [sym.imp.api_ms_win_service_core_l1_1_0.dll_StartServiceCtrlDispatcherW]
test eax, eax
jne 0x1400016bc
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov edx, eax
lea rcx, str.Service_failed_to_run_w_err_0x_08lx_n
call fcn.140001740
mov qword [rsp + 0x70], rsi
mov rcx, qword [rbp - 0x58]
test rcx, rcx
je 0x1400016d0
call qword [sym.imp.api_ms_win_eventing_provider_l1_1_0.dll_EventUnregister]
lea rcx, str.Parameters:_n
call fcn.140001740
lea rcx, str.__install__to_install_the_service._n
call fcn.140001740
lea rcx, str.__remove___to_remove_the_service._n
call fcn.140001740
lea rcx, str.__console__to_run_in_console_mode._n
call fcn.140001740
xor eax, eax
mov rcx, qword [rbp + 0x1f0]
xor rcx, rsp
call fcn.1400082e0
lea r11, [rsp + 0x300]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret