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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rdi
push rbp
lea rbp, [rsp - 0x210]
sub rsp, 0x310
mov rax, qword [0x140079010]
xor rax, rsp
mov qword [rbp + 0x200], rax
mov rbx, rdx
cmp ecx, 1
jle 0x14000169f
mov rdx, qword [rdx + 8]
movzx eax, word [rdx]
sub ax, 0x2d
mov ecx, 0xfffd
test cx, ax
jne 0x14000169f
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 0x14000145b
mov r8d, 0x104
lea rdx, [rbp - 0x10]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x140001378
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.GetModuleFileName_failed_w_err_0x_08lx_n
call fcn.140001790
jmp 0x140001756
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 3]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rbx, rax
test rax, rax
jne 0x1400013a7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenSCManager_failed_w_err_0x_08lx_n
call fcn.140001790
jmp 0x140001756
xor eax, eax
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x58], rax
lea rcx, [0x140064d48]
mov qword [rsp + 0x50], rcx
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], rax
lea rax, [rbp - 0x10]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], 0x10
mov r9d, 4
lea r8, str.Sound_Research_SECOMNService
lea rdx, str.SECOMNService
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rdi, rax
test rax, rax
jne 0x140001431
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.CreateService_failed_w_err_0x_08lx_n
call fcn.140001790
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x140001756
lea rdx, str.SECOMNService
lea rcx, str._s_is_installed._n
call fcn.140001790
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x140001756
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 0x1400015cf
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp - 0x30], xmm0
mov qword [rbp - 0x20], rax
mov dword [rbp - 0x18], eax
xor edx, edx
xor ecx, ecx
lea r8d, [rax + 1]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rdi, rax
test rax, rax
je 0x14000138e
mov r8d, 0x10024
lea rdx, str.SECOMNService
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
test rax, rax
jne 0x1400014e2
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenService_failed_w_err_0x_08lx_n
call fcn.140001790
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x140001756
lea r8, [rbp - 0x30]
mov edx, 1
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x140001582
lea rdx, str.SECOMNService
lea rcx, str.Stopping__s.
call fcn.140001790
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [rbp - 0x30]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x140001560
nop dword [rax + rax]
mov eax, dword [rbp - 0x2c]
cmp eax, 3
jne 0x140001563
lea rcx, [0x140064d64]
call fcn.140001790
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [rbp - 0x30]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x140001530
mov eax, dword [rbp - 0x2c]
lea rdx, str.SECOMNService
cmp eax, 1
lea rcx, str._n_s_is_stopped._n
je 0x14000157d
lea rcx, str._n_s_failed_to_stop._n
call fcn.140001790
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x1400015a5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.DeleteService_failed_w_err_0x_08lx_n
call fcn.140001790
jmp 0x1400015b8
lea rdx, str.SECOMNService
lea rcx, str._s_is_removed._n
call fcn.140001790
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x140001756
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 0x140001726
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
movups xmmword [rbp - 0x40], xmm0
lea rcx, [rsp + 0x70]
call fcn.14001f5b0
nop
mov byte [rbp - 0x38], 1
mov rax, qword [rsp + 0x70]
mov r8b, 4
lea rdx, str.Starting_Rpc_Server..
lea rcx, [rsp + 0x70]
call qword [rax + 0x38]
mov rax, qword [rsp + 0x70]
mov r8b, 4
lea rdx, str.SECOMNRpcEndpoint.2F0652D5_A8C1_4125_9DE2_115DFCD3504B
lea rcx, [rsp + 0x70]
call qword [rax + 0x38]
lea rcx, [rsp + 0x70]
call fcn.140008970
mov ebx, eax
test eax, eax
je 0x140001684
mov edx, eax
lea rcx, str.RpcServerConnect_returned:_0x_x_n
call fcn.14001f810
mov r8b, 4
lea rdx, str.Starting_Rpc_Server..
lea rcx, [rsp + 0x70]
mov r9, qword [rsp + 0x70]
call qword [r9 + 0x38]
mov ecx, ebx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
nop
lea rax, vtable.CSampleService.0
mov qword [rsp + 0x70], rax
lea rcx, [rsp + 0x70]
call fcn.14001fc10
jmp 0x140001756
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
movups xmmword [rbp - 0x40], xmm0
lea rcx, [rsp + 0x70]
call fcn.14001f5b0
lea rax, [rsp + 0x70]
mov qword [0x140090e50], rax
mov rax, qword [rbp - 0x78]
mov qword [rbp - 0x30], rax
lea rax, [0x14001fb00]
mov qword [rbp - 0x28], rax
xor eax, eax
mov qword [rbp - 0x20], rax
mov qword [rbp - 0x18], rax
lea rcx, [rbp - 0x30]
call qword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherW]
test eax, eax
jne 0x140001710
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Service_failed_to_run_w_err_0x_08lx_n
call fcn.140001790
lea rax, vtable.CSampleService.0
mov qword [rsp + 0x70], rax
lea rcx, [rsp + 0x70]
call fcn.14001fc10
lea rcx, str.Parameters:_n
call fcn.140001790
lea rcx, str.__install__to_install_the_service._n
call fcn.140001790
lea rcx, str.__remove___to_remove_the_service._n
call fcn.140001790
lea rcx, str.__console__to_run_in_console_mode._n
call fcn.140001790
xor eax, eax
mov rcx, qword [rbp + 0x200]
xor rcx, rsp
call fcn.14002aab0
lea r11, [rsp + 0x310]
mov rbx, qword [r11 + 0x10]
mov rdi, qword [r11 + 0x20]
mov rsp, r11
pop rbp
ret