Function at 0x14007d120
Capabilities:
Query or enumerate registry value

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
lea rbp, [rsp - 0x20]
sub rsp, 0x120
mov rax, qword [0x1400f5010]
xor rax, rsp
mov qword [rbp - 0x70], rax
lea rax, [rcx + 0xe0]
mov rbx, rcx
mov rcx, rax
mov qword [rsp + 0x40], rax
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_EnterCriticalSection]
xor esi, esi
mov dword [rsp + 0x70], 1
lea rax, [rsp + 0x60]
mov dword [rsp + 0x78], esi
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SOFTWAREMicrosoftWindowsCurrentVersionAutoRotation
mov rcx, 0xffffffff80000002
lea r9d, [rsi + 0x11]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
test eax, eax
jne 0x14007d207
mov rcx, qword [rsp + 0x60]
lea rax, [rsp + 0x7c]
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x74]
lea rax, [rsp + 0x70]
mov dword [rsp + 0x74], esi
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.Enable
mov dword [rsp + 0x7c], 4
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
mov rcx, qword [rsp + 0x60]
lea rax, [rsp + 0x7c]
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x74]
lea rax, [rsp + 0x78]
mov dword [rsp + 0x78], esi
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.LastOrientation
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov r12d, esi
mov edi, dword [rbx + 0x60]
mov qword [rsp + 0x158], r13
mov qword [rsp + 0x160], r14
mov qword [rsp + 0x168], r15
movaps xmmword [rsp + 0x110], xmm6
movaps xmmword [rsp + 0x100], xmm7
movaps xmmword [rsp + 0xf0], xmm8
movaps xmmword [rsp + 0xe0], xmm9
movaps xmmword [rsp + 0xd0], xmm10
movaps xmmword [rsp + 0xc0], xmm11
movaps xmmword [rsp + 0xb0], xmm12
movaps xmmword [rsp + 0xa0], xmm13
mov dword [rsp + 0x74], esi
mov dword [rsp + 0x7c], edi
cmp qword [rbx + 0x80], rsi
je 0x14007d663
mov edx, dword [rbx + 0x88]
mov ecx, esi
test edx, edx
je 0x14007d2a1
mov r8, qword [rbx + 0x78]
mov eax, ecx
mov r14, qword [r8 + rax*8]
test r14, r14
jne 0x14007d2ad
inc ecx
cmp ecx, edx
jb 0x14007d290
mov r14, rsi
test rsi, rsi
je 0x14007d663
movss xmm13, dword [0x1400cef90]
mov r15d, 0xffffffff
movss xmm11, dword [0x1400cefa4]
movss xmm12, dword [0x1400cf008]
mov r13d, dword [rsp + 0x70]
test r14, r14
je 0x14007d79b
mov rdi, qword [r14 + 0x18]
mov r10, r14
test rdi, rdi
jne 0x14007d31c
mov eax, dword [r14 + 0x20]
xor edx, edx
mov r9d, dword [rbx + 0x88]
mov rdi, rsi
div r9d
lea r8d, [rdx + 1]
nop
cmp r8d, r9d
jae 0x14007d31c
mov rax, qword [rbx + 0x78]
mov rdx, qword [rax + r8*8]
test rdx, rdx
cmovne rdi, rdx
inc r8d
test rdi, rdi
je 0x14007d300
mov esi, dword [r10 + 0x10]
mov r14, rdi
mov dword [rsp + 0x60], esi
test r13d, r13d
jne 0x14007d35f
mov eax, dword [rsp + 0x78]
test eax, eax
je 0x14007d35d
sub eax, 1
je 0x14007d356
sub eax, 1
je 0x14007d34f
cmp eax, 1
je 0x14007d348
mov esi, r15d
jmp 0x14007d35f
mov esi, 1
jmp 0x14007d35f
mov esi, 2
jmp 0x14007d35f
mov esi, 3
jmp 0x14007d35f
xor esi, esi
call fcn.140009760
test byte [rax + 0x14c], 0x80
je 0x14007d3b7
cmp esi, 3
jbe 0x14007d37f
xor esi, esi
cmp dword [rbx + 0x60], 0xff
cmovne esi, dword [rbx + 0x60]
mov dword [rbx + 0x60], esi
cmp dword [rsp + 0x7c], esi
je 0x14007d3e6
call fcn.14007cfb0
mov r9d, eax
mov dword [rbx + 0x50], eax
mov r8d, r13d
lea rcx, str.CSimpleOrientationSensorEvents::UpdateOrientation_3__Orientation_d__AutoRotationState_d_m_bAlwaysZeroDegree_d_n
mov edx, esi
call fcn.14003f0e0
cmp dword [rbx + 0x50], 0
mov edx, esi
mov eax, 0
cmovne edx, eax
xor r8d, r8d
jmp 0x14007d3e1
call fcn.14007cfb0
mov r8d, r13d
mov dword [rbx + 0x50], eax
mov edx, esi
lea rcx, str.CSimpleOrientationSensorEvents::UpdateOrientation_4__Orientation_d__AutoRotationState_d__n
call fcn.14003f0e0
cmp dword [rbx + 0x50], 0
mov edx, esi
mov eax, 0
mov r8d, r12d
cmovne edx, eax
call fcn.14007da20
cmp dword [rbx + 0x50], 0
mov eax, 0
mov r8d, r12d
cmovne esi, eax
mov edx, esi
call fcn.14007d060
cmp dword [0x1400f9b58], 0
je 0x14007d64b
cmp dword [rbx + 0xdc], 0
je 0x14007d64b
cmp dword [rbx + 0xc0], 4
jb 0x14007d641
mov rax, qword [rbx + 0xc8]
movaps xmm1, xmm13
movss xmm7, dword [rax]
movss xmm8, dword [rax + 4]
movss xmm9, dword [rax + 8]
movaps xmm6, xmm8
movss xmm10, dword [rax + 0xc]
movaps xmm2, xmm9
mulss xmm2, xmm8
movaps xmm0, xmm10
mulss xmm0, xmm7
mulss xmm6, xmm8
addss xmm2, xmm0
movaps xmm0, xmm7
mulss xmm0, xmm7
addss xmm0, xmm6
addss xmm2, xmm2
addss xmm0, xmm0
subss xmm1, xmm0
movaps xmm0, xmm2
call sub.api_ms_win_crt_math_l1_1_0.dll_atan2f
divss xmm0, xmm11
mov eax, 0x88888889
movaps xmm1, xmm10
mulss xmm0, xmm12
mulss xmm1, xmm8
cvttss2si ecx, xmm0
movaps xmm0, xmm9
imul ecx
mulss xmm0, xmm7
subss xmm1, xmm0
lea r13d, [rcx + rdx]
addss xmm1, xmm1
sar r13d, 3
mov eax, r13d
shr eax, 0x1f
add r13d, eax
movaps xmm0, xmm1
call sub.api_ms_win_crt_math_l1_1_0.dll_asinf
mulss xmm10, xmm9
mov eax, 0x88888889
divss xmm0, xmm11
mulss xmm9, xmm9
movaps xmm1, xmm13
mulss xmm0, xmm12
mulss xmm8, xmm7
addss xmm9, xmm6
cvttss2si ecx, xmm0
addss xmm10, xmm8
imul ecx
addss xmm9, xmm9
addss xmm10, xmm10
subss xmm1, xmm9
lea esi, [rcx + rdx]
movaps xmm0, xmm10
sar esi, 3
mov eax, esi
shr eax, 0x1f
add esi, eax
call sub.api_ms_win_crt_math_l1_1_0.dll_atan2f
divss xmm0, xmm11
mov eax, 0x88888889
mulss xmm0, xmm12
cvttss2si ecx, xmm0
imul ecx
lea r12d, [rcx + rdx]
sar r12d, 3
mov eax, r12d
shr eax, 0x1f
add r12d, eax
cmp r13d, dword [rbx + 0xd0]
jne 0x14007d563
cmp esi, dword [rbx + 0xd4]
jne 0x14007d563
cmp r12d, dword [rbx + 0xd8]
je 0x14007d623
cmp dword [0x1400fad88], 0
mov eax, dword [rsp + 0x60]
mov dword [rbp - 0x80], eax
mov dword [rbp - 0x7c], r13d
mov dword [rbp - 0x78], esi
mov dword [rbp - 0x74], r12d
jle 0x14007d5ab
movups xmm0, xmmword [0x1400a9190]
mov edx, 0x41
mov dword [rsp + 0x20], SafeArrayUnaccessData
lea r9, [rbp - 0x80]
lea rcx, [rsp + 0x60]
movaps xmmword [rsp + 0x60], xmm0
lea r8d, [rdx - 0x40]
call fcn.140063a60
jmp 0x14007d623
xor eax, eax
mov dword [rsp + 0x60], eax
mov eax, dword [0x1400fad58]
test eax, eax
jg 0x14007d5d6
mov r8d, 0x362
lea rdx, str.CDriverPropertyClient::KsProperty
lea rcx, str._s__d_RETURN_FALSE_ON_FALSE
call fcn.14003f0e0
jmp 0x14007d623
movups xmm0, xmmword [0x1400a9190]
movaps xmmword [rsp + 0x50], xmm0
test eax, eax
jle 0x14007d7a6
mov rcx, qword [0x1400fad50]
lea rax, [rsp + 0x60]
mov qword [rsp + 0x30], rax
lea rdx, [rsp + 0x50]
mov r9d, 1
mov dword [rsp + 0x28], SafeArrayUnaccessData
lea rax, [rbp - 0x80]
mov rcx, qword [rcx]
mov qword [rsp + 0x20], rax
lea r8d, [r9 + 0x40]
call fcn.140064260
mov dword [rbx + 0xd0], r13d
mov r13d, dword [rsp + 0x70]
mov dword [rbx + 0xd8], r12d
mov r12d, dword [rsp + 0x74]
mov dword [rbx + 0xd4], esi
xor esi, esi
mov dword [rbx + 0xdc], esi
jmp 0x14007d64d
xor esi, esi
inc r12d
mov dword [rsp + 0x74], r12d
test rdi, rdi
jne 0x14007d2d3
jmp 0x14007d716
mov eax, dword [rsp + 0x78]
test eax, eax
je 0x14007d69a
sub eax, 1
je 0x14007d692
sub eax, 1
je 0x14007d68a
cmp eax, 1
je 0x14007d682
mov r15d, 0xffffffff
jmp 0x14007d69d
mov r15d, 1
jmp 0x14007d69d
mov r15d, 2
jmp 0x14007d69d
mov r15d, 3
jmp 0x14007d69d
mov r15d, esi
call fcn.140009760
test byte [rax + 0x14c], 0x80
je 0x14007d6d7
cmp r15d, 3
jbe 0x14007d6c0
cmp dword [rbx + 0x60], 0xff
mov r15d, esi
cmovne r15d, dword [rbx + 0x60]
mov dword [rbx + 0x60], r15d
cmp edi, r15d
je 0x14007d704
call fcn.14007cfb0
lea rcx, str.CSimpleOrientationSensorEvents::UpdateOrientation_1__Orientation_d__AutoRotationState_d__n
jmp 0x14007d6e3
call fcn.14007cfb0
lea rcx, str.CSimpleOrientationSensorEvents::UpdateOrientation_2__Orientation_d__AutoRotationState_d__n
mov r8d, dword [rsp + 0x70]
mov edx, r15d
mov dword [rbx + 0x50], eax
call fcn.14003f0e0
cmp dword [rbx + 0x50], esi
mov edx, r15d
cmovne edx, esi
xor r8d, r8d
call fcn.14007da20
cmp dword [rbx + 0x50], esi
cmovne r15d, esi
xor r8d, r8d
mov edx, r15d
call fcn.14007d060
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_LeaveCriticalSection]
movaps xmm13, xmmword [rsp + 0xa0]
xor eax, eax
movaps xmm12, xmmword [rsp + 0xb0]
movaps xmm11, xmmword [rsp + 0xc0]
movaps xmm10, xmmword [rsp + 0xd0]
movaps xmm9, xmmword [rsp + 0xe0]
movaps xmm8, xmmword [rsp + 0xf0]
movaps xmm7, xmmword [rsp + 0x100]
movaps xmm6, xmmword [rsp + 0x110]
mov r15, qword [rsp + 0x168]
mov r14, qword [rsp + 0x160]
mov r13, qword [rsp + 0x158]
mov rcx, qword [rbp - 0x70]
xor rcx, rsp
call fcn.14008ade0
add rsp, 0x120
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov ecx, 0x80004005
call fcn.140003700
int3
mov edx, 1
mov ecx, 0xc000008c
call fcn.140011430
int3