Function at 0x140022aa0
Capabilities:
Set registry value

Disassembly:
push rbx
push rbp
push rsi
push rdi
sub rsp, 0x108
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov rax, qword [0x14042d950]
xor rax, rsp
mov qword [rsp + 0xf8], 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 0x140022b99
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 0x140022cd5
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 0x140022c78
cmp qword [rbx + 0x20], 8
jb 0x140022bd6
mov rdx, qword [rbx + 8]
jmp 0x140022bda
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 0x140022c19
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 0x140022c81
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 0x140022c49
lea r8, [rsi + 0x10]
mov edx, 4
mov rcx, qword [rsi]
call qword [sym.imp.ADVAPI32.dll_RegSetKeySecurity]
test eax, eax
je 0x140022c49
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 0x140022c5f
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 0x140022cd5
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 0x140022ca8
lea r8, [rsi + 0x10]
mov edx, 4
mov rcx, qword [rsi]
call qword [sym.imp.ADVAPI32.dll_RegSetKeySecurity]
test eax, eax
je 0x140022ca8
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 0x140022cbe
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 + 0xf8]
xor rcx, rsp
call fcn.140161080
add rsp, 0x108
pop rdi
pop rsi
pop rbp
pop rbx
ret