Function at 0x140005da4
Capabilities:
Create service
Persist via run registry key
Set registry value

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x3e8]
sub rsp, 0x4d0
mov rax, qword [0x14007e4a8]
xor rax, rsp
mov qword [rbp + 0x3c0], rax
mov rdi, rcx
lea rdx, [rbp + 0x1b0]
xor ecx, ecx
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor ebx, ebx
test eax, eax
jne 0x140005e42
lea rdx, [rsp + 0x78]
mov rcx, rdi
call fcn.140005cec
cmp qword [rax + 0x18], 8
jb 0x140005e0c
mov rax, qword [rax]
mov rdx, qword [rdi + 0x10]
lea rcx, str.Unable_to_install__s____s_n
mov r8, rax
call fcn.140006bc0
mov rdx, qword [rbp - 0x70]
cmp rdx, 8
jb 0x140005e3b
mov rcx, qword [rsp + 0x78]
lea rdx, [rdx*2 + 2]
call fcn.140002570
xor eax, eax
jmp 0x14000614d
mov r15d, 1
mov ecx, r15d
call fcn.140014880
lea rsi, str.CNTService::InstallService
lea r14, str.E:BT_ad7a08e3_3faa_4683_b8f2_1da0b0dd1c71UBF_1ActivationWizardHost_srcAWFwkNTService.cpp
test eax, eax
je 0x140005e8e
lea rax, [rbp + 0x1b0]
mov r9d, reloc.OLEAUT32.dll_VARIANT_UserUnmarshal
mov qword [rsp + 0x28], rax
mov r8, rsi
lea rax, str.InstallService:_GetModuleFileName____s
mov rdx, r14
mov ecx, r15d
mov qword [rsp + 0x20], rax
call fcn.140001dc8
mov r8d, 0x104
lea rdx, [rbp - 0x60]
lea rcx, [rbp + 0x1b0]
call qword [sym.imp.KERNEL32.dll_GetLongPathNameW]
test eax, eax
jne 0x140005eea
mov ecx, r15d
call fcn.140014880
test eax, eax
je 0x140005ed5
lea rax, str.InstallService:_GetLongPathName_returned_0._Continuing_with_Short_Path.
mov r9d, 0x123
mov r8, rsi
mov qword [rsp + 0x20], rax
mov rdx, r14
mov ecx, r15d
call fcn.140001e30
lea r8, [rbp + 0x1b0]
mov edx, 0x104
lea rcx, [rbp - 0x60]
call fcn.140030448
mov ecx, r15d
call fcn.140014880
test eax, eax
je 0x140005f1f
lea rax, [rbp - 0x60]
mov r9d, 0x126
mov qword [rsp + 0x28], rax
mov r8, rsi
lea rax, str.InstallService:_GetLongPathName____s
mov rdx, r14
mov ecx, r15d
mov qword [rsp + 0x20], rax
call fcn.140001dc8
lea rcx, [rbp - 0x60]
call qword [sym.imp.SHLWAPI.dll_PathQuoteSpacesW]
mov ecx, r15d
test eax, eax
jne 0x140005f5b
call fcn.140014880
test eax, eax
je 0x140005f8d
lea rax, str.No_space_is_found_in_path.So_Creating_a_service_with_an_unquoted_long_path
mov r9d, 0x12a
mov r8, rsi
mov qword [rsp + 0x20], rax
mov rdx, r14
mov ecx, r15d
call fcn.140001e30
jmp 0x140005f8d
call fcn.140014880
test eax, eax
je 0x140005f8d
lea rax, [rbp - 0x60]
mov r9d, 0x12d
mov qword [rsp + 0x28], rax
mov r8, rsi
lea rax, str.Creating_a_service_using_quoted_long_path____s
mov rdx, r14
mov ecx, r15d
mov qword [rsp + 0x20], rax
call fcn.140001dc8
cmp dword [rdi + 0x58], ebx
jne 0x140005ffc
mov rdx, qword [str.SoftwareMicrosoftWindowsCurrentVersionRunServices]
lea r8, [rsp + 0x70]
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x70], rbx
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
jne 0x14000614b
lea rcx, [rbp - 0x60]
call fcn.140030054
mov rdx, qword [rdi + 8]
add eax, r15d
mov rcx, qword [rsp + 0x70]
mov r9d, 2
mov dword [rsp + 0x28], eax
xor r8d, r8d
lea rax, [rbp - 0x60]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ebx, r15d
jmp 0x14000614b
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rsi, rax
test rax, rax
je 0x140006109
mov edx, dword [rdi + 0x64]
mov r8, qword [rdi + 0x90]
mov r9, qword [rdi + 0x88]
mov r10, qword [rdi + 0x80]
lea ecx, [rdx - 1]
cmp ecx, r15d
ja 0x140006046
mov ecx, dword [rdi + 0x68]
cmp ecx, 2
jae 0x140006046
lea rax, [rdi + 0x78]
jmp 0x14000604c
mov ecx, dword [rdi + 0x68]
mov rax, rbx
mov qword [rsp + 0x60], r8
mov r8, qword [rdi + 0x10]
mov qword [rsp + 0x58], r9
mov r9d, dword [rdi + 0x60]
mov qword [rsp + 0x50], r10
mov qword [rsp + 0x48], rax
mov rax, qword [rdi + 0x70]
mov qword [rsp + 0x40], rax
lea rax, [rbp - 0x60]
mov qword [rsp + 0x38], rax
mov eax, dword [rdi + 0x6c]
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x28], ecx
mov rcx, rsi
mov dword [rsp + 0x20], edx
mov rdx, qword [rdi + 8]
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov r14, rax
test rax, rax
je 0x1400060bc
mov rdx, qword [rdi + 0x10]
lea rcx, str._s_installed._n
call fcn.140006bc0
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ebx, r15d
jmp 0x1400060fe
lea rdx, [rsp + 0x78]
mov rcx, rdi
call fcn.140005cec
cmp qword [rax + 0x18], 8
jb 0x1400060d3
mov rax, qword [rax]
mov rdx, rax
lea rcx, str.CreateService_failed____s_n
call fcn.140006bc0
mov rdx, qword [rbp - 0x70]
cmp rdx, 8
jb 0x1400060fe
mov rcx, qword [rsp + 0x78]
lea rdx, [rdx*2 + 2]
call fcn.140002570
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x14000614b
lea rdx, [rsp + 0x78]
mov rcx, rdi
call fcn.140005cec
cmp qword [rax + 0x18], 8
jb 0x140006120
mov rax, qword [rax]
mov rdx, rax
lea rcx, str.OpenSCManager_failed____s_n
call fcn.140006bc0
mov rdx, qword [rbp - 0x70]
cmp rdx, 8
jb 0x14000614b
mov rcx, qword [rsp + 0x78]
lea rdx, [rdx*2 + 2]
call fcn.140002570
mov eax, ebx
mov rcx, qword [rbp + 0x3c0]
xor rcx, rsp
call fcn.140020250
lea r11, [rsp + 0x4d0]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret