Function at 0x140085920
Capabilities:
Query or enumerate registry value

Disassembly:
push rbp
push rdi
push r14
lea rbp, [rsp - 0x1f80]
mov eax, 0x2080
call fcn.1400ad030
sub rsp, rax
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov qword [rsp + 0x20a0], rbx
mov qword [rsp + 0x20b8], rsi
mov rax, qword [0x14011f010]
xor rax, rsp
mov qword [rbp + 0x1f70], rax
mov rbx, r8
mov rsi, rdx
mov qword [rsp + 0x48], rdx
xor r14d, r14d
mov dword [rsp + 0x30], r14d
xor eax, eax
mov qword [rdx], rax
call fcn.140004540
mov rcx, rax
test rax, rax
je 0x140085bb7
mov rax, qword [rax]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
add rax, 0x18
mov qword [rsi], rax
mov dword [rsp + 0x30], 1
mov rcx, rsi
call fcn.1400040a0
test rbx, rbx
je 0x140085b8d
cmp dword [rbx + 0x178], r14d
je 0x140085a4f
mov r8, rbx
lea rdx, [rsp + 0x38]
call fcn.1400874d0
nop
mov rdx, qword [rax]
lea rcx, [rdx - 0x18]
mov rdi, qword [rsi]
sub rdi, 0x18
lea rbx, [r14 - 1]
cmp rcx, rdi
je 0x140085a2a
cmp dword [rdi + 0x10], r14d
jl 0x140085a1d
mov rax, qword [rdi]
cmp qword [rcx], rax
jne 0x140085a1d
call fcn.140006110
mov r14, rax
mov ecx, ebx
lock xadd dword [rdi + 0x10], ecx
sub ecx, 1
jg 0x140085a14
mov rcx, qword [rdi]
mov r8, qword [rcx]
mov rdx, rdi
call qword [rreloc.OLEAUT32.dll_VariantClear + 8]
lea rax, [r14 + 0x18]
mov qword [rsi], rax
jmp 0x140085a2a
mov r8d, dword [rdx - 0x10]
mov rcx, rsi
call fcn.140003f80
nop
mov rdx, qword [rsp + 0x38]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], ebx
sub ebx, 1
jg 0x140085b8d
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x140085b8d
xor eax, eax
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x58], r14
mov dword [rsp + 0x60], r14d
mov qword [rsp + 0x68], r14
mov r9d, 0x2001b
lea r8, str.SOFTWARERealtekAudioRtkAudUServiceBssGen4Preset
mov rdx, 0xffffffff80000002
lea rcx, [rsp + 0x58]
call fcn.140021cb0
test eax, eax
jne 0x140085b5e
xor edx, edx
mov r8d, 0x2000
lea rcx, [rsp + 0x70]
call fcn.1400aa8f0
mov dword [rsp + 0x50], 0x1ffe
lea rax, [rsp + 0x50]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x54]
xor r8d, r8d
lea rdx, str.PropDeviceForBtUsbPreset
mov rdi, qword [rsp + 0x58]
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
jne 0x140085b01
mov eax, dword [rsp + 0x54]
dec eax
cmp eax, 1
ja 0x140085afc
mov eax, dword [rsp + 0x50]
test eax, eax
je 0x140085b1f
test al, 1
jne 0x140085afc
shr rax, 1
cmp word [rsp + rax*2 + 0x6e], 0
je 0x140085b25
mov eax, SafeArrayDestroy
mov r9d, eax
mov r8d, 0x85
lea rdx, str.CRtkBssGen4PresetLoader::GetPropDevicePath
lea rcx, str._s__d_RegBSSGen4RootStore.QueryStringValue_PropDeviceForBtUsbPreset__failed_nRegRet_d
call fcn.14004c3d0
jmp 0x140085b4b
mov word [rsp + 0x70], r14w
lea rax, [rsp + 0x70]
mov rbx, 0xffffffffffffffff
inc rbx
cmp word [rax + rbx*2], 0
jne 0x140085b31
mov r8d, ebx
lea rdx, [rsp + 0x70]
mov rcx, rsi
call fcn.140003f80
test rdi, rdi
je 0x140085b7f
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov rdi, r14
jmp 0x140085b7f
mov r9d, eax
mov r8d, 0x8c
lea rdx, str.CRtkBssGen4PresetLoader::GetPropDevicePath
lea rcx, str._s__d_RegBSSGen4RootStore.Open__s__failed_nRegRet_d
call fcn.14004c3d0
mov rdi, qword [rsp + 0x58]
test rdi, rdi
je 0x140085b8d
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov rax, rsi
mov rcx, qword [rbp + 0x1f70]
xor rcx, rsp
call fcn.1400a4020
lea r11, [rsp + 0x2080]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret
mov ecx, 0x80004005
call fcn.140004670
int3