Function at 0x140001220
Capabilities:
Create service
Delete service
Query service status
Stop service

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rdi
push rbp
lea rbp, [rsp - 0x210]
sub rsp, 0x310
mov rax, qword [0x1400b1010]
xor rax, rsp
mov qword [rbp + 0x200], rax
mov rbx, rdx
cmp ecx, 1
jle 0x1400015b3
mov rdx, qword [rdx + 8]
movzx eax, word [rdx]
sub ax, 0x2d
mov ecx, 0xfffd
test cx, ax
jne 0x1400015b3
add rdx, 2
lea rcx, str.install
call fcn.140059b34
test eax, eax
jne 0x14000139a
mov r8d, 0x104
lea rdx, [rbp - 0x10]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x1400012b7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.GetModuleFileName_failed_w_err_0x_08lx_n
call fcn.1400016d0
jmp 0x14000166a
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 3]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rbx, rax
test rax, rax
jne 0x1400012e6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenSCManager_failed_w_err_0x_08lx_n
call fcn.1400016d0
jmp 0x14000166a
xor eax, eax
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x58], rax
lea rcx, [0x14009af58]
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 0x140001370
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.CreateService_failed_w_err_0x_08lx_n
call fcn.1400016d0
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x14000166a
lea rdx, str.SECOMNService
lea rcx, str._s_is_installed._n
call fcn.1400016d0
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x14000166a
mov rdx, qword [rbx + 8]
add rdx, 2
lea rcx, str.remove
call fcn.140059b34
test eax, eax
jne 0x14000150f
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 0x1400012cd
mov r8d, 0x10024
lea rdx, str.SECOMNService
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
test rax, rax
jne 0x140001420
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenService_failed_w_err_0x_08lx_n
call fcn.1400016d0
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x14000166a
lea r8, [rbp - 0x30]
mov edx, 1
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x1400014c2
lea rdx, str.SECOMNService
lea rcx, str.Stopping__s.
call fcn.1400016d0
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 0x1400014a0
nop dword [rax]
mov eax, dword [rbp - 0x2c]
cmp eax, 3
jne 0x1400014a3
lea rcx, [0x14009af5c]
call fcn.1400016d0
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 0x140001470
mov eax, dword [rbp - 0x2c]
lea rdx, str.SECOMNService
cmp eax, 1
lea rcx, str._n_s_is_stopped._n
je 0x1400014bd
lea rcx, str._n_s_failed_to_stop._n
call fcn.1400016d0
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x1400014e5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.DeleteService_failed_w_err_0x_08lx_n
call fcn.1400016d0
jmp 0x1400014f8
lea rdx, str.SECOMNService
lea rcx, str._s_is_removed._n
call fcn.1400016d0
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x14000166a
mov rdx, qword [rbx + 8]
add rdx, 2
lea rcx, str.console
call fcn.140059b34
test eax, eax
jne 0x14000163a
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.14001ffc0
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.140008760
mov ebx, eax
test eax, eax
jne 0x140001690
lea rax, vtable.CSampleService.0
mov qword [rsp + 0x70], rax
lea rcx, [rsp + 0x70]
call fcn.140020610
jmp 0x14000166a
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.14001ffc0
lea rax, [rsp + 0x70]
mov qword [0x1400ca680], rax
mov rax, qword [rbp - 0x78]
mov qword [rbp - 0x30], rax
lea rax, [0x140020500]
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 0x140001624
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Service_failed_to_run_w_err_0x_08lx_n
call fcn.1400016d0
lea rax, vtable.CSampleService.0
mov qword [rsp + 0x70], rax
lea rcx, [rsp + 0x70]
call fcn.140020610
lea rcx, str.Parameters:_n
call fcn.1400016d0
lea rcx, str.__install__to_install_the_service._n
call fcn.1400016d0
lea rcx, str.__remove___to_remove_the_service._n
call fcn.1400016d0
lea rcx, str.__console__to_run_in_console_mode._n
call fcn.1400016d0
xor eax, eax
mov rcx, qword [rbp + 0x200]
xor rcx, rsp
call fcn.14002bca0
lea r11, [rsp + 0x310]
mov rbx, qword [r11 + 0x10]
mov rdi, qword [r11 + 0x20]
mov rsp, r11
pop rbp
ret
mov edx, ebx
lea rcx, str.RpcServerConnect_returned:_0x_x_n
call fcn.140020220
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 fcn.14006206c
int3