Function at 0x140018120
Capabilities:
Create service
Delete service
Modify service

Disassembly:
mov rax, rsp
push rbp
push r14
push r15
lea rbp, [rax - 0x78]
sub rsp, 0x160
mov qword [rbp - 0x80], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x14006b088]
xor rax, rsp
mov qword [rbp + 0x50], rax
mov r15, rdx
mov byte [rsp + 0x38], 1
mov qword [rsp + 0x20], 0x3e
lea r9, str.COsService::IOs_InstallService
mov r8d, 0x1e
lea rdx, str.PIE_OS_Service
lea rcx, [rbp - 0x70]
call fcn.140011450
lea rax, vtable.CTracePieCommonOsService.0
mov qword [rbp - 0x70], rax
xor ebx, ebx
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x78], rbx
call fcn.140019380
mov r14, rax
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rsi, rax
test rax, rax
jne 0x140018200
lea r8, str.Cant_open_SC_Manager__
lea edx, [rbx + 4]
lea rcx, [rbp - 0x70]
call fcn.140011590
nop
lea rax, vtable.CTracePie.0
mov qword [rbp - 0x70], rax
cmp byte [rbp + 0x41], 1
jne 0x1400181f9
cmp byte [rbp + 0x40], sil
jne 0x1400181f9
lea r8, [0x140056e3c]
lea edx, [rbx + 5]
lea rcx, [rbp - 0x70]
call fcn.140011590
nop
xor eax, eax
jmp 0x140018445
mov r8d, 0x10000
lea rdx, str.PIEService
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rdi, rax
test rax, rax
jne 0x140018259
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [rbp - 0x70]
cmp eax, 0x424
jne 0x140018243
lea r8, str.Old_PIE_Service_doesnt_exist__no_need_to_delete_it
lea edx, [rdi + 4]
call fcn.140011590
jmp 0x1400182ce
mov r9d, eax
lea r8, str.Failed_to_open_PIE_Service___Error__d
mov edx, 2
call fcn.140011590
jmp 0x1400182ce
lea r8, str.PIE_old_Service_exists__lets_delete_it_before_installing_the_new_one
mov edx, 4
lea rcx, [rbp - 0x70]
call fcn.140011590
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x14001829b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
lea r8, str.DeleteService_failed___d_
mov edx, 2
lea rcx, [rbp - 0x70]
call fcn.140011590
jmp 0x1400182b0
lea r8, str.Service_deleted_successfully
mov edx, 4
lea rcx, [rbp - 0x70]
call fcn.140011590
lea r8, str.Closing_old_service_handle
mov edx, 4
lea rcx, [rbp - 0x70]
call fcn.140011590
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rax, str.This_service_is_part_of_the_Intel
mov qword [rbp - 0x78], rax
mov eax, dword [r14 + 0x208]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], 0x2e
lea r9, [0x14005b138]
lea r8, [rsp + 0x78]
lea rdx, [rsp + 0x70]
call fcn.140019480
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x40], rbx
mov rdi, qword [rsp + 0x70]
mov qword [rsp + 0x38], rdi
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], 0x10
mov r9d, 0xf01ff
lea r8, [0x14005b168]
mov rdx, r15
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov r14, rax
mov r9, rdi
lea r8, str.PIE_new_Service_full_path_is:__ws
mov edx, 4
lea rcx, [rbp - 0x70]
call fcn.140011590
test r14, r14
je 0x1400183cc
lea r8, str.PIE_Service_was_created
mov edx, 4
lea rcx, [rbp - 0x70]
call fcn.140011590
lea r8, [rbp - 0x78]
mov edx, 1
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
mov r9d, eax
lea r8, str.ChangeServiceConfig2_returned__d
mov edx, 4
lea rcx, [rbp - 0x70]
call fcn.140011590
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ebx, 1
jmp 0x1400183ff
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, 4
lea rcx, [rbp - 0x70]
cmp eax, 0x431
jne 0x1400183f0
lea r8, str.PIE_Service_already_installed
call fcn.140011590
jmp 0x1400183ff
mov r9d, eax
lea r8, str.PIE_Service_installation_failed._Error__d
call fcn.140011590
test rdi, rdi
je 0x14001840c
mov rcx, rdi
call fcn.14001ebf8
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
lea rax, vtable.CTracePie.0
mov qword [rbp - 0x70], rax
cmp byte [rbp + 0x41], 1
jne 0x140018443
cmp byte [rbp + 0x40], 0
jne 0x140018443
lea r8, [0x140056e3c]
mov edx, 5
lea rcx, [rbp - 0x70]
call fcn.140011590
nop
mov eax, ebx
mov rcx, qword [rbp + 0x50]
xor rcx, rsp
call fcn.14001e5b0
lea r11, [rsp + 0x160]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret