Function at 0x140022fc0
Capabilities:
Check os version
Query or enumerate registry value

Disassembly:
mov rax, rsp
push rbp
push r14
push r15
lea rbp, [rax - 0x1f8]
sub rsp, 0x2e0
mov qword [rbp - 0x70], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x1403d88e8]
xor rax, rsp
mov qword [rbp + 0x1d0], rax
mov rdi, rcx
mov rax, qword [rcx + 0x98]
test byte [rax + 0x1a0], 8
je 0x140023249
xor r15d, r15d
mov qword [rsp + 0x78], r15
mov dword [rbp - 0x80], r15d
mov qword [rbp - 0x78], r15
mov r9d, 0x20019
lea r8, str.SoftwareRealtekAudioGUI_INFORMATIONDeviceDefault
mov rdx, 0xffffffff80000002
lea rcx, [rsp + 0x78]
call fcn.140015610
test eax, eax
je 0x140023061
lea r8, str.AudioDeviceMgr.cpp
mov edx, 0x79c
lea rcx, str._VCpl__RETURN_ON_FALSE:_Line___d__File___s_n
call fcn.140055180
jmp 0x140023239
call fcn.1400f9930
mov rcx, rax
test rax, rax
je 0x140023808
mov rax, qword [rax]
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x30], rbx
mov edx, 0xa
lea rcx, [rbp - 0x68]
call fcn.140109aa8
nop
mov rdi, qword [rdi + 0xf48]
test rdi, rdi
je 0x1400230cd
nop dword [rax]
mov rdx, rdi
test rdi, rdi
je 0x140023813
mov rdi, qword [rdi]
mov rdx, qword [rdx + 0x10]
test rdx, rdx
je 0x1400230c8
add rdx, 0x118
lea rcx, [rbp - 0x68]
call fcn.140109bac
test rdi, rdi
jne 0x1400230a0
xor edx, edx
mov r8d, 0x200
lea rcx, [rbp - 0x30]
call fcn.14029ff20
mov dword [rsp + 0x38], 0x200
mov edi, r15d
lea rax, [rsp + 0x38]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x30]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x68]
xor r8d, r8d
lea rdx, str.DefaultPlaybackDevice
mov r14, qword [rsp + 0x78]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
or rsi, 0xffffffffffffffff
test eax, eax
jne 0x14002314d
mov eax, dword [rsp + 0x68]
dec eax
cmp eax, 1
ja 0x14002314d
mov ecx, dword [rsp + 0x38]
test ecx, ecx
je 0x140023275
test cl, 1
jne 0x14002314d
mov eax, ecx
shr rax, 1
cmp word [rbp + rax*2 - 0x32], di
je 0x14002327a
xor edx, edx
mov r8d, 0x200
lea rcx, [rbp - 0x30]
call fcn.14029ff20
lea eax, [rdi + rdi]
mov dword [rsp + 0x3c], eax
mov edi, r15d
lea rax, [rsp + 0x3c]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x30]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x6c]
xor r8d, r8d
lea rdx, str.DefaultCaptureDevice
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1400231c3
mov eax, dword [rsp + 0x6c]
dec eax
cmp eax, 1
ja 0x1400231c3
mov ecx, dword [rsp + 0x3c]
test ecx, ecx
je 0x14002339f
test cl, 1
jne 0x1400231c3
mov eax, ecx
shr rax, 1
cmp word [rbp + rax*2 - 0x32], di
je 0x1400233a4
mov eax, dword [0x1403ff444]
test eax, eax
jne 0x1400231ea
mov dword [0x1403ff440], 0x114
lea rcx, [0x1403ff440]
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
mov eax, dword [0x1403ff444]
cmp eax, 6
jne 0x1400234cf
cmp dword [0x1403ff448], 1
jae 0x1400234d5
test r14, r14
je 0x140023213
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov qword [rsp + 0x78], r15
mov dword [rbp - 0x80], r15d
lea rcx, [rbp - 0x68]
call fcn.140109ad0
nop
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], esi
sub esi, 1
jg 0x140023239
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x140023249
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rbp + 0x1d0]
xor rcx, rsp
call fcn.14029d880
lea r11, [rsp + 0x2e0]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
mov word [rbp - 0x30], r15w
mov edi, ecx
shr edi, 1
lea r8, [rsp + 0x30]
mov edx, 1
xor ecx, ecx
call fcn.140055570
mov rbx, qword [rsp + 0x30]
mov rax, rbx
lea rdx, [rbp - 0x30]
sub rdx, rbx
nop
movzx ecx, word [rax]
cmp cx, word [rax + rdx]
jne 0x1400232b7
add rax, 2
test cx, cx
jne 0x1400232a0
mov eax, r15d
jmp 0x1400232bc
sbb eax, eax
or eax, 1
test eax, eax
je 0x140023373
lea rcx, [rbp - 0x30]
mov rax, rsi
nop dword [rax + rax]
inc rax
cmp word [rcx + rax*2], 0
jne 0x1400232d0
mov r8d, eax
lea rdx, [rbp - 0x30]
lea rcx, [rsp + 0x30]
call fcn.1400105e0
xor r8d, r8d
mov rbx, qword [rsp + 0x30]
mov rdx, rbx
lea rcx, [rbp - 0x68]
call fcn.140109cd4
test rax, rax
je 0x140023373
mov qword [rsp + 0x48], r15
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
lea r9, [0x1403402b8]
xor edx, edx
lea r8d, [rdx + 1]
lea rcx, [0x1403402c8]
call qword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jns 0x14002334e
mov r9d, eax
lea r8, str.DefDevSetting.cpp
mov edx, 0x4c
lea rcx, str._VCpl__RETURN_FALSE_ON_ERROR:_Line___d__File___s__hr__0x_X_n
call fcn.140055180
jmp 0x140023363
mov rcx, qword [rsp + 0x48]
mov rax, qword [rcx]
mov r8d, 1
mov rdx, rbx
call qword [rax + 0x60]
nop
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x140023373
mov rax, qword [rcx]
call qword [rax + 0x10]
movsxd rdx, dword [rbx - 0xc]
mov rcx, rbx
call fcn.1402a58a8
test eax, eax
js 0x140023819
cmp eax, dword [rbx - 0xc]
jg 0x140023819
mov dword [rbx - 0x10], eax
cdqe
mov word [rbx + rax*2], r15w
jmp 0x14002314d
mov word [rbp - 0x30], r15w
mov edi, ecx
shr edi, 1
lea r8, [rsp + 0x30]
mov edx, 1
mov ecx, edx
call fcn.140055570
mov rbx, qword [rsp + 0x30]
mov rax, rbx
lea rdx, [rbp - 0x30]
sub rdx, rbx
nop dword [rax + rax]
movzx ecx, word [rax]
cmp cx, word [rax + rdx]
jne 0x1400233e7
add rax, 2
test cx, cx
jne 0x1400233d0
mov eax, r15d
jmp 0x1400233ec
sbb eax, eax
or eax, 1
test eax, eax
je 0x1400234a3
lea rcx, [rbp - 0x30]
mov rax, rsi
nop dword [rax + rax]
inc rax
cmp word [rcx + rax*2], 0
jne 0x140023400
mov r8d, eax
lea rdx, [rbp - 0x30]
lea rcx, [rsp + 0x30]
call fcn.1400105e0
xor r8d, r8d
mov rbx, qword [rsp + 0x30]
mov rdx, rbx
lea rcx, [rbp - 0x68]
call fcn.140109cd4
test rax, rax
je 0x1400234a3
mov qword [rsp + 0x50], r15
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
lea r9, [0x1403402b8]
xor edx, edx
lea r8d, [rdx + 1]
lea rcx, [0x1403402c8]
call qword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jns 0x14002347e
mov r9d, eax
lea r8, str.DefDevSetting.cpp
mov edx, 0x4c
lea rcx, str._VCpl__RETURN_FALSE_ON_ERROR:_Line___d__File___s__hr__0x_X_n
call fcn.140055180
jmp 0x140023493
mov rcx, qword [rsp + 0x50]
mov rax, qword [rcx]
mov r8d, 1
mov rdx, rbx
call qword [rax + 0x60]
nop
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x1400234a3
mov rax, qword [rcx]
call qword [rax + 0x10]
movsxd rdx, dword [rbx - 0xc]
mov rcx, rbx
call fcn.1402a58a8
test eax, eax
js 0x140023824
cmp eax, dword [rbx - 0xc]
jg 0x140023824
mov dword [rbx - 0x10], eax
cdqe
mov word [rbx + rax*2], r15w
jmp 0x1400231c3
jbe 0x140023200
xor edx, edx
mov r8d, 0x200
lea rcx, [rbp - 0x30]
call fcn.14029ff20
lea eax, [rdi + rdi]
mov dword [rsp + 0x40], eax
mov edi, r15d
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x30]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x70]
xor r8d, r8d
lea rdx, str.DefaultCommPlaybackDevice
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x14002354b
mov eax, dword [rsp + 0x70]
dec eax
cmp eax, 1
ja 0x14002354b
mov ecx, dword [rsp + 0x40]
test ecx, ecx
je 0x1400235cd
test cl, 1
jne 0x14002354b
mov eax, ecx
shr rax, 1
cmp word [rbp + rax*2 - 0x32], di
je 0x1400235d2
xor edx, edx
mov r8d, 0x200
lea rcx, [rbp - 0x30]
call fcn.14029ff20
lea eax, [rdi + rdi]
mov dword [rsp + 0x44], eax
lea rax, [rsp + 0x44]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x30]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x74]
xor r8d, r8d
lea rdx, str.DefaultCommCaptureDevice
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140023200
mov eax, dword [rsp + 0x74]
dec eax
cmp eax, 1
ja 0x140023200
mov eax, dword [rsp + 0x44]
test eax, eax
je 0x1400236f0
test al, 1
jne 0x140023200
shr rax, 1
cmp word [rbp + rax*2 - 0x32], 0
je 0x1400236f5
jmp 0x140023200
mov word [rbp - 0x30], r15w
mov edi, ecx
shr edi, 1
lea r8, [rsp + 0x30]
mov edx, 2
xor ecx, ecx
call fcn.140055570
mov rbx, qword [rsp + 0x30]
mov rax, rbx
lea rdx, [rbp - 0x30]
sub rdx, rbx
movzx ecx, word [rax]
cmp cx, word [rax + rdx]
jne 0x14002360d
add rax, 2
test cx, cx
jne 0x1400235f6
mov eax, r15d
jmp 0x140023612
sbb eax, eax
or eax, 1
test eax, eax
je 0x1400236c4
lea rcx, [rbp - 0x30]
mov rax, rsi
inc rax
cmp word [rcx + rax*2], 0
jne 0x140023621
mov r8d, eax
lea rdx, [rbp - 0x30]
lea rcx, [rsp + 0x30]
call fcn.1400105e0
xor r8d, r8d
mov rbx, qword [rsp + 0x30]
mov rdx, rbx
lea rcx, [rbp - 0x68]
call fcn.140109cd4
test rax, rax
je 0x1400236c4
mov qword [rsp + 0x58], r15
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
lea r9, [0x1403402b8]
xor edx, edx
lea r8d, [rdx + 1]
lea rcx, [0x1403402c8]
call qword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jns 0x14002369f
mov r9d, eax
lea r8, str.DefDevSetting.cpp
mov edx, 0x4c
lea rcx, str._VCpl__RETURN_FALSE_ON_ERROR:_Line___d__File___s__hr__0x_X_n
call fcn.140055180
jmp 0x1400236b4
mov rcx, qword [rsp + 0x58]
mov rax, qword [rcx]
mov r8d, 2
mov rdx, rbx
call qword [rax + 0x60]
nop
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x1400236c4
mov rax, qword [rcx]
call qword [rax + 0x10]
movsxd rdx, dword [rbx - 0xc]
mov rcx, rbx
call fcn.1402a58a8
test eax, eax
js 0x14002382f
cmp eax, dword [rbx - 0xc]
jg 0x14002382f
mov dword [rbx - 0x10], eax
cdqe
mov word [rbx + rax*2], r15w
jmp 0x14002354b
mov word [rbp - 0x30], r15w
lea r8, [rsp + 0x30]
mov edx, 2
lea ecx, [rdx - 1]
call fcn.140055570
mov rbx, qword [rsp + 0x30]
mov rax, rbx
lea rdx, [rbp - 0x30]
sub rdx, rbx
movzx ecx, word [rax]
cmp cx, word [rax + rdx]
jne 0x14002372d
add rax, 2
test cx, cx
jne 0x140023716
mov eax, r15d
jmp 0x140023732
sbb eax, eax
or eax, 1
test eax, eax
je 0x1400237e4
lea rcx, [rbp - 0x30]
mov rax, rsi
inc rax
cmp word [rcx + rax*2], 0
jne 0x140023741
mov r8d, eax
lea rdx, [rbp - 0x30]
lea rcx, [rsp + 0x30]
call fcn.1400105e0
xor r8d, r8d
mov rbx, qword [rsp + 0x30]
mov rdx, rbx
lea rcx, [rbp - 0x68]
call fcn.140109cd4
test rax, rax
je 0x1400237e4
mov qword [rsp + 0x60], r15
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
lea r9, [0x1403402b8]
xor edx, edx
lea r8d, [rdx + 1]
lea rcx, [0x1403402c8]
call qword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jns 0x1400237bf
mov r9d, eax
lea r8, str.DefDevSetting.cpp
mov edx, 0x4c
lea rcx, str._VCpl__RETURN_FALSE_ON_ERROR:_Line___d__File___s__hr__0x_X_n
call fcn.140055180
jmp 0x1400237d4
mov rcx, qword [rsp + 0x60]
mov rax, qword [rcx]
mov r8d, 2
mov rdx, rbx
call qword [rax + 0x60]
nop
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x1400237e4
mov rax, qword [rcx]
call qword [rax + 0x10]
movsxd rdx, dword [rbx - 0xc]
mov rcx, rbx
call fcn.1402a58a8
test eax, eax
js 0x14002383a
cmp eax, dword [rbx - 0xc]
jg 0x14002383a
mov dword [rbx - 0x10], eax
cdqe
mov word [rbx + rax*2], r15w
jmp 0x140023200
mov ecx, 0x80004005
call fcn.14000de90
nop
call fcn.1400f91a0
int3
mov ecx, 0x80070057
call fcn.14000de90
int3
mov ecx, 0x80070057
call fcn.14000de90
int3
mov ecx, 0x80070057
call fcn.14000de90
int3
mov ecx, 0x80070057
call fcn.14000de90
int3