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

Disassembly:
mov rax, rsp
push rbp
push r14
push r15
lea rbp, [rax - 0x1b8]
sub rsp, 0x2a0
mov qword [rbp - 0x80], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov rax, qword [0x1403b88b0]
xor rax, rsp
mov qword [rbp + 0x190], rax
mov rax, qword [rcx + 0x98]
test byte [rax + 0x1a0], 8
je 0x140021948
xor r15d, r15d
mov qword [rsp + 0x58], r15
mov dword [rsp + 0x60], r15d
mov qword [rsp + 0x68], r15
mov r9d, 0x20019
lea r8, str.SoftwareRealtekAudioGUI_INFORMATIONDeviceDefault
mov rdx, 0xffffffff80000002
lea rcx, [rsp + 0x58]
call fcn.1400146e0
test eax, eax
je 0x1400216e0
mov qword [rsp + 0x38], r15
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x2001f
mov dword [rsp + 0x20], r15d
xor r9d, r9d
lea r8, str.SoftwareRealtekAudioGUI_INFORMATIONDeviceDefault
mov rdx, 0xffffffff80000002
lea rcx, [rsp + 0x58]
call fcn.1400144b0
test eax, eax
je 0x1400216c6
lea r8, str.c:userschunyung_source_repos_rtkngui_rtkngui_audiodevicemgr.cpp
mov edx, 0x758
lea rcx, str._VCpl__RETURN_ON_FALSE:_Line___d__File___s_n
call fcn.140052e90
jmp 0x140021938
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x1400216db
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov qword [rsp + 0x58], r15
mov dword [rsp + 0x60], r15d
mov r9d, 0x2001f
lea r8, str.SoftwareRealtekAudioGUI_INFORMATIONDeviceDefault
mov rdx, 0xffffffff80000002
lea rcx, [rsp + 0x58]
call fcn.1400146e0
test eax, eax
jne 0x140021938
call fcn.1400f5f94
mov rcx, rax
test rax, rax
je 0x140021c0e
mov rax, qword [rax]
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x40], rbx
xor edx, edx
mov r8d, 0x200
lea rcx, [rbp - 0x70]
call fcn.1402841a0
mov dword [rsp + 0x48], 0x200
mov esi, r15d
lea rax, [rsp + 0x48]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x70]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x70]
xor r8d, r8d
lea rdx, str.DefaultPlaybackDevice
mov r14, qword [rsp + 0x58]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov rdi, 0xffffffffffffffff
test eax, eax
jne 0x140021974
mov eax, dword [rsp + 0x70]
dec eax
cmp eax, 1
ja 0x1400217a9
mov ecx, dword [rsp + 0x48]
test ecx, ecx
je 0x1400217a5
test cl, 1
jne 0x1400217a9
mov eax, ecx
shr rax, 1
cmp word [rbp + rax*2 - 0x72], si
jne 0x1400217a9
mov esi, ecx
shr esi, 1
xor edx, edx
mov r8d, 0x200
lea rcx, [rbp - 0x70]
call fcn.1402841a0
lea eax, [rsi + rsi]
mov dword [rsp + 0x4c], eax
mov esi, r15d
lea rax, [rsp + 0x4c]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x70]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x74]
xor r8d, r8d
lea rdx, str.DefaultCaptureDevice
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140021a1e
mov eax, dword [rsp + 0x74]
dec eax
cmp eax, 1
ja 0x140021823
mov ecx, dword [rsp + 0x4c]
test ecx, ecx
je 0x140021a10
test cl, 1
jne 0x140021823
mov eax, ecx
shr rax, 1
cmp word [rbp + rax*2 - 0x72], si
je 0x140021a15
call fcn.140033a90
test eax, eax
je 0x140021908
xor edx, edx
mov r8d, 0x200
lea rcx, [rbp - 0x70]
call fcn.1402841a0
lea eax, [rsi + rsi]
mov dword [rsp + 0x50], eax
mov esi, r15d
lea rax, [rsp + 0x50]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x70]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x78]
xor r8d, r8d
lea rdx, str.DefaultCommPlaybackDevice
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140021abf
mov eax, dword [rsp + 0x78]
dec eax
cmp eax, 1
ja 0x1400218a6
mov ecx, dword [rsp + 0x50]
test ecx, ecx
je 0x1400218a2
test cl, 1
jne 0x1400218a6
mov eax, ecx
shr rax, 1
cmp word [rbp + rax*2 - 0x72], si
jne 0x1400218a6
mov esi, ecx
shr esi, 1
xor edx, edx
mov r8d, 0x200
lea rcx, [rbp - 0x70]
call fcn.1402841a0
lea eax, [rsi + rsi]
mov dword [rsp + 0x54], eax
lea rax, [rsp + 0x54]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x70]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x7c]
xor r8d, r8d
lea rdx, str.DefaultCommCaptureDevice
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140021b5f
mov eax, dword [rsp + 0x7c]
dec eax
cmp eax, 1
ja 0x140021908
cmp dword [rsp + 0x54], 0
jne 0x140021908
mov word [rbp - 0x70], r15w
test r14, r14
je 0x14002191b
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov qword [rsp + 0x58], r15
mov dword [rsp + 0x60], r15d
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], edi
sub edi, 1
jg 0x140021938
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x140021948
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rbp + 0x190]
xor rcx, rsp
call fcn.140281bf0
lea r11, [rsp + 0x2a0]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
cmp eax, 2
jne 0x1400217a9
lea r8, [rsp + 0x40]
lea edx, [rax - 1]
xor ecx, ecx
call fcn.140053280
mov rbx, qword [rsp + 0x40]
cmp dword [rbx - 8], 1
jle 0x1400219a9
mov edx, dword [rbx - 0x10]
lea rcx, [rsp + 0x40]
call fcn.14000da70
mov rbx, qword [rsp + 0x40]
test rbx, rbx
je 0x1400219e4
mov rax, rdi
lea rax, [rax + 1]
cmp word [rbx + rax*2], si
jne 0x1400219b1
lea eax, [rax*2 + 2]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rbx
mov r9d, 1
xor r8d, r8d
lea rdx, str.DefaultPlaybackDevice
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
movsxd rdx, dword [rbx - 0xc]
mov rcx, rbx
call fcn.140289b40
test eax, eax
js 0x140021c19
cmp eax, dword [rbx - 0xc]
jg 0x140021c19
mov dword [rbx - 0x10], eax
cdqe
mov word [rbx + rax*2], r15w
jmp 0x1400217a9
mov word [rbp - 0x70], r15w
mov esi, ecx
shr esi, 1
jmp 0x140021823
cmp eax, 2
jne 0x140021823
lea r8, [rsp + 0x40]
mov edx, 1
mov ecx, edx
call fcn.140053280
mov rbx, qword [rsp + 0x40]
cmp dword [rbx - 8], 1
jle 0x140021a55
mov edx, dword [rbx - 0x10]
lea rcx, [rsp + 0x40]
call fcn.14000da70
mov rbx, qword [rsp + 0x40]
test rbx, rbx
je 0x140021a93
mov rax, rdi
nop dword [rax]
lea rax, [rax + 1]
cmp word [rbx + rax*2], si
jne 0x140021a60
lea eax, [rax*2 + 2]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rbx
mov r9d, 1
xor r8d, r8d
lea rdx, str.DefaultCaptureDevice
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
movsxd rdx, dword [rbx - 0xc]
mov rcx, rbx
call fcn.140289b40
test eax, eax
js 0x140021c24
cmp eax, dword [rbx - 0xc]
jg 0x140021c24
mov dword [rbx - 0x10], eax
cdqe
mov word [rbx + rax*2], r15w
jmp 0x140021823
cmp eax, 2
jne 0x1400218a6
lea r8, [rsp + 0x40]
mov edx, eax
xor ecx, ecx
call fcn.140053280
mov rbx, qword [rsp + 0x40]
cmp dword [rbx - 8], 1
jle 0x140021af3
mov edx, dword [rbx - 0x10]
lea rcx, [rsp + 0x40]
call fcn.14000da70
mov rbx, qword [rsp + 0x40]
test rbx, rbx
je 0x140021b33
mov rax, rdi
nop dword [rax + rax]
lea rax, [rax + 1]
cmp word [rbx + rax*2], si
jne 0x140021b00
lea eax, [rax*2 + 2]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rbx
mov r9d, 1
xor r8d, r8d
lea rdx, str.DefaultCommPlaybackDevice
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
movsxd rdx, dword [rbx - 0xc]
mov rcx, rbx
call fcn.140289b40
test eax, eax
js 0x140021bf8
cmp eax, dword [rbx - 0xc]
jg 0x140021bf8
mov dword [rbx - 0x10], eax
cdqe
mov word [rbx + rax*2], r15w
jmp 0x1400218a6
cmp eax, 2
jne 0x140021908
lea r8, [rsp + 0x40]
mov edx, eax
lea ecx, [rax - 1]
call fcn.140053280
mov rbx, qword [rsp + 0x40]
cmp dword [rbx - 8], 1
jle 0x140021b94
mov edx, dword [rbx - 0x10]
lea rcx, [rsp + 0x40]
call fcn.14000da70
mov rbx, qword [rsp + 0x40]
test rbx, rbx
je 0x140021bd4
mov rax, rdi
nop dword [rax]
lea rax, [rax + 1]
cmp word [rbx + rax*2], 0
jne 0x140021ba0
lea eax, [rax*2 + 2]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rbx
mov r9d, 1
xor r8d, r8d
lea rdx, str.DefaultCommCaptureDevice
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
movsxd rdx, dword [rbx - 0xc]
mov rcx, rbx
call fcn.140289b40
test eax, eax
js 0x140021c03
cmp eax, dword [rbx - 0xc]
jg 0x140021c03
mov dword [rbx - 0x10], eax
cdqe
mov word [rbx + rax*2], r15w
jmp 0x140021908
mov ecx, 0x80070057
call fcn.14000dc70
int3
mov ecx, 0x80070057
call fcn.14000dc70
nop
mov ecx, 0x80004005
call fcn.14000dc70
nop
mov ecx, 0x80070057
call fcn.14000dc70
int3
mov ecx, 0x80070057
call fcn.14000dc70
int3