Function at 0x408d00
Capabilities:
Query or enumerate registry value
Resolve function by parsing pe exports
Set registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x54
mov eax, dword [0x43400c]
xor eax, esp
mov dword [esp + 0x50], eax
push ebx
mov ebx, ecx
push esi
push edi
lea eax, [ebx + 0x84]
push eax
mov dword [esp + 0x4c], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [esp + 0xc]
mov dword [esp + 0x24], 0
push eax
push 0x11
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionAutoRotation
mov edi, 1
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x24], edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x408db4
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x14]
mov dword [esp + 0x24], 4
push eax
lea eax, [esp + 0x24]
push eax
push 0
push str.Enable
push dword [esp + 0x20]
call esi
lea eax, [esp + 0x20]
mov dword [esp + 0x24], 0
push eax
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x24]
push eax
push 0
push str.LastOrientation
push dword [esp + 0x20]
call esi
push dword [esp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [ebx + 0x2c]
xor eax, eax
cmp dword [esp + 0x10], eax
mov dword [esp + 0xc], eax
cmovne edi, eax
mov dword [esp + 0x34], edx
mov dword [esp + 0x38], edi
cmp dword [ebx + 0x40], eax
je 0x4091b3
mov esi, dword [ebx + 0x44]
xor edx, edx
test esi, esi
je 0x408def
mov ecx, dword [ebx + 0x3c]
mov eax, dword [ecx]
test eax, eax
jne 0x408e08
inc edx
add ecx, 4
cmp edx, esi
jb 0x408de1
xor eax, eax
test eax, eax
je 0x4091af
nop dword [eax]
test eax, eax
je 0x40927f
mov edi, dword [eax + 0x14]
mov esi, eax
test edi, edi
jne 0x408e34
mov eax, dword [eax + 0x18]
xor edx, edx
mov ecx, dword [ebx + 0x44]
div ecx
inc edx
nop dword [eax]
cmp edx, ecx
jae 0x408e34
mov eax, dword [ebx + 0x3c]
mov eax, dword [eax + edx*4]
test eax, eax
cmovne edi, eax
inc edx
test edi, edi
je 0x408e20
cmp dword [esp + 0x38], 0
mov esi, dword [esi + 0x10]
mov dword [esp + 0x30], edi
mov dword [esp + 0x44], esi
je 0x408e72
mov eax, dword [esp + 0x24]
cmp eax, 3
ja case.default.0x408e4f
jmp dword [eax*4 + 0x40928c]
xor esi, esi
jmp 0x408e72
mov esi, 3
jmp 0x408e72
mov esi, 2
jmp 0x408e72
mov esi, 1
jmp 0x408e72
or esi, 0xffffffff
mov ecx, dword [ebx + 0x34]
test byte [ecx + 0x170], 0x80
je 0x408ead
cmp esi, 3
jbe 0x408e90
xor esi, esi
cmp dword [ebx + 0x2c], 0xff
cmovne esi, dword [ebx + 0x2c]
mov dword [ebx + 0x2c], esi
cmp dword [esp + 0x34], esi
je 0x408ef8
xor edx, edx
movzx eax, si
cmp dword [ebx + 0x24], edx
cmovne eax, edx
movzx eax, ax
mov dword [esp + 0x10], eax
jmp 0x408ece
xor ecx, ecx
movzx eax, si
cmp dword [ebx + 0x24], ecx
cmovne eax, ecx
movzx ecx, ax
mov eax, dword [esp + 0xc]
movzx eax, ax
shl eax, 0x10
or ecx, eax
mov dword [esp + 0x10], ecx
mov ecx, dword [ebx + 0x34]
movups xmm0, xmmword [str._alsC]
mov ecx, dword [ecx + 4]
sub esp, 0x10
mov eax, esp
mov edx, 0x3b
push 0
movups xmmword [eax], xmm0
push 4
lea eax, [esp + 0x28]
push eax
push 1
call fcn.004017a0
add esp, 0x20
mov eax, dword [esp + 0xc]
mov dword [esp + 0x1c], eax
xor eax, eax
cmp dword [ebx + 0x24], eax
cmovne esi, eax
lea eax, [esp + 0x20]
push eax
push 0xf003f
push 0
push str.SOFTWARERealtekRealtekEffectsAP
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x24], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x408f68
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea eax, [esp + 0x10]
push 4
push eax
push 4
push 0
push str.AutoRotationState
push dword [esp + 0x34]
call esi
push 4
lea eax, [esp + 0x20]
push eax
push 4
push 0
push str.SensorIndex
push dword [esp + 0x34]
call esi
push dword [esp + 0x20]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [0x436060], 0
je 0x40919a
cmp dword [ebx + 0x80], 0
je 0x40919a
cmp dword [ebx + 0x6c], 4
jb 0x409190
mov esi, dword [ebx + 0x70]
movss xmm0, dword [esi + 8]
movss xmm3, dword [esi]
movaps xmm2, xmm0
movss xmm1, dword [esi + 4]
movss dword [esp + 0x3c], xmm0
movss xmm0, dword [esi + 0xc]
mulss xmm0, xmm3
mulss xmm2, xmm1
movss dword [esp + 0x40], xmm3
addss xmm2, xmm0
movaps xmm0, xmm1
mulss xmm0, xmm1
movaps xmm1, xmm3
mulss xmm1, xmm3
addss xmm2, xmm2
movss dword [esp + 0x28], xmm0
addss xmm1, xmm0
cvtps2pd xmm0, xmm2
addss xmm1, xmm1
movsd qword [esp + 0x10], xmm0
movss xmm0, dword [0x42ef68]
fld qword [esp + 0x10]
subss xmm0, xmm1
cvtps2pd xmm0, xmm0
movsd qword [esp + 0x10], xmm0
fld qword [esp + 0x10]
call fcn.00424fe0
fstp qword [esp + 0x10]
movsd xmm0, qword [esp + 0x10]
mov eax, 0x88888889
cvtpd2ps xmm0, xmm0
movss xmm1, dword [esi + 0xc]
divss xmm0, dword [0x42ef6c]
mulss xmm1, dword [esi + 4]
mulss xmm0, dword [0x42ef74]
cvttss2si ecx, xmm0
movss xmm0, dword [esi + 8]
mulss xmm0, dword [esi]
imul ecx
subss xmm1, xmm0
add edx, ecx
addss xmm1, xmm1
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x1c], eax
cvtps2pd xmm0, xmm1
call fcn.00424ff0
cvtsd2ss xmm0, xmm0
mov eax, 0x88888889
movss xmm2, dword [esp + 0x3c]
divss xmm0, dword [0x42ef6c]
movss xmm1, dword [esi + 0xc]
mulss xmm0, dword [0x42ef74]
mulss xmm1, xmm2
cvttss2si ecx, xmm0
movss xmm0, dword [esi + 4]
mulss xmm0, dword [esp + 0x40]
mulss xmm2, xmm2
addss xmm1, xmm0
imul ecx
addss xmm2, dword [esp + 0x28]
addss xmm1, xmm1
addss xmm2, xmm2
add edx, ecx
sar edx, 3
mov eax, edx
cvtps2pd xmm0, xmm1
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x10], eax
movsd qword [esp + 0x28], xmm0
movss xmm0, dword [0x42ef68]
fld qword [esp + 0x28]
subss xmm0, xmm2
cvtps2pd xmm0, xmm0
movsd qword [esp + 0x28], xmm0
fld qword [esp + 0x28]
call fcn.00424fe0
fstp qword [esp + 0x28]
movsd xmm0, qword [esp + 0x28]
mov eax, 0x88888889
cvtpd2ps xmm0, xmm0
mov esi, dword [esp + 0x10]
divss xmm0, dword [0x42ef6c]
mulss xmm0, dword [0x42ef74]
cvttss2si ecx, xmm0
imul ecx
add edx, ecx
mov ecx, dword [esp + 0x1c]
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x28], eax
cmp ecx, dword [ebx + 0x74]
jne 0x40913e
cmp esi, dword [ebx + 0x78]
jne 0x40913e
cmp eax, dword [ebx + 0x7c]
je 0x409187
movups xmm0, xmmword [str._alsC]
mov edx, dword [esp + 0x44]
sub esp, 0x10
mov dword [esp + 0x68], eax
mov eax, esp
mov dword [esp + 0x60], ecx
mov ecx, dword [ebx + 0x34]
push 0
movups xmmword [eax], xmm0
push 0x10
mov ecx, dword [ecx + 4]
lea eax, [esp + 0x64]
push eax
mov dword [esp + 0x68], edx
mov edx, 0x41
push 1
mov dword [esp + 0x74], esi
call fcn.004017a0
mov eax, dword [esp + 0x48]
add esp, 0x20
mov ecx, dword [esp + 0x1c]
mov dword [ebx + 0x74], ecx
mov dword [ebx + 0x78], esi
mov dword [ebx + 0x7c], eax
mov dword [ebx + 0x80], 0
inc dword [esp + 0xc]
mov eax, dword [esp + 0x30]
test edi, edi
jne 0x408e00
jmp 0x409261
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x24]
cmp eax, 3
ja case.default.0x4091bc
jmp dword [eax*4 + 0x40929c]
xor esi, esi
jmp 0x4091df
mov esi, 3
jmp 0x4091df
mov esi, 2
jmp 0x4091df
mov esi, 1
jmp 0x4091df
or esi, 0xffffffff
mov ecx, dword [ebx + 0x34]
test byte [ecx + 0x170], 0x80
je 0x409216
cmp esi, 3
jbe 0x4091fb
xor esi, esi
cmp edx, 0xff
cmovne esi, edx
mov eax, esi
mov dword [ebx + 0x2c], eax
cmp edx, esi
je 0x409251
xor edx, edx
cmp dword [ebx + 0x24], edx
push 0
cmovne eax, edx
push eax
call fcn.0040d200
jmp 0x409251
movups xmm0, xmmword [str._alsC]
mov ecx, dword [ecx + 4]
xor edx, edx
cmp dword [ebx + 0x24], edx
movzx eax, si
cmovne eax, edx
sub esp, 0x10
movzx eax, ax
mov dword [esp + 0x40], eax
mov eax, esp
push edx
push 4
movups xmmword [eax], xmm0
lea eax, [esp + 0x48]
mov edx, 0x3b
push eax
push 1
call fcn.004017a0
add esp, 0x20
xor eax, eax
cmp dword [ebx + 0x24], eax
push 0
cmovne esi, eax
push esi
call fcn.00408c90
push dword [esp + 0x48]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0x5c]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040f45f
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00401510
nop dword [eax]
push esi
mov es, word [eax]
pop edx
mov es, word [eax]
popal
mov es, word [eax]
push 0xc300408e
xchg ecx, eax
inc eax
add bh, al
xchg ecx, eax
inc eax
add dh, cl
xchg ecx, eax
inc eax
add ch, dl
xchg ecx, eax
inc eax
add ah, cl
int3