Function at 0x140023540
Capabilities:
Delete registry value
Query or enumerate registry value

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x58]
sub rsp, 0x130
mov qword [rbp - 0x50], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x14014f010]
xor rax, rsp
mov qword [rbp + 0x28], rax
mov rbx, rdx
test rdx, rdx
jne 0x1400235c7
mov r8d, 0x175
lea rdx, str.CRtkBssGen4BtUsbApoChainModifier::RemoveLegacyAPOKey
lea rcx, str._s__d_RETURN_ON_FALSE
call fcn.14005be10
mov rcx, qword [rbp + 0x28]
xor rcx, rsp
call fcn.1400b96d0
lea r11, [rsp + 0x130]
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
lea rax, str.d04e05a6_594b_4fb6_a80d_01af5eed7d1d_5
mov qword [rsp + 0x30], rax
lea rax, str.d04e05a6_594b_4fb6_a80d_01af5eed7d1d_6
mov qword [rsp + 0x38], rax
lea rax, str.d04e05a6_594b_4fb6_a80d_01af5eed7d1d_7
mov qword [rsp + 0x40], rax
lea rax, str.d04e05a6_594b_4fb6_a80d_01af5eed7d1d_8
mov qword [rsp + 0x48], rax
lea rax, str.d04e05a6_594b_4fb6_a80d_01af5eed7d1d_9
mov qword [rsp + 0x50], rax
lea rax, str.d04e05a6_594b_4fb6_a80d_01af5eed7d1d_10
mov qword [rsp + 0x58], rax
lea rax, str.d04e05a6_594b_4fb6_a80d_01af5eed7d1d_11
mov qword [rsp + 0x60], rax
lea rax, str.d04e05a6_594b_4fb6_a80d_01af5eed7d1d_12
mov qword [rsp + 0x68], rax
lea rax, str.d04e05a6_594b_4fb6_a80d_01af5eed7d1d_13
mov qword [rsp + 0x70], rax
lea rax, str.d04e05a6_594b_4fb6_a80d_01af5eed7d1d_14
mov qword [rsp + 0x78], rax
lea rax, str.d04e05a6_594b_4fb6_a80d_01af5eed7d1d_15
mov qword [rbp - 0x80], rax
lea rax, str.d04e05a6_594b_4fb6_a80d_01af5eed7d1d_16
mov qword [rbp - 0x78], rax
lea rax, str.d04e05a6_594b_4fb6_a80d_01af5eed7d1d_17
mov qword [rbp - 0x70], rax
lea rax, str.d04e05a6_594b_4fb6_a80d_01af5eed7d1d_18
mov qword [rbp - 0x68], rax
lea rax, str.d04e05a6_594b_4fb6_a80d_01af5eed7d1d_19
mov qword [rbp - 0x60], rax
lea rax, str.d04e05a6_594b_4fb6_a80d_01af5eed7d1d_20
mov qword [rbp - 0x58], rax
mov r9, qword [rdx + 0x10]
mov r8d, SafeArrayCopyData
lea rdx, str.CRtkBssGen4BtUsbApoChainModifier::RemoveLegacyAPOKey
lea rcx, str._s__d_EpId_s
call fcn.14005be10
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x40], xmm0
xor r15d, r15d
mov qword [rbp - 0x30], r15
movdqu xmmword [rbp - 0x18], xmm0
mov qword [rbp - 8], r15
xor eax, eax
mov qword [rbp + 8], rax
mov qword [rbp], r15
mov dword [rbp + 8], r15d
mov qword [rbp + 0x10], r15
movups xmm0, xmmword [0x1400e0cb8]
movups xmmword [rbp - 0x28], xmm0
add rbx, 0x130
mov r8, qword [rbx]
cmp dword [r8 - 8], 1
jle 0x1400236f3
mov edx, dword [r8 - 0x10]
mov rcx, rbx
call fcn.1400047c0
mov r8, qword [rbx]
mov rdx, 0xffffffff80000002
mov r9d, 0x2001b
lea rcx, [rbp]
call fcn.140026e10
mov edi, eax
mov rcx, qword [rbx]
test rcx, rcx
jne 0x140023718
mov eax, r15d
jmp 0x14002372a
movsxd rdx, dword [rcx - 0xc]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsnlen]
test eax, eax
js 0x140023ab8
mov rcx, qword [rbx]
cmp eax, dword [rcx - 0xc]
jg 0x140023ab8
mov dword [rcx - 0x10], eax
movsxd rcx, eax
mov rax, qword [rbx]
mov word [rax + rcx*2], r15w
test edi, edi
jne 0x1400239eb
mov r12, r15
mov rbx, qword [rbp - 0x40]
mov rsi, qword [rbp]
nop word [rax + rax]
mov edi, r15d
movups xmm0, xmmword [0x1400e0cb8]
movups xmmword [rbp - 0x28], xmm0
mov qword [rbp - 0x38], rbx
mov r13, qword [rsp + r12 + 0x30]
call fcn.140004f00
mov rcx, rax
test rax, rax
je 0x140023aad
mov rax, qword [rax]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
mov r14, rax
lea rcx, [rax + 0x18]
mov qword [rbp + 0x20], rcx
mov dword [rbp - 0x48], r15d
lea rax, [rbp - 0x48]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r15
lea r9, [rbp + 0x18]
xor r8d, r8d
mov rdx, r13
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
jne 0x140023872
mov eax, dword [rbp + 0x18]
dec eax
cmp eax, 1
ja 0x140023872
mov r15d, dword [rbp - 0x48]
shr r15d, 1
je 0x14002386f
mov ecx, r15d
mov eax, 2
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call fcn.1400b9cfc
mov rbx, rax
test rax, rax
je 0x14002386f
lea edx, [r15 + r15]
mov dword [rbp - 0x44], edx
lea rax, [rbp - 0x44]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rbx
lea r9, [rbp + 0x1c]
xor r8d, r8d
mov rdx, r13
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
jne 0x140023867
mov eax, dword [rbp + 0x1c]
dec eax
cmp eax, 1
ja 0x140023867
mov eax, dword [rbp - 0x44]
test eax, eax
je 0x140023855
test al, 1
jne 0x140023867
shr rax, 1
cmp word [rbx + rax*2 - 2], 0
je 0x14002385a
jmp 0x140023867
xor eax, eax
mov word [rbx], ax
lea rdx, [rbp - 0x28]
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CLSIDFromString]
mov rcx, rbx
call fcn.1400b96fc
xor r15d, r15d
mov rax, 0xffffffffffffffff
lock xadd dword [r14 + 0x10], eax
sub eax, 1
jg 0x140023890
mov rcx, qword [r14]
mov rax, qword [rcx]
mov rdx, r14
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov r14, qword [rsp + r12 + 0x70]
lea r8, [rbp - 0x40]
mov rdx, r14
lea rcx, [rbp]
call fcn.140021d90
mov rax, qword [rbp - 0x28]
cmp rax, qword [0x1400e0cb8]
jne 0x1400238c8
mov rax, qword [rbp - 0x20]
cmp rax, qword [0x1400e0cc0]
jne 0x1400238c8
mov rbx, qword [rbp - 0x40]
jmp 0x1400239ae
mov r8, qword [rbp - 0x38]
mov rsi, r8
mov rbx, qword [rbp - 0x40]
sub rsi, rbx
sar rsi, 4
cmp rsi, 1
jae 0x140023924
mov qword [rbp - 0x38], rbx
cmp qword [rbp - 0x30], rbx
je 0x1400238fb
movups xmm0, xmmword [rbp - 0x28]
movups xmmword [rbx], xmm0
lea rax, [rbx + 0x10]
mov qword [rbp - 0x38], rax
jmp 0x14002390b
lea r8, [rbp - 0x28]
mov rdx, rbx
lea rcx, [rbp - 0x40]
call fcn.140026970
lea r8, [rbp - 0x40]
mov rdx, r14
lea rcx, [rbp]
call fcn.140021fd0
mov rbx, qword [rbp - 0x40]
jmp 0x1400239ae
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x10], rax
mov rdx, rbx
lea rcx, [rbp - 0x18]
call fcn.140026b20
test esi, esi
jle 0x140023976
mov rcx, rbx
mov edx, esi
mov r8, qword [rbp - 0x20]
mov r9, qword [rbp - 0x28]
mov r15d, 1
nop
mov rax, qword [rcx]
sub rax, r9
jne 0x14002395f
mov rax, qword [rcx + 8]
sub rax, r8
test rax, rax
cmove edi, r15d
add rcx, 0x10
sub rdx, r15
jne 0x140023950
test edi, edi
mov r15, rdx
jne 0x14002399e
mov rdx, qword [rbp - 0x10]
cmp qword [rbp - 8], rdx
je 0x140023991
movups xmm0, xmmword [rbp - 0x28]
movups xmmword [rdx], xmm0
add rdx, 0x10
mov qword [rbp - 0x10], rdx
jmp 0x14002399e
lea r8, [rbp - 0x28]
lea rcx, [rbp - 0x18]
call fcn.140026970
lea r8, [rbp - 0x18]
mov rdx, r14
lea rcx, [rbp]
call fcn.140021fd0
mov rdx, r13
lea rcx, [rbp]
call fcn.140026ce0
mov rdx, r13
mov rsi, qword [rbp]
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegDeleteValueW]
add r12, 8
cmp r12, 0x40
jl 0x140023760
test rsi, rsi
je 0x140023a13
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov rsi, r15
jmp 0x140023a13
mov dword [rsp + 0x20], edi
mov r9, qword [rbx]
mov r8d, 0x1d1
lea rdx, str.CRtkBssGen4BtUsbApoChainModifier::RemoveLegacyAPOKey
lea rcx, str._s__d_open__s__x
call fcn.14005be10
mov rbx, qword [rbp - 0x40]
mov rsi, qword [rbp]
test rsi, rsi
je 0x140023a22
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
nop
mov rcx, qword [rbp - 0x18]
test rcx, rcx
je 0x140023a64
mov rdx, qword [rbp - 8]
sub rdx, rcx
and rdx, 0xfffffffffffffff0
mov rax, rcx
cmp rdx, 0x1000
jb 0x140023a5e
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140023a5e
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400b96fc
nop
test rbx, rbx
je 0x14002359a
mov rdx, qword [rbp - 0x30]
sub rdx, rbx
and rdx, 0xfffffffffffffff0
mov rax, rbx
cmp rdx, 0x1000
jb 0x140023aa0
add rdx, 0x27
mov rbx, qword [rbx - 8]
sub rax, rbx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140023aa0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, rbx
call fcn.1400b96fc
jmp 0x14002359a
mov ecx, 0x80004005
call fcn.140005030
int3
mov ecx, 0x80070057
call fcn.140005030
int3