Function at 0x140012020
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0x90
mov qword [rbp + 0x17], 0xfffffffffffffffe
mov qword [rsp + 0xd0], rbx
mov r12d, r8d
mov esi, edx
mov rdi, rcx
call fcn.140010350
cmp esi, 0xffffffff
jne 0x140012060
mov esi, dword [rdi + 0xda8]
lea rcx, section..data
mov rax, qword [section..data]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rbp + 7], rax
mov r8d, esi
lea rdx, str.SoundModeOnOutput_d
lea rcx, [rbp + 7]
call fcn.140016a40
xor r15d, r15d
mov rbx, qword [rbp + 7]
cmp r12d, 0xffffffff
jne 0x1400120f1
mov eax, dword [rdi + 0xdac]
mov dword [rbp + 0x6f], eax
mov dword [rbp + 0x7f], 4
lea rax, [rbp + 0x7f]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x6f]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0xf]
xor r8d, r8d
mov rdx, rbx
mov rcx, qword [rdi + 0xc18]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ecx, r15d
test eax, eax
sete cl
test ecx, ecx
je 0x1400120e4
mov r12d, dword [rbp + 0x6f]
jmp 0x1400120f1
mov edx, esi
mov rcx, rdi
call fcn.140011f60
mov r12d, eax
xor r13b, r13b
test esi, esi
js 0x1400122c9
test r12d, r12d
js 0x1400122c9
mov r9d, 1
mov r8d, r12d
mov edx, esi
mov rcx, rdi
call fcn.140013b20
mov r14, rax
test rax, rax
je 0x140012355
mov dword [rbp - 0x29], r15d
mov dword [rbp - 1], 4
lea rax, [rbp - 1]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x29]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x13]
xor r8d, r8d
lea rdx, str.Type
mov rcx, qword [r14 + 8]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
sete r15b
test r15d, r15d
jne 0x1400121a5
lea rcx, [rdi + 0xcb8]
mov r8d, r12d
mov edx, esi
call fcn.14001c330
test eax, eax
je 0x1400121a5
mov dword [rbp - 0x11], eax
mov dword [rsp + 0x28], 4
lea rax, [rbp - 0x11]
mov qword [rsp + 0x20], rax
lea r9d, [r15 + 4]
xor r8d, r8d
lea rdx, str.Type
mov rcx, qword [r14 + 8]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
cmp dword [rdi + 0xda8], esi
setne r13b
mov dword [rdi + 0xda8], esi
mov dword [rdi + 0xdac], r12d
mov eax, dword [rdi + 0xc60]
cmp eax, 9
je 0x1400121d1
cmp eax, 6
je 0x1400121d1
xor sil, sil
jmp 0x1400121d4
mov sil, 1
mov dword [rbp - 0x19], r12d
mov dword [rsp + 0x28], 4
lea rax, [rbp - 0x19]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
mov rdx, rbx
mov rcx, qword [rdi + 0xc18]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov r11d, dword [rdi + 0xda8]
mov dword [rbp - 9], r11d
mov dword [rsp + 0x28], 4
lea rax, [rbp - 9]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
lea rdx, str.ActiveOutputMode
mov rcx, qword [rdi + 0xc18]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov r11d, dword [rdi + 0xdac]
mov dword [rbp - 0x39], r11d
mov dword [rsp + 0x28], 4
lea rax, [rbp - 0x39]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
lea rdx, str.ActiveSoundMode
mov rcx, qword [rdi + 0xc18]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test r13b, r13b
je 0x14001228f
test sil, sil
jne 0x14001228f
mov rax, qword [rdi]
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [rax + 0x88]
xor r9d, r9d
mov r8, r14
xor edx, edx
mov rcx, rdi
call fcn.1400140f0
test r13b, r13b
je 0x140012352
test sil, sil
jne 0x140012352
mov rax, qword [rdi]
xor r8d, r8d
lea edx, [r8 + 1]
mov rcx, rdi
call qword [rax + 0x88]
jmp 0x140012352
cmp esi, 0xfffffffe
jne 0x14001230e
mov dword [rdi + 0xda8], 0xfffffffe
mov dword [rbp - 0x31], 0xfffffffe
mov dword [rsp + 0x28], 4
lea rax, [rbp - 0x31]
mov qword [rsp + 0x20], rax
lea r9d, [rsi + 6]
xor r8d, r8d
lea rdx, str.ActiveOutputMode
mov rcx, qword [rdi + 0xc18]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov r13b, 1
cmp r12d, 0xfffffffe
jne 0x140012355
mov dword [rdi + 0xdac], 0xfffffffe
mov dword [rbp - 0x21], 0xfffffffe
mov dword [rsp + 0x28], 4
lea rax, [rbp - 0x21]
mov qword [rsp + 0x20], rax
lea r9d, [r12 + 6]
xor r8d, r8d
lea rdx, str.ActiveSoundMode
mov rcx, qword [rdi + 0xc18]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov r13b, 1
lea rdx, [rbx - 0x18]
or ecx, 0xffffffff
lock xadd dword [rdx + 0x10], ecx
dec ecx
test ecx, ecx
jg 0x140012371
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [rVariantCopy + 8]
movzx eax, r13b
mov rbx, qword [rsp + 0xd0]
add rsp, 0x90
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret