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

Disassembly:
mov rax, rsp
push rbp
lea rbp, [rax - 0x228]
sub rsp, 0x320
mov qword [rsp + 0x70], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x14006c038]
xor rax, rsp
mov qword [rbp + 0x210], rax
mov rbx, rdx
cmp ecx, 1
jle 0x14000b758
mov rdx, qword [rdx + 8]
movzx eax, word [rdx]
sub ax, 0x2d
mov ecx, 0xfffd
test cx, ax
jne 0x14000b758
add rdx, 2
lea rcx, str.install
call fcn.140031200
test eax, eax
jne 0x14000b56c
mov r8d, 0x104
lea rdx, [rbp]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x14000b4c4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.GetModuleFileName_failed_w_err_0x_08lx_n
call fcn.14000b8f0
jmp 0x14000b8a4
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 3]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rsi, rax
test rax, rax
je 0x14000b5af
xor ebx, ebx
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x58], rbx
lea rax, [0x14005b2b0]
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x40], rbx
lea rax, [rbp]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], 0x10
lea r9d, [rbx + 4]
lea r8, [0x14005d8e8]
lea rdi, str.FMAPOService
mov rdx, rdi
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rbx, rax
test rax, rax
jne 0x14000b560
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.CreateService_failed_w_err_0x_08lx_n
call fcn.14000b8f0
jmp 0x14000b6c3
lea rcx, str._s_is_installed._n
jmp 0x14000b6bb
mov rdx, qword [rbx + 8]
add rdx, 2
lea rcx, str.remove
call fcn.140031200
test eax, eax
jne 0x14000b6e3
xor eax, eax
mov qword [rbp - 0x20], rax
mov qword [rbp - 0x18], rax
mov qword [rbp - 0x10], rax
mov dword [rbp - 8], eax
xor edx, edx
xor ecx, ecx
lea r8d, [rax + 1]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rsi, rax
test rax, rax
jne 0x14000b5c8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenSCManager_failed_w_err_0x_08lx_n
call fcn.14000b8f0
jmp 0x14000b8a4
mov r8d, 0x10024
lea rdi, str.FMAPOService
mov rdx, rdi
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
test rax, rax
jne 0x14000b602
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenService_failed_w_err_0x_08lx_n
call fcn.14000b8f0
jmp 0x14000b6c3
lea r8, [rbp - 0x20]
mov edx, 1
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x14000b691
mov rdx, rdi
lea rcx, str.Stopping__s.
call fcn.14000b8f0
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [rbp - 0x20]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x14000b673
mov eax, dword [rbp - 0x1c]
cmp eax, 3
jne 0x14000b676
lea rcx, [0x140063494]
call fcn.14000b8f0
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [rbp - 0x20]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x14000b643
mov eax, dword [rbp - 0x1c]
mov rdx, rdi
cmp eax, 1
lea rcx, [0x140063498]
je 0x14000b68c
lea rcx, str._n_s_failed_to_stop._n
call fcn.14000b8f0
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x14000b6b4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.DeleteService_failed_w_err_0x_08lx_n
call fcn.14000b8f0
jmp 0x14000b6c3
lea rcx, str._s_is_removed._n
mov rdx, rdi
call fcn.14000b8f0
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test rbx, rbx
je 0x14000b8a4
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x14000b8a4
mov rdx, qword [rbx + 8]
add rdx, 2
lea rcx, str.console
call fcn.140031200
test eax, eax
jne 0x14000b8a4
xor edx, edx
lea r8d, [rax + 0x60]
lea rcx, [rbp - 0x80]
call fcn.14001cd80
lea rcx, [rbp - 0x80]
call fcn.1400180b0
nop
lea rcx, [rbp - 0x80]
mov rax, qword [rbp - 0x80]
call qword [rax + 0x30]
mov ebx, eax
test eax, eax
jne 0x14000b8ce
lea rdi, vtable.CSampleService.0
mov qword [rbp - 0x80], rdi
mov rcx, qword [0x14006f538]
test rcx, rcx
je 0x14000b74a
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
lea rsi, vtable.CServiceBase.0
jmp 0x14000b87b
lea rcx, str.Parameters:_n
call fcn.14000b8f0
lea rcx, str.__install__to_install_the_service._n
call fcn.14000b8f0
lea rcx, str.__remove___to_remove_the_service._n
call fcn.14000b8f0
lea rcx, str.__console__to_run_in_console_mode._n
call fcn.14000b8f0
xor edx, edx
lea r8d, [rdx + 0x60]
lea rcx, [rbp - 0x80]
call fcn.14001cd80
lea rsi, vtable.CServiceBase.0
mov qword [rbp - 0x80], rsi
mov dword [rbp - 0x78], 0xffffffff
xor ebx, ebx
mov qword [rbp - 0x70], rbx
mov qword [rbp - 0x38], rbx
lea rdi, str.FMAPOService
mov qword [rbp - 0x68], rdi
mov qword [rbp - 0x40], rbx
mov dword [rbp - 0x60], 0x10
mov dword [rbp - 0x5c], 2
mov qword [rbp - 0x58], 5
mov qword [rbp - 0x50], rbx
mov dword [rbp - 0x48], ebx
lea r9, str.CServiceBase_lid_change_event
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rbp - 0x70], rax
lea rdi, vtable.CSampleService.0
mov qword [rbp - 0x80], rdi
mov qword [rbp - 0x30], rbx
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [0x14006f538], rax
lea rax, [rbp - 0x80]
mov qword [0x14006f540], rax
mov rax, qword [rbp - 0x68]
mov qword [rbp - 0x20], rax
lea rax, [0x140018670]
mov qword [rbp - 0x18], rax
mov qword [rbp - 0x10], rbx
mov qword [rbp - 8], rbx
lea rcx, [rbp - 0x20]
call qword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherW]
test eax, eax
jne 0x14000b865
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Service_failed_to_run_w_err_0x_08lx_n
call fcn.14000b8f0
mov qword [rbp - 0x80], rdi
mov rcx, qword [0x14006f538]
test rcx, rcx
je 0x14000b87b
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x38]
test rcx, rcx
mov qword [rbp - 0x80], rsi
mov qword [0x14006f538], rbx
je 0x14000b895
call qword [sym.imp.USER32.dll_UnregisterPowerSettingNotification]
mov rcx, qword [rbp - 0x70]
test rcx, rcx
je 0x14000b8a4
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov rcx, qword [rbp + 0x210]
xor rcx, rsp
call fcn.140019840
lea r11, [rsp + 0x320]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret
mov edx, ebx
lea rcx, str.RpcServerConnect_returned:_0x_x_n
call fcn.1400175e0
mov ecx, ebx
call fcn.140031cb4
int3