Function at 0x1400041a0
Capabilities:
Get common file path
Persist via userinitmprlogonscript registry value
Set registry value

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r14
lea rbp, [rsp - 0x1e0]
sub rsp, 0x2e0
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x1d0], rax
mov rsi, rcx
xor r14d, r14d
mov r8d, 0x104
lea rdx, [rbp - 0x40]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xorps xmm0, xmm0
movups xmmword [rbp - 0x68], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x58], xmm1
lea rax, [rbp - 0x40]
mov rbx, 0xffffffffffffffff
mov r8, rbx
inc r8
cmp word [rax + r8*2], r14w
jne 0x140004203
lea rdx, [rbp - 0x40]
lea rcx, [rbp - 0x68]
call fcn.140003440
nop
lea rdx, [rbp - 0x40]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
xorps xmm0, xmm0
movups xmmword [rsp + 0x78], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x78], xmm1
lea rax, [rbp - 0x40]
nop
inc rbx
cmp word [rax + rbx*2], 0
jne 0x140004240
mov r8, rbx
lea rdx, [rbp - 0x40]
lea rcx, [rsp + 0x78]
call fcn.140003440
nop
xorps xmm0, xmm0
movups xmmword [rsp + 0x38], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x48], xmm1
mov rbx, qword [rsi + 0x10]
cmp qword [rsi + 0x18], 7
jbe 0x14000427b
mov rsi, qword [rsi]
movabs rdi, 0x7ffffffffffffffe
cmp rbx, rdi
ja 0x140004710
cmp rbx, 7
ja 0x1400042af
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x50], 7
movups xmm0, xmmword [rsi]
movups xmmword [rsp + 0x38], xmm0
jmp 0x140004359
mov rax, rbx
or rax, 7
cmp rax, rdi
jbe 0x140004301
movabs rax, 0x7fffffffffffffff
lea rcx, [rax + rax]
cmp rcx, 0x1000
jb 0x140004331
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x140004716
mov rcx, rax
call fcn.140004a78
mov rcx, rax
test rax, rax
je 0x140004661
add rax, 0x27
and rax, 0xffffffffffffffe0
mov qword [rax - 8], rcx
jmp 0x140004336
mov rdi, rax
mov ecx, 0xa
cmp rax, rcx
cmovb rdi, rcx
lea rcx, [rdi + 1]
movabs rax, 0x7fffffffffffffff
cmp rcx, rax
ja 0x140004716
add rcx, rcx
jne 0x1400042c9
mov rax, r14
jmp 0x140004336
call fcn.140004a78
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x50], rdi
lea r8, [rbx*2 + 2]
mov rdx, rsi
mov rcx, rax
call sub.VCRUNTIME140.dll_memcpy
nop
xorps xmm0, xmm0
movups xmmword [rsp + 0x58], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x68], xmm1
mov r8d, 0xb
lea rdx, str.Environment
lea rcx, [rsp + 0x58]
call fcn.140003440
nop
lea rdx, [rsp + 0x58]
cmp qword [rsp + 0x70], 7
cmova rdx, qword [rsp + 0x58]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x20], rax
mov r9d, 2
xor r8d, r8d
mov rcx, 0xffffffff80000001
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ebx, eax
test eax, eax
jne 0x1400045a1
mov eax, dword [rsp + 0x48]
lea eax, [rax*2 + 2]
lea rcx, [rsp + 0x38]
cmp qword [rsp + 0x50], 7
cmova rcx, qword [rsp + 0x38]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rcx
mov r9d, 1
xor r8d, r8d
lea rdx, str.UserInitMprLogonScript
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ebx, eax
test eax, eax
jne 0x140004413
lea rdx, str.Registry_value_set_successfully._n
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
jmp 0x14000443b
lea rdx, str.Failed_to_set_registry_value._Error_code:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcerr]
call fcn.1400031e0
mov edx, ebx
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___long_int____ptr64]
mov rcx, rax
lea rdx, [0x140006bd4]
call fcn.1400031e0
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
mov rdx, qword [rsp + 0x70]
cmp rdx, 7
jbe 0x14000448e
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x58]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004489
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140004608
call fcn.140004ab4
movdqa xmm0, xmmword [0x1400067c0]
movdqu xmmword [rsp + 0x68], xmm0
mov word [rsp + 0x58], r14w
mov rdx, qword [rsp + 0x50]
cmp rdx, 7
jbe 0x1400044ec
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400044df
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140004661
call fcn.140004ab4
movdqa xmm0, xmmword [0x1400067c0]
movdqu xmmword [rsp + 0x48], xmm0
mov word [rsp + 0x38], r14w
mov rdx, qword [rbp - 0x70]
cmp rdx, 7
jbe 0x14000453a
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004534
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400046b9
call fcn.140004ab4
nop
mov rdx, qword [rbp - 0x50]
cmp rdx, 7
jbe 0x14000457a
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x68]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004575
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400046fd
call fcn.140004ab4
mov rcx, qword [rbp + 0x1d0]
xor rcx, rsp
call fcn.140004e70
lea r11, [rsp + 0x2e0]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret
lea rdx, str.Failed_to_open_registry_key._Error_code:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcerr]
call fcn.1400031e0
mov edx, ebx
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___long_int____ptr64]
mov rcx, rax
lea rdx, [0x140006bd4]
call fcn.1400031e0
nop
mov rdx, qword [rsp + 0x70]
cmp rdx, 7
jbe 0x140004614
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x58]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000460f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000460f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140004ab4
movdqa xmm0, xmmword [0x1400067c0]
movdqu xmmword [rsp + 0x68], xmm0
mov word [rsp + 0x58], r14w
mov rdx, qword [rsp + 0x50]
cmp rdx, 7
jbe 0x140004675
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004668
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140004668
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140004ab4
movdqa xmm0, xmmword [0x1400067c0]
movdqu xmmword [rsp + 0x48], xmm0
mov word [rsp + 0x38], r14w
mov rdx, qword [rbp - 0x70]
cmp rdx, 7
jbe 0x1400046c6
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400046c0
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400046c0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140004ab4
nop
mov rdx, qword [rbp - 0x50]
cmp rdx, 7
jbe 0x140004709
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x68]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004704
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140004704
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140004ab4
xor al, al
jmp 0x14000457a
call fcn.140002390
int3
call fcn.140001880
int3