Function at 0x140164f20
Capabilities:
Set registry value

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x60
mov qword [rsp + 0x38], 0xfffffffffffffffe
mov qword [rsp + 0xa0], rbx
mov rax, qword [0x14042d950]
xor rax, rsp
mov qword [rsp + 0x50], rax
mov rbx, r8
mov rbp, rdx
mov qword [rsp + 0x40], rbx
xor r12d, r12d
mov r13d, r12d
mov rdi, r12
mov rcx, r8
call fcn.1400044c0
test rax, rax
je 0x140164fd5
mov rsi, r12
movabs r12, 0x6666666666666667
nop
mov rax, qword [rbx + 8]
test rax, rax
je 0x140164fa9
mov rcx, qword [rbx + 0x10]
sub rcx, rax
mov rax, r12
imul rcx
sar rdx, 4
mov rax, rdx
shr rax, 0x3f
add rdx, rax
cmp rdi, rdx
jb 0x140164faf
call qword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov rax, qword [rbx + 8]
mov rax, qword [rsi + rax + 0x18]
lea r13d, [r13 + rax*2 + 2]
add rdi, 1
add rsi, 0x28
mov rcx, rbx
call fcn.1400044c0
cmp rdi, rax
jb 0x140164f80
xor r12d, r12d
add r13d, 2
mov dword [rsp + 0x30], r13d
jne 0x14016507e
cmp qword [rbp + 0x20], 8
jb 0x140164ff1
mov rdx, qword [rbp + 8]
jmp 0x140164ff5
lea rdx, [rbp + 8]
mov dword [rsp + 0x28], r13d
lea rax, [0x140362cd8]
mov qword [rsp + 0x20], rax
mov r9d, 7
xor r8d, r8d
mov rcx, qword [0x140c461a0]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x140165285
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop
mov rcx, rbp
call qword [sym.imp.MSVCP80.dll_public:_void___cdecl_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void____ptr64]
nop
mov rdi, qword [rbx + 8]
test rdi, rdi
je 0x14016506b
mov rsi, qword [rbx + 0x10]
cmp rdi, rsi
je 0x140165062
nop
nop
mov rcx, rdi
call qword [sym.imp.MSVCP80.dll_public:_void___cdecl_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void____ptr64]
add rdi, 0x28
cmp rdi, rsi
jne 0x140165050
mov rcx, qword [rbx + 8]
call sub.MFC80U.DLL_Ordinal_776
mov qword [rbx + 8], r12
mov qword [rbx + 0x10], r12
mov qword [rbx + 0x18], r12
xor al, al
jmp 0x1401652ca
mov edx, r13d
mov ecx, 1
call qword [sym.imp.MSVCR80.dll_calloc]
mov r15, rax
test rax, rax
jne 0x1401650de
mov rcx, rbp
call qword [sym.imp.MSVCP80.dll_public:_void___cdecl_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void____ptr64]
nop
mov rdi, qword [rbx + 8]
test rdi, rdi
je 0x1401650cb
mov rsi, qword [rbx + 0x10]
cmp rdi, rsi
je 0x1401650c2
mov rcx, rdi
call qword [sym.imp.MSVCP80.dll_public:_void___cdecl_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void____ptr64]
add rdi, 0x28
cmp rdi, rsi
jne 0x1401650b0
mov rcx, qword [rbx + 8]
call sub.MFC80U.DLL_Ordinal_776
mov qword [rbx + 8], r12
mov qword [rbx + 0x10], r12
mov qword [rbx + 0x18], r12
xor al, al
jmp 0x1401652ca
mov r14d, r12d
mov rsi, r12
mov rcx, rbx
call fcn.1400044c0
test rax, rax
je 0x1401651ea
mov rdi, r12
movabs r13, 0x6666666666666667
mov rax, qword [rbx + 8]
test rax, rax
je 0x14016512b
mov rcx, qword [rbx + 0x10]
sub rcx, rax
mov rax, r13
imul rcx
sar rdx, 4
mov rax, rdx
shr rax, 0x3f
add rdx, rax
cmp rsi, rdx
jb 0x140165131
call qword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov rax, qword [rbx + 8]
mov r12, qword [rdi + rax + 0x18]
test rax, rax
je 0x14016515f
mov rcx, qword [rbx + 0x10]
sub rcx, rax
mov rax, r13
imul rcx
sar rdx, 4
mov rax, rdx
shr rax, 0x3f
add rdx, rax
cmp rsi, rdx
jb 0x140165165
call qword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov rax, qword [rbx + 8]
cmp qword [rdi + rax + 0x20], 8
jb 0x140165178
mov rdx, qword [rdi + rax + 8]
jmp 0x14016517d
lea rdx, [rdi + rax + 8]
lea r8, [r12 + r12]
mov ecx, r14d
add rcx, r15
call sub.ntdll.dll_memcpy
mov r11, qword [rbx + 8]
test r11, r11
je 0x1401651b5
mov rcx, qword [rbx + 0x10]
sub rcx, r11
mov rax, r13
imul rcx
sar rdx, 4
mov rax, rdx
shr rax, 0x3f
add rdx, rax
cmp rsi, rdx
jb 0x1401651bb
call qword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov rax, qword [rbx + 8]
mov rax, qword [rdi + rax + 0x18]
lea r14d, [r14 + rax*2 + 2]
add rsi, 1
add rdi, 0x28
mov rcx, rbx
call fcn.1400044c0
cmp rsi, rax
jb 0x140165102
mov r13d, dword [rsp + 0x30]
xor r12d, r12d
cmp qword [rbp + 0x20], 8
jb 0x1401651f7
mov rdx, qword [rbp + 8]
jmp 0x1401651fb
lea rdx, [rbp + 8]
mov dword [rsp + 0x28], r13d
mov qword [rsp + 0x20], r15
mov r9d, 7
xor r8d, r8d
mov rcx, qword [0x140c461a0]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
test eax, eax
je 0x14016527b
mov rcx, r15
call qword [sym.imp.MSVCR80.dll_free]
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop
mov rcx, rbp
call qword [sym.imp.MSVCP80.dll_public:_void___cdecl_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void____ptr64]
nop
mov rdi, qword [rbx + 8]
test rdi, rdi
je 0x14016526b
mov rsi, qword [rbx + 0x10]
cmp rdi, rsi
je 0x140165262
nop
mov rcx, rdi
call qword [sym.imp.MSVCP80.dll_public:_void___cdecl_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void____ptr64]
add rdi, 0x28
cmp rdi, rsi
jne 0x140165250
mov rcx, qword [rbx + 8]
call sub.MFC80U.DLL_Ordinal_776
mov qword [rbx + 8], r12
mov qword [rbx + 0x10], r12
mov qword [rbx + 0x18], r12
xor al, al
jmp 0x1401652ca
mov rcx, r15
call qword [sym.imp.MSVCR80.dll_free]
nop
mov rcx, rbp
call qword [sym.imp.MSVCP80.dll_public:_void___cdecl_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void____ptr64]
nop
mov rdi, qword [rbx + 8]
test rdi, rdi
je 0x1401652bc
mov rsi, qword [rbx + 0x10]
cmp rdi, rsi
je 0x1401652b3
mov rcx, rdi
call qword [sym.imp.MSVCP80.dll_public:_void___cdecl_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void____ptr64]
add rdi, 0x28
cmp rdi, rsi
jne 0x1401652a1
mov rcx, qword [rbx + 8]
call sub.MFC80U.DLL_Ordinal_776
mov qword [rbx + 8], r12
mov qword [rbx + 0x10], r12
mov qword [rbx + 0x18], r12
mov al, 1
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.140161080
mov rbx, qword [rsp + 0xa0]
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret