Function at 0x14000cf90
Capabilities:
Create service
Modify service
Persist via windows service
Start service

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rdi
push r14
lea rbp, [rsp - 0x1c0]
sub rsp, 0x2c0
mov rax, qword [0x140115ab8]
xor rax, rsp
mov qword [rbp + 0x1b0], rax
and qword [rbp - 0x78], 0
lea r14, fcn.14000d680
and qword [rsp + 0x78], 0
mov rdi, rcx
mov qword [rbp - 0x70], rdx
lea rcx, [rbp - 0x60]
xor edx, edx
mov qword [rbp - 0x80], r14
mov r8d, 0x208
mov qword [rsp + 0x70], r14
call sub.msvcrt.dll_memset
mov r8d, 0x104
lea rdx, [rbp - 0x60]
xor ecx, ecx
call qword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_GetModuleFileNameW]
nop dword [rax + rax]
test eax, eax
jne 0x14000d020
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
lea rcx, str.Service:_Cannot_install_service___u__n
jmp 0x14000d140
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_OpenSCManagerW]
nop dword [rax + rax]
mov rcx, qword [rbp - 0x78]
mov rbx, rax
cmp rax, rcx
je 0x14000d071
test rcx, rcx
je 0x14000d06a
mov rcx, qword [rbp - 0x80]
mov rax, qword [rcx]
movabs r10, 0xefcdb65178560a70
lea rcx, [rbp - 0x80]
call qword [0x1400de010]
test al, al
je 0x14000d22b
mov rcx, rbx
mov qword [rbp - 0x78], rbx
test rcx, rcx
jne 0x14000d08e
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
lea rcx, str.Service:_OpenSCManager_failed___u__n
jmp 0x14000d140
and qword [rsp + 0x60], 0
lea rax, [rbp - 0x60]
and qword [rsp + 0x58], 0
lea rdx, str.SensorDataService
and qword [rsp + 0x50], 0
mov r9d, 0xf01ff
and qword [rsp + 0x48], 0
mov r8, rdi
and qword [rsp + 0x40], 0
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], 0x10
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CreateServiceW]
nop dword [rax + rax]
mov rcx, qword [rsp + 0x78]
mov rbx, rax
cmp rax, rcx
je 0x14000d128
test rcx, rcx
je 0x14000d120
mov rcx, qword [rsp + 0x70]
mov rax, qword [rcx]
movabs r10, 0xefcdb65178560a70
lea rcx, [rsp + 0x70]
call qword [0x1400de010]
test al, al
je 0x14000d24b
mov rcx, rbx
mov qword [rsp + 0x78], rbx
test rcx, rcx
jne 0x14000d150
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
lea rcx, str.Service:_CreateService_failed___u__n
mov edx, eax
call qword [sym.imp.msvcrt.dll_wprintf_s]
nop dword [rax + rax]
jmp 0x14000d1aa
lea rcx, str.Service:_Installed_successfully_n
call qword [sym.imp.msvcrt.dll_wprintf_s]
nop dword [rax + rax]
mov rcx, qword [rsp + 0x78]
lea r8, [rbp - 0x70]
mov edx, 1
call qword [sym.imp.api_ms_win_service_management_l2_1_0.dll_ChangeServiceConfig2W]
nop dword [rax + rax]
mov rcx, qword [rsp + 0x78]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_StartServiceW]
nop dword [rax + rax]
test eax, eax
jne 0x14000d1aa
lea rcx, str.Service:_Failed_to_start_n
call qword [sym.imp.msvcrt.dll_wprintf_s]
nop dword [rax + rax]
cmp qword [rsp + 0x78], 0
mov qword [rsp + 0x70], r14
je 0x14000d1cf
lea rcx, [rsp + 0x70]
call fcn.14000d680
test al, al
je 0x14000d26b
and qword [rsp + 0x78], 0
cmp qword [rbp - 0x78], 0
mov qword [rbp - 0x80], r14
je 0x14000d1e7
lea rcx, [rbp - 0x80]
call fcn.14000d680
test al, al
je 0x14000d20b
mov rcx, qword [rbp + 0x1b0]
xor rcx, rsp
call fcn.1400d22a0
mov rbx, qword [rsp + 0x2f0]
add rsp, 0x2c0
pop r14
pop rdi
pop rbp
ret
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
call fcn.14000ec00
int3
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
call fcn.14000ec00
int3
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
call fcn.14000ec00
int3
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
call fcn.14000ec00
int3