Function at 0x14000cf60
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 [0x140114ab8]
xor rax, rsp
mov qword [rbp + 0x1b0], rax
and qword [rbp - 0x78], 0
lea r14, fcn.14000d650
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 0x14000cff0
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 0x14000d110
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 0x14000d041
test rcx, rcx
je 0x14000d03a
mov rcx, qword [rbp - 0x80]
mov rax, qword [rcx]
movabs r10, 0xefcdb65178560a70
lea rcx, [rbp - 0x80]
call qword [0x1400de008]
test al, al
je 0x14000d1fb
mov rcx, rbx
mov qword [rbp - 0x78], rbx
test rcx, rcx
jne 0x14000d05e
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 0x14000d110
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 0x14000d0f8
test rcx, rcx
je 0x14000d0f0
mov rcx, qword [rsp + 0x70]
mov rax, qword [rcx]
movabs r10, 0xefcdb65178560a70
lea rcx, [rsp + 0x70]
call qword [0x1400de008]
test al, al
je 0x14000d21b
mov rcx, rbx
mov qword [rsp + 0x78], rbx
test rcx, rcx
jne 0x14000d120
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 0x14000d17a
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 0x14000d17a
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 0x14000d19f
lea rcx, [rsp + 0x70]
call fcn.14000d650
test al, al
je 0x14000d23b
and qword [rsp + 0x78], 0
cmp qword [rbp - 0x78], 0
mov qword [rbp - 0x80], r14
je 0x14000d1b7
lea rcx, [rbp - 0x80]
call fcn.14000d650
test al, al
je 0x14000d1db
mov rcx, qword [rbp + 0x1b0]
xor rcx, rsp
call fcn.1400d2540
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.14000ebc0
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.14000ebc0
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.14000ebc0
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.14000ebc0
int3