Function at 0x14009a5f0
Capabilities:
Check if file exists
Query or enumerate registry value

Disassembly:
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1fc0]
mov eax, 0x20c0
call fcn.1400c3620
sub rsp, rax
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [rsp + 0x20f0], rbx
mov qword [rsp + 0x2100], rsi
mov qword [rsp + 0x2108], rdi
mov rax, qword [0x140150010]
xor rax, rsp
mov qword [rbp + 0x1fb0], rax
mov r14, rdx
test rdx, rdx
jne 0x14009a667
mov r8d, 0x15c
lea rdx, str.CRtkBssGen4PresetLoader::UpgradeLatestBssGen4Preset
lea rcx, str._s__d_RETURN_ON_FALSE
call fcn.14005c7e0
jmp 0x14009aab8
call fcn.140004f00
mov rcx, rax
test rax, rax
je 0x14009aaf3
mov rax, qword [rax]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
add rax, 0x18
mov qword [rsp + 0x68], rax
lea r8, [rsp + 0x68]
mov rdx, r14
call fcn.14009b290
mov rsi, 0xffffffffffffffff
test eax, eax
jne 0x14009a6bd
mov r8d, 0x160
lea rdx, str.CRtkBssGen4PresetLoader::UpgradeLatestBssGen4Preset
lea rcx, str._s__d_RETURN_ON_FALSE
call fcn.14005c7e0
jmp 0x14009aa9c
xor r13d, r13d
mov r12d, r13d
xor eax, eax
mov qword [rbp - 0x68], rax
mov qword [rbp - 0x70], r13
mov dword [rbp - 0x68], r13d
mov qword [rbp - 0x60], r13
call fcn.140004f00
mov rcx, rax
test rax, rax
je 0x14009aafe
mov rax, qword [rax]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
add rax, 0x18
mov qword [rbp - 0x80], rax
mov rcx, r14
call fcn.1400162c0
lea rax, str.SOFTWARERealtekAudioRtkAudUServiceBssGen4PresetRender
lea r8, str.SOFTWARERealtekAudioRtkAudUServiceBssGen4PresetCapture
cmp dword [r14 + 0x84], r13d
cmovne r8, rax
mov rdi, qword [rsp + 0x68]
mov r9, rdi
lea rdx, [0x1400dea78]
lea rcx, [rbp - 0x80]
call fcn.140006c20
mov r9d, 0x20019
mov r8, qword [rbp - 0x80]
mov rdx, 0xffffffff80000002
lea rcx, [rbp - 0x70]
call fcn.140026e20
test eax, eax
jne 0x14009a923
xor edx, edx
mov r8d, 0x2000
lea rcx, [rbp - 0x50]
call fcn.1400c0ee0
lea rdx, [0x1400d9db8]
lea rcx, [rsp + 0x48]
call fcn.14004c3d0
mov dword [rsp + 0x60], 0x1ffe
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x28], rcx
lea rcx, [rbp - 0x50]
mov qword [rsp + 0x20], rcx
lea r9, [rbp - 0x78]
xor r8d, r8d
mov rdx, qword [rax]
mov rcx, qword [rbp - 0x70]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
mov ebx, eax
test eax, eax
jne 0x14009a7dc
mov eax, dword [rbp - 0x78]
dec eax
cmp eax, 1
jbe 0x14009a7b6
lea ebx, [r13 + 0xd]
jmp 0x14009a7dc
mov eax, dword [rsp + 0x60]
test eax, eax
je 0x14009a7d4
test al, 1
jne 0x14009a7cd
shr rax, 1
cmp word [rbp + rax*2 - 0x52], 0
je 0x14009a7d9
mov ebx, SafeArrayDestroy
jmp 0x14009a7dc
mov word [rbp - 0x50], r13w
mov ebx, r13d
mov rdx, qword [rsp + 0x48]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14009a7fa
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
test ebx, ebx
jne 0x14009a8ee
call fcn.140004f00
mov rcx, rax
test rax, rax
je 0x14009ab09
mov rax, qword [rax]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
add rax, 0x18
mov qword [rsp + 0x70], rax
lea rcx, [r14 + 0x10]
lea r9d, [rbx + 3]
lea r8, [rsp + 0x70]
lea rdx, [0x1400d9db8]
call fcn.1400041f0
lea rdx, [rbp - 0x50]
mov rbx, qword [rsp + 0x70]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x14009a8b9
lea rdx, str..dat
mov rax, rsi
nop dword [rax + rax]
inc rax
cmp word [rdx + rax*2], 0
jne 0x14009a860
mov r8d, eax
lea rcx, [rsp + 0x70]
call fcn.14000ff80
mov rbx, qword [rsp + 0x70]
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x14009a891
mov r12d, 1
jmp 0x14009a8d3
lea r9, [rbp - 0x50]
mov r8d, 0x180
lea rdx, str.CRtkBssGen4PresetLoader::UpgradeLatestBssGen4Preset
lea rcx, str._s__d_PKEY_GEN4_CONDITION_DAT_PATH_file__s_not_exist._delete_cache
call fcn.14005c7e0
mov rdx, qword [rbp - 0x80]
call fcn.14007c920
jmp 0x14009a8d3
mov r8d, 0x187
lea rdx, str.CRtkBssGen4PresetLoader::UpgradeLatestBssGen4Preset
lea rcx, str._s__d_PKEY_GEN4_CONDITION_DAT_PATH_not_machted
call fcn.14005c7e0
nop
lea rdx, [rbx - 0x18]
mov eax, esi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14009a907
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x14009a907
mov r8d, 0x18c
lea rdx, str.CRtkBssGen4PresetLoader::UpgradeLatestBssGen4Preset
lea rcx, str._s__d_PKEY_GEN4_CONDITION_DAT_PATH_miss
call fcn.14005c7e0
mov rcx, qword [rbp - 0x70]
test rcx, rcx
je 0x14009a91a
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov qword [rbp - 0x70], r13
mov dword [rbp - 0x68], r13d
mov rdi, qword [rsp + 0x68]
call fcn.140004f00
mov rcx, rax
test rax, rax
je 0x14009ab14
mov rax, qword [rax]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
add rax, 0x18
mov qword [rsp + 0x78], rax
mov r9d, 1
lea r8, [rsp + 0x78]
lea rdx, [0x1400d9d70]
lea rcx, [r14 + 0x10]
call fcn.1400041f0
mov dword [rsp + 0x30], r12d
mov rbx, qword [rsp + 0x78]
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rdi
mov r9, qword [r14 + 0x10]
mov r8d, 0x195
lea rdx, str.CRtkBssGen4PresetLoader::UpgradeLatestBssGen4Preset
lea rcx, str._s__d_EpId_s_PresetId_s_sStoredPresetId_s_bPresetCacheExist_d
call fcn.14005c7e0
test r12d, r12d
je 0x14009a9ad
test rbx, rbx
je 0x14009ab1f
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x14009aa2b
call fcn.140004f00
mov rcx, rax
test rax, rax
je 0x14009aae8
mov rax, qword [rax]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
mov rbx, rax
lea rcx, [rax + 0x18]
mov qword [rbp - 0x58], rcx
lea rcx, [rdi - 0x18]
call fcn.140006ba0
add rax, 0x18
mov qword [rsp + 0x40], rax
lea r8, [rsp + 0x40]
mov rdx, r14
call fcn.140099750
test eax, eax
je 0x14009aa0e
mov r9d, 1
lea r8, [rsp + 0x68]
lea rdx, [0x1400d9d70]
lea rcx, [r14 + 0x10]
call fcn.140004310
nop
mov eax, esi
lock xadd dword [rbx + 0x10], eax
sub eax, 1
jg 0x14009aa26
mov rcx, qword [rbx]
mov rax, qword [rcx]
mov rdx, rbx
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rbx, qword [rsp + 0x78]
cmp dword [r14 + 0x170], 0
je 0x14009aa54
mov dword [rsp + 0x20], r13d
mov r9d, 1
mov r8d, r9d
lea rdx, [0x1400d97d0]
lea rcx, [r14 + 0x10]
call fcn.1400032e0
nop
lea rdx, [rbx - 0x18]
mov eax, esi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14009aa6e
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rbp - 0x80]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14009aa8c
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rcx, qword [rbp - 0x70]
test rcx, rcx
je 0x14009aa9c
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
nop
mov rdx, qword [rsp + 0x68]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], esi
sub esi, 1
jg 0x14009aab8
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rcx, qword [rbp + 0x1fb0]
xor rcx, rsp
call fcn.1400ba610
lea r11, [rsp + 0x20c0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
mov ecx, 0x80004005
call fcn.140005030
nop
mov ecx, 0x80004005
call fcn.140005030
nop
mov ecx, 0x80004005
call fcn.140005030
nop
mov ecx, 0x80004005
call fcn.140005030
int3
mov ecx, 0x80004005
call fcn.140005030
nop
mov ecx, 0x80004005
call fcn.140005030
int3