Function at 0x140015f44
Capabilities:
Set registry value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
push rsi
push rdi
push r13
push r14
push r15
sub rsp, 0x50
xor r13d, r13d
lea rdi, str.SoftwareMicrosoftCloudManagedUpdateuhs_settings
mov rcx, rdx
mov qword [rsp + 0x28], rdi
mov r14d, r13d
mov r15, r8
mov rbp, rdx
call fcn.140012b08
mov ebx, eax
test eax, eax
jns 0x140015fa0
mov edx, 0x9d
mov rcx, qword [rsp + 0x78]
lea r8, str.onecoreenduserupgradeenablers_shellhelpersonesettingsuhsswitches.cpp
mov r9d, ebx
call fcn.140003e64
mov eax, ebx
jmp 0x1400161ae
mov rcx, rbp
call fcn.140013a44
mov ebx, eax
test eax, eax
jns 0x140015fb5
mov edx, 0xa4
jmp 0x140015f85
cmp qword [rbp + 0xc0], r13
jne 0x14001619c
lea rdx, str.Onesettings_Query___method_failed
xor ecx, ecx
call fcn.140009844
mov rcx, rbp
call fcn.14001320c
mov r14d, eax
test eax, eax
jns 0x140015fed
lea rdx, str.Onesettings_ForceResetQueryState___method_failed
mov ecx, eax
call fcn.140009844
mov qword [rsp + 0x40], r13
lea rax, [rsp + 0x98]
mov qword [rsp + 0x38], rax
xor r9d, r9d
mov qword [rsp + 0x30], r13
xor r8d, r8d
mov dword [rsp + 0x28], 0x20006
mov rdx, rdi
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x20], r13d
mov qword [rsp + 0x98], r13
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCreateKeyExW]
test eax, eax
je 0x140016086
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
movzx ecx, ax
mov r8, rdi
or ecx, 0x80070000
lea rdx, str.Failed_to_create_open_settings_key__s
test eax, eax
cmovle ecx, eax
call fcn.140009844
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov rcx, qword [rsp + 0x98]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test rcx, rcx
je 0x140016176
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
jmp 0x140016176
mov rax, qword [r15 + 0xe8]
mov rbx, qword [rax]
cmp rbx, rax
je 0x140016160
lea rsi, [rbx + 0x30]
cmp qword [rsi + 0x18], 8
mov rcx, rsi
jb 0x1400160aa
mov rcx, qword [rsi]
or rax, 0xffffffffffffffff
inc rax
cmp word [rcx + rax*2], r13w
jne 0x1400160ae
add eax, eax
mov rcx, rsi
cmp qword [rsi + 0x18], 8
jb 0x1400160c7
mov rcx, qword [rsi]
lea rdi, [rbx + 0x10]
cmp qword [rdi + 0x18], 8
mov r8, rdi
jb 0x1400160d8
mov r8, qword [rdi]
xor edx, edx
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rcx
mov rcx, qword [rsp + 0x98]
lea r9d, [rdx + 1]
call qword [sym.imp.api_ms_win_core_registry_l2_1_0.dll_RegSetKeyValueW]
test eax, eax
je 0x140016128
cmp qword [rdi + 0x18], 8
jb 0x140016103
mov rdi, qword [rdi]
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
movzx ecx, ax
mov r8, rdi
or ecx, 0x80070000
lea rdx, str.Failed_to_write__s
test eax, eax
cmovle ecx, eax
call fcn.140009844
jmp 0x140016150
cmp qword [rsi + 0x18], 8
jb 0x140016132
mov rsi, qword [rsi]
cmp qword [rdi + 0x18], 8
jb 0x14001613c
mov rdi, qword [rdi]
mov r9, rsi
lea rdx, str.Wrote_value_Name:__s__Value:__s
mov r8, rdi
xor ecx, ecx
call fcn.140009844
mov rbx, qword [rbx]
cmp rbx, qword [r15 + 0xe8]
jne 0x140016099
mov rcx, qword [rsp + 0x98]
test rcx, rcx
je 0x140016173
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov ebx, r13d
test ebx, ebx
jns 0x140016184
mov edx, 0xb4
jmp 0x140015f85
mov rcx, rbp
call fcn.140013a44
mov ebx, eax
test eax, eax
jns 0x14001619c
mov edx, 0xb5
jmp 0x140015f85
lea rdx, [rbp + 0xb0]
mov rcx, r15
call fcn.140015220
mov eax, r14d
lea r11, [rsp + 0x50]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r13
pop rdi
pop rsi
ret