Function at 0x1400a1f50
Capabilities:
Modify service

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r14
lea rbp, [rsp - 0x140]
sub rsp, 0x240
mov rax, qword [0x140138010]
xor rax, rsp
mov qword [rbp + 0x138], rax
mov rsi, rcx
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rdi, rax
mov qword [rbp - 0x48], rax
test rax, rax
jne 0x1400a2022
lea rax, str.D:_apia_desktoppia_desktopdaemon_srcwin.._.._.._extras_installer_win_service.inl
mov qword [rsp + 0x58], rax
lea rax, [0x1400fc9c5]
mov qword [rsp + 0x60], rax
mov r8d, 0xe2
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x70]
call qword [sym.imp.kapps_core.dll_public:_void___cdecl_kapps::core::SourceLocation::constructor_class_kapps::core::BasicStringSlice_char__struct_std::char_traits_char___const____ptr64__int____ptr64]
movups xmm0, xmmword [rax]
movaps xmmword [rbp - 0x20], xmm0
movups xmm1, xmmword [rax + 0x10]
movaps xmmword [rbp - 0x10], xmm1
xor r9d, r9d
lea r8d, [rdi + 3]
lea rdx, [rbp - 0x20]
lea rcx, [rbp]
call qword [sym.imp.kapps_core.dll_public:_void___cdecl_kapps::core::LogWriter::constructor_class_kapps::core::SourceLocation__enum_kapps::core::LogMessage::Level__class_kapps::core::LogCategory_const____ptr64____ptr64]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.Unable_to_open_Service_Control_Manager___d_
mov rcx, rbx
call qword [sym.imp.kapps_core.dll_public:_class_kapps::core::LogWriter____ptr64___cdecl_kapps::core::LogWriter::macroParams_char_const____ptr64____ptr64]
nop
lea rcx, [rbp]
call qword [sym.imp.kapps_core.dll_public:_void___cdecl_kapps::core::LogWriter::destructor_void____ptr64]
xor sil, sil
jmp 0x1400a234b
mov r8d, 0xf01ff
mov rdx, qword [rsi]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
mov qword [rsp + 0x58], rax
test rax, rax
jne 0x1400a20c6
lea rax, str.D:_apia_desktoppia_desktopdaemon_srcwin.._.._.._extras_installer_win_service.inl
mov qword [rsp + 0x38], rax
lea rax, [0x1400fc9c5]
mov qword [rsp + 0x40], rax
mov r8d, 0xe3
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x70]
call qword [sym.imp.kapps_core.dll_public:_void___cdecl_kapps::core::SourceLocation::constructor_class_kapps::core::BasicStringSlice_char__struct_std::char_traits_char___const____ptr64__int____ptr64]
movups xmm0, xmmword [rax]
movaps xmmword [rbp - 0x20], xmm0
movups xmm1, xmmword [rax + 0x10]
movaps xmmword [rbp - 0x10], xmm1
xor r9d, r9d
lea r8d, [rbx + 3]
lea rdx, [rbp - 0x20]
lea rcx, [rbp]
call qword [sym.imp.kapps_core.dll_public:_void___cdecl_kapps::core::LogWriter::constructor_class_kapps::core::SourceLocation__enum_kapps::core::LogMessage::Level__class_kapps::core::LogCategory_const____ptr64____ptr64]
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.Unable_to_open_service___d_
mov rcx, rsi
call qword [sym.imp.kapps_core.dll_public:_class_kapps::core::LogWriter____ptr64___cdecl_kapps::core::LogWriter::macroParams_char_const____ptr64____ptr64]
nop
lea rcx, [rbp]
call qword [sym.imp.kapps_core.dll_public:_void___cdecl_kapps::core::LogWriter::destructor_void____ptr64]
xor sil, sil
jmp 0x1400a233c
test byte [rsi + 0x14], 1
je 0x1400a2214
mov dword [rbp - 0x70], 0x3c
mov dword [rbp - 0x58], 1
lea rax, [0x1400fcda0]
mov qword [rbp - 0x60], rax
mov qword [rbp - 0x68], rax
lea rax, [rsp + 0x38]
mov qword [rbp - 0x50], rax
mov qword [rsp + 0x38], 1
lea r8, [rbp - 0x70]
mov edx, 2
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
jne 0x1400a2214
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x30], eax
lea rax, str.D:_apia_desktoppia_desktopdaemon_srcwin.._.._.._extras_installer_win_service.inl
mov qword [rsp + 0x48], rax
lea rax, [0x1400fc9c5]
mov qword [rsp + 0x50], rax
mov r8d, MsiQueryFeatureStateExW
lea rdx, [rsp + 0x48]
lea rcx, [rbp - 0x40]
call qword [sym.imp.kapps_core.dll_public:_void___cdecl_kapps::core::SourceLocation::constructor_class_kapps::core::BasicStringSlice_char__struct_std::char_traits_char___const____ptr64__int____ptr64]
movups xmm0, xmmword [rax]
movaps xmmword [rsp + 0x70], xmm0
movups xmm1, xmmword [rax + 0x10]
movaps xmmword [rbp - 0x80], xmm1
xor r9d, r9d
lea r8d, [r9 + 3]
lea rdx, [rsp + 0x70]
lea rcx, [rbp]
call qword [sym.imp.kapps_core.dll_public:_void___cdecl_kapps::core::LogWriter::constructor_class_kapps::core::SourceLocation__enum_kapps::core::LogMessage::Level__class_kapps::core::LogCategory_const____ptr64____ptr64]
mov r14, rax
lea rdx, [rbp - 0x20]
lea rcx, [rsp + 0x30]
call fcn.14009d480
nop
cmp qword [rax + 0x18], 0x10
jb 0x1400a2192
mov rax, qword [rax]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x30]
mov r8, qword [rsi]
lea rdx, str.Failed_to_configure_auto_restart_service__ls__0x_X___s
mov rcx, r14
call qword [sym.imp.kapps_core.dll_public:_class_kapps::core::LogWriter____ptr64___cdecl_kapps::core::LogWriter::macroParams_char_const____ptr64____ptr64]
nop
mov rdx, qword [rbp - 8]
cmp rdx, 0x10
jb 0x1400a21ee
inc rdx
mov rcx, qword [rbp - 0x20]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400a21e9
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400a21e9
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400cdbac
mov qword [rbp - 0x10], 0
mov qword [rbp - 8], reloc.WS2_32.dll_ntohs
mov byte [rbp - 0x20], 0
lea rcx, [rbp]
call qword [sym.imp.kapps_core.dll_public:_void___cdecl_kapps::core::LogWriter::destructor_void____ptr64]
xor sil, sil
jmp 0x1400a233c
test byte [rsi + 0x14], 2
je 0x1400a2339
mov dword [rsp + 0x38], 1
lea r8, [rsp + 0x38]
mov edx, 5
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
jne 0x1400a2339
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x30], eax
lea rax, str.D:_apia_desktoppia_desktopdaemon_srcwin.._.._.._extras_installer_win_service.inl
mov qword [rsp + 0x48], rax
lea rax, [0x1400fc9c5]
mov qword [rsp + 0x50], rax
mov r8d, 0x105
lea rdx, [rsp + 0x48]
lea rcx, [rbp - 0x40]
call qword [sym.imp.kapps_core.dll_public:_void___cdecl_kapps::core::SourceLocation::constructor_class_kapps::core::BasicStringSlice_char__struct_std::char_traits_char___const____ptr64__int____ptr64]
movups xmm0, xmmword [rax]
movaps xmmword [rsp + 0x70], xmm0
movups xmm1, xmmword [rax + 0x10]
movaps xmmword [rbp - 0x80], xmm1
xor r9d, r9d
lea r8d, [r9 + 3]
lea rdx, [rsp + 0x70]
lea rcx, [rbp]
call qword [sym.imp.kapps_core.dll_public:_void___cdecl_kapps::core::LogWriter::constructor_class_kapps::core::SourceLocation__enum_kapps::core::LogMessage::Level__class_kapps::core::LogCategory_const____ptr64____ptr64]
mov r14, rax
lea rdx, [rbp - 0x20]
lea rcx, [rsp + 0x30]
call fcn.14009d480
nop
cmp qword [rax + 0x18], 0x10
jb 0x1400a22ba
mov rax, qword [rax]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x30]
mov r8, qword [rsi]
lea rdx, str.Failed_to_set_SID_type_for_service__ls___0x_X__s
mov rcx, r14
call qword [sym.imp.kapps_core.dll_public:_class_kapps::core::LogWriter____ptr64___cdecl_kapps::core::LogWriter::macroParams_char_const____ptr64____ptr64]
nop
mov rdx, qword [rbp - 8]
cmp rdx, 0x10
jb 0x1400a2316
inc rdx
mov rcx, qword [rbp - 0x20]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400a2311
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400a2311
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400cdbac
mov qword [rbp - 0x10], 0
mov qword [rbp - 8], reloc.WS2_32.dll_ntohs
mov byte [rbp - 0x20], 0
lea rcx, [rbp]
call qword [sym.imp.kapps_core.dll_public:_void___cdecl_kapps::core::LogWriter::destructor_void____ptr64]
xor sil, sil
jmp 0x1400a233c
mov sil, 1
test rbx, rbx
je 0x1400a234b
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
test rdi, rdi
je 0x1400a2359
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
movzx eax, sil
mov rcx, qword [rbp + 0x138]
xor rcx, rsp
call fcn.1400cdb50
lea r11, [rsp + 0x240]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret