Function at 0x1400dc540
Capabilities:
Query or enumerate registry value

Disassembly:
push rdi
sub rsp, 0x60
mov rax, qword [0x1401aa010]
xor rax, rsp
mov qword [rsp + 0x58], rax
mov rdi, rdx
lea rcx, [0x14011bca8]
lea rdx, str.CSimpleOrientationSensorEvents::GetAutoRotationStateFromReg
mov r8d, 0x243
call fcn.140075db0
lea rax, [rsp + 0x30]
mov dword [rsp + 0x40], 1
mov r9d, 0x11
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, str.SOFTWAREMicrosoftWindowsCurrentVersionAutoRotation
mov rcx, 0xffffffff80000002
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
test eax, eax
jne 0x1400dc7b1
mov rcx, qword [rsp + 0x30]
lea r9, [rsp + 0x48]
mov dword [rsp + 0x48], eax
lea rdx, str.Enable
lea rax, [rsp + 0x44]
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x28], rax
xor r8d, r8d
lea rax, [rsp + 0x40]
mov dword [rsp + 0x44], 4
mov qword [rsp + 0x20], rax
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
mov r9d, dword [rsp + 0x40]
lea rdx, str.CSimpleOrientationSensorEvents::GetAutoRotationStateFromReg
mov r8d, 0x24f
lea rcx, str._s__d_Auto_Orientation_Enable___d
call fcn.140075db0
mov dword [rdi], 0
call fcn.14000ced0
mov rbx, rax
call fcn.14000ced0
mov ecx, dword [rbx + 0xc]
lea rdx, str.CSimpleOrientationSensorEvents::GetAutoRotationStateFromReg
mov dword [rsp + 0x20], ecx
mov r8d, 0x253
lea rcx, str._s__d_MajorVersion__d__BuildNumber__d_
mov r9d, dword [rax + 4]
call fcn.140075db0
call fcn.14000ced0
mov rbx, qword [rsp + 0x70]
cmp dword [rax + 4], 0xa
jne 0x1400dc75f
call fcn.14000ced0
cmp dword [rax + 0xc], 0x5374
jb 0x1400dc75f
cmp dword [rsp + 0x40], 0
je 0x1400dc71c
lea rax, [rsp + 0x38]
mov r9d, 0x11
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SOFTWAREMicrosoftWindowsCurrentVersionAutoRotationNonPreserve
mov rcx, 0xffffffff80000002
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
test eax, eax
jne 0x1400dc704
mov rcx, qword [rsp + 0x38]
lea r9, [rsp + 0x50]
mov dword [rsp + 0x50], eax
lea rdx, str.LastAutoRequest
lea rax, [rsp + 0x4c]
mov dword [rsp + 0x4c], 4
mov qword [rsp + 0x28], rax
xor r8d, r8d
mov qword [rsp + 0x20], rdi
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
mov r9d, dword [rdi]
lea rdx, str.CSimpleOrientationSensorEvents::GetAutoRotationStateFromReg
mov r8d, 0x262
lea rcx, str._s__d_for_windows_21xxx__Orientation_LastAutoRequest____d
call fcn.140075db0
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
jmp 0x1400dc7ca
call fcn.14000ced0
mov r8d, 0x269
lea rcx, str._s__d_BuildNumber__d__open_AutoRotationNonPreserve_fail
mov r9d, dword [rax + 0xc]
jmp 0x1400dc798
mov r8d, 0x26e
lea rdx, str.CSimpleOrientationSensorEvents::GetAutoRotationStateFromReg
lea rcx, str._s__d_for_windows_21xxx__Auto_Orientation_is_disabled__Orientation_0
call fcn.140075db0
call fcn.14006b0c0
mov rdx, rax
mov rcx, qword [rax]
mov rax, qword [rcx + 0x150]
mov rcx, rdx
call qword [case.0x14005eeb3.0]
mov rcx, qword [rsp + 0x30]
mov dword [rdi], eax
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
jmp 0x1400dc7ca
mov rcx, qword [rsp + 0x30]
lea rax, [rsp + 0x44]
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x48]
xor r8d, r8d
mov qword [rsp + 0x20], rdi
lea rdx, str.LastOrientation
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
mov r9d, dword [rdi]
lea rcx, str._s__d_before_windows_21xxx__Orientation_LastOrientation____d
mov r8d, 0x276
lea rdx, str.CSimpleOrientationSensorEvents::GetAutoRotationStateFromReg
call fcn.140075db0
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
jmp 0x1400dc7ca
mov r8d, 0x27e
lea rdx, str.CSimpleOrientationSensorEvents::GetAutoRotationStateFromReg
lea rcx, str._s__d_Open_registry_AutoOrientation_fail_
call fcn.140075db0
mov eax, dword [rsp + 0x40]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.1400f4410
add rsp, 0x60
pop rdi
ret