Function at 0x1400148d0
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 [0x14007d038]
xor rax, rsp
mov qword [rbp + 0x210], rax
mov rbx, rdx
cmp ecx, 1
jle 0x140014c08
mov rdx, qword [rdx + 8]
movzx eax, word [rdx]
sub ax, 0x2d
mov ecx, 0xfffd
test cx, ax
jne 0x140014c08
add rdx, 2
lea rcx, str.install
call fcn.14003c6b0
test eax, eax
jne 0x140014a1c
mov r8d, 0x104
lea rdx, [rbp]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x140014974
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.GetModuleFileName_failed_w_err_0x_08lx_n
call fcn.140014da0
jmp 0x140014d54
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 3]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rsi, rax
test rax, rax
je 0x140014a5f
xor ebx, ebx
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x58], rbx
lea rax, [0x140068320]
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, [0x14006b048]
lea rdi, str.FMAPOService
mov rdx, rdi
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rbx, rax
test rax, rax
jne 0x140014a10
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.CreateService_failed_w_err_0x_08lx_n
call fcn.140014da0
jmp 0x140014b73
lea rcx, str._s_is_installed._n
jmp 0x140014b6b
mov rdx, qword [rbx + 8]
add rdx, 2
lea rcx, str.remove
call fcn.14003c6b0
test eax, eax
jne 0x140014b93
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 0x140014a78
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenSCManager_failed_w_err_0x_08lx_n
call fcn.140014da0
jmp 0x140014d54
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 0x140014ab2
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenService_failed_w_err_0x_08lx_n
call fcn.140014da0
jmp 0x140014b73
lea r8, [rbp - 0x20]
mov edx, 1
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x140014b41
mov rdx, rdi
lea rcx, str.Stopping__s.
call fcn.140014da0
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 0x140014b23
mov eax, dword [rbp - 0x1c]
cmp eax, 3
jne 0x140014b26
lea rcx, [0x140071214]
call fcn.140014da0
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 0x140014af3
mov eax, dword [rbp - 0x1c]
mov rdx, rdi
cmp eax, 1
lea rcx, [0x140071218]
je 0x140014b3c
lea rcx, str._n_s_failed_to_stop._n
call fcn.140014da0
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x140014b64
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.DeleteService_failed_w_err_0x_08lx_n
call fcn.140014da0
jmp 0x140014b73
lea rcx, str._s_is_removed._n
mov rdx, rdi
call fcn.140014da0
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test rbx, rbx
je 0x140014d54
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x140014d54
mov rdx, qword [rbx + 8]
add rdx, 2
lea rcx, str.console
call fcn.14003c6b0
test eax, eax
jne 0x140014d54
xor edx, edx
lea r8d, [rax + 0x60]
lea rcx, [rbp - 0x80]
call fcn.140028230
lea rcx, [rbp - 0x80]
call fcn.140023cb0
nop
lea rcx, [rbp - 0x80]
mov rax, qword [rbp - 0x80]
call qword [rax + 0x30]
mov ebx, eax
test eax, eax
jne 0x140014d7e
lea rdi, vtable.CSampleService.0
mov qword [rbp - 0x80], rdi
mov rcx, qword [0x140080438]
test rcx, rcx
je 0x140014bfa
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
lea rsi, vtable.CServiceBase.0
jmp 0x140014d2b
lea rcx, str.Parameters:_n
call fcn.140014da0
lea rcx, str.__install__to_install_the_service._n
call fcn.140014da0
lea rcx, str.__remove___to_remove_the_service._n
call fcn.140014da0
lea rcx, str.__console__to_run_in_console_mode._n
call fcn.140014da0
xor edx, edx
lea r8d, [rdx + 0x60]
lea rcx, [rbp - 0x80]
call fcn.140028230
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 [0x140080438], rax
lea rax, [rbp - 0x80]
mov qword [0x140080640], rax
mov rax, qword [rbp - 0x68]
mov qword [rbp - 0x20], rax
lea rax, [0x140024270]
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 0x140014d15
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Service_failed_to_run_w_err_0x_08lx_n
call fcn.140014da0
mov qword [rbp - 0x80], rdi
mov rcx, qword [0x140080438]
test rcx, rcx
je 0x140014d2b
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x38]
test rcx, rcx
mov qword [rbp - 0x80], rsi
mov qword [0x140080438], rbx
je 0x140014d45
call qword [sym.imp.USER32.dll_UnregisterPowerSettingNotification]
mov rcx, qword [rbp - 0x70]
test rcx, rcx
je 0x140014d54
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov rcx, qword [rbp + 0x210]
xor rcx, rsp
call fcn.140024cf0
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.1400231f0
mov ecx, ebx
call fcn.14003d164
int3