Function at 0x140022640
Capabilities:
Set registry value

Disassembly:
push rbx
push rbp
push rsi
push rdi
sub rsp, reloc.MFC80U.DLL_Ordinal_280
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov rax, qword [0x14042d950]
xor rax, rsp
mov qword [rsp + 0x100], rax
mov rbp, r9
mov rdi, r8
mov ebx, edx
mov rsi, rcx
mov qword [rsp + 0x88], r9
mov qword [rsp + 0x90], 0
xor edx, edx
lea r8d, [rdx + 0x50]
lea rcx, [rsp + 0x98]
call sub.ntdll.dll_memset
mov qword [rsp + 0xa0], 6
mov qword [rsp + 0xa8], 0x48
mov dword [rsp + 0xc4], 1
mov qword [rsp + 0xb0], rdi
mov dword [rsp + 0xc8], ebx
lea rcx, [rsp + 0x60]
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__::constructor_void____ptr64]
nop
mov rdx, rbp
lea rcx, [rsp + 0x60]
call qword [reloc.MSVCP80.dll___4__basic_string__WU__char_traits__W_std__V__allocator__W_2__std__QEAAAEAV01_AEBV01__Z]
lea rdx, str.Elements11000001
lea rcx, [rsp + 0x60]
call qword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______ptr64___cdecl_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_wchar_t_const____ptr64____ptr64]
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x38]
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__::constructor_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const____ptr64____ptr64]
mov r8, rax
mov rdx, 0xffffffff80000002
mov rcx, rsi
call fcn.140023c50
test al, al
jne 0x140022739
lea rcx, [rsp + 0x60]
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 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]
xor al, al
jmp 0x140022a01
lea rdx, str.Element
lea rcx, [rsp + 0x38]
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__::constructor_wchar_t_const____ptr64____ptr64]
mov rbx, rax
mov edx, 0x58
lea rcx, [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x1400229a4
cmp qword [rbx + 0x20], 8
jb 0x140022776
mov rdx, qword [rbx + 8]
jmp 0x14002277a
lea rdx, [rbx + 8]
mov dword [rsp + 0x28], 0x58
lea rax, [rsp + 0x90]
mov qword [rsp + 0x20], rax
mov r9d, 3
xor r8d, r8d
mov rcx, qword [rsi]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x1400227bc
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop
mov rcx, rbx
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]
jmp 0x1400229ad
mov rcx, rbx
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]
cmp byte [rsi + 0x1010], 0
je 0x1400227ec
lea r8, [rsi + 0x10]
mov edx, 4
mov rcx, qword [rsi]
call qword [sym.imp.ADVAPI32.dll_RegSetKeySecurity]
test eax, eax
je 0x1400227ec
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, qword [rsi]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
je 0x140022801
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rdx, rbp
lea rcx, [rsp + 0x60]
call qword [reloc.MSVCP80.dll___4__basic_string__WU__char_traits__W_std__V__allocator__W_2__std__QEAAAEAV01_AEBV01__Z]
lea rdx, str.Elements21000001
lea rcx, [rsp + 0x60]
call qword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______ptr64___cdecl_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_wchar_t_const____ptr64____ptr64]
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x38]
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__::constructor_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const____ptr64____ptr64]
mov r8, rax
mov rdx, 0xffffffff80000002
mov rcx, rsi
call fcn.140023c50
test al, al
jne 0x140022863
lea rcx, [rsp + 0x60]
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 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]
xor al, al
jmp 0x140022a01
lea rdx, str.Element
lea rcx, [rsp + 0x38]
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__::constructor_wchar_t_const____ptr64____ptr64]
mov rbx, rax
mov edx, 0x58
lea rcx, [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x140022945
cmp qword [rbx + 0x20], 8
jb 0x1400228a0
mov rdx, qword [rbx + 8]
jmp 0x1400228a4
lea rdx, [rbx + 8]
mov dword [rsp + 0x28], 0x58
lea rax, [rsp + 0x90]
mov qword [rsp + 0x20], rax
mov r9d, 3
xor r8d, r8d
mov rcx, qword [rsi]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x1400228e3
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop
mov rcx, rbx
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]
jmp 0x14002294e
mov rcx, rbx
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]
cmp byte [rsi + 0x1010], 0
je 0x140022913
lea r8, [rsi + 0x10]
mov edx, 4
mov rcx, qword [rsi]
call qword [sym.imp.ADVAPI32.dll_RegSetKeySecurity]
test eax, eax
je 0x140022913
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, qword [rsi]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
je 0x140022929
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop
lea rcx, [rsp + 0x60]
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 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]
mov al, 1
jmp 0x140022a01
mov rcx, rbx
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]
cmp byte [rsi + 0x1010], 0
je 0x140022975
lea r8, [rsi + 0x10]
mov edx, 4
mov rcx, qword [rsi]
call qword [sym.imp.ADVAPI32.dll_RegSetKeySecurity]
test eax, eax
je 0x140022975
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, qword [rsi]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
je 0x14002298b
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop
lea rcx, [rsp + 0x60]
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 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]
xor al, al
jmp 0x140022a01
mov rcx, rbx
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]
cmp byte [rsi + 0x1010], 0
je 0x1400229d4
lea r8, [rsi + 0x10]
mov edx, 4
mov rcx, qword [rsi]
call qword [sym.imp.ADVAPI32.dll_RegSetKeySecurity]
test eax, eax
je 0x1400229d4
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, qword [rsi]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
je 0x1400229ea
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop
lea rcx, [rsp + 0x60]
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 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]
xor al, al
mov rcx, qword [rsp + 0x100]
xor rcx, rsp
call fcn.140161080
add rsp, reloc.MFC80U.DLL_Ordinal_280
pop rdi
pop rsi
pop rbp
pop rbx
ret