Function at 0x1400208b0
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 [0x14011f010]
xor rax, rsp
mov qword [rbp + 0x28], rax
mov rbx, rdx
test rdx, rdx
jne 0x140020937
mov r8d, 0x163
lea rdx, str.CRtkBssGen4BtUsbApoChainModifier::RemoveLegacyAPOKey
lea rcx, str._s__d_RETURN_ON_FALSE
call fcn.14004c3d0
mov rcx, qword [rbp + 0x28]
xor rcx, rsp
call fcn.1400a4020
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, 0x186
lea rdx, str.CRtkBssGen4BtUsbApoChainModifier::RemoveLegacyAPOKey
lea rcx, str._s__d_EpId_s
call fcn.14004c3d0
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 [0x1400c6ae8]
movups xmmword [rbp - 0x28], xmm0
add rbx, 0x138
mov r8, qword [rbx]
cmp dword [r8 - 8], 1
jle 0x140020a63
mov edx, dword [r8 - 0x10]
mov rcx, rbx
call fcn.140003e20
mov r8, qword [rbx]
mov rdx, 0xffffffff80000002
mov r9d, 0x2001b
lea rcx, [rbp]
call fcn.140021cb0
mov edi, eax
mov rcx, qword [rbx]
test rcx, rcx
jne 0x140020a88
mov eax, r15d
jmp 0x140020a9a
movsxd rdx, dword [rcx - 0xc]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsnlen]
test eax, eax
js 0x140020e28
mov rcx, qword [rbx]
cmp eax, dword [rcx - 0xc]
jg 0x140020e28
mov dword [rcx - 0x10], eax
movsxd rcx, eax
mov rax, qword [rbx]
mov word [rax + rcx*2], r15w
test edi, edi
jne 0x140020d5b
mov r12, r15
mov rbx, qword [rbp - 0x40]
mov rsi, qword [rbp]
nop word [rax + rax]
mov edi, r15d
movups xmm0, xmmword [0x1400c6ae8]
movups xmmword [rbp - 0x28], xmm0
mov qword [rbp - 0x38], rbx
mov r13, qword [rsp + r12 + 0x30]
call fcn.140004540
mov rcx, rax
test rax, rax
je 0x140020e1d
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 0x140020be2
mov eax, dword [rbp + 0x18]
dec eax
cmp eax, 1
ja 0x140020be2
mov r15d, dword [rbp - 0x48]
shr r15d, 1
je 0x140020bdf
mov ecx, r15d
mov eax, 2
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call fcn.1400a4688
mov rbx, rax
test rax, rax
je 0x140020bdf
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 0x140020bd7
mov eax, dword [rbp + 0x1c]
dec eax
cmp eax, 1
ja 0x140020bd7
mov eax, dword [rbp - 0x44]
test eax, eax
je 0x140020bc5
test al, 1
jne 0x140020bd7
shr rax, 1
cmp word [rbx + rax*2 - 2], 0
je 0x140020bca
jmp 0x140020bd7
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.1400a404c
xor r15d, r15d
mov rax, 0xffffffffffffffff
lock xadd dword [r14 + 0x10], eax
sub eax, 1
jg 0x140020c00
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.14001ea90
mov rax, qword [rbp - 0x28]
cmp rax, qword [0x1400c6ae8]
jne 0x140020c38
mov rax, qword [rbp - 0x20]
cmp rax, qword [0x1400c6af0]
jne 0x140020c38
mov rbx, qword [rbp - 0x40]
jmp 0x140020d1e
mov r8, qword [rbp - 0x38]
mov rsi, r8
mov rbx, qword [rbp - 0x40]
sub rsi, rbx
sar rsi, 4
cmp rsi, 1
jae 0x140020c94
mov qword [rbp - 0x38], rbx
cmp qword [rbp - 0x30], rbx
je 0x140020c6b
movups xmm0, xmmword [rbp - 0x28]
movups xmmword [rbx], xmm0
lea rax, [rbx + 0x10]
mov qword [rbp - 0x38], rax
jmp 0x140020c7b
lea r8, [rbp - 0x28]
mov rdx, rbx
lea rcx, [rbp - 0x40]
call fcn.140021810
lea r8, [rbp - 0x40]
mov rdx, r14
lea rcx, [rbp]
call fcn.14001ecd0
mov rbx, qword [rbp - 0x40]
jmp 0x140020d1e
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x10], rax
mov rdx, rbx
lea rcx, [rbp - 0x18]
call fcn.1400219c0
test esi, esi
jle 0x140020ce6
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 0x140020ccf
mov rax, qword [rcx + 8]
sub rax, r8
test rax, rax
cmove edi, r15d
add rcx, 0x10
sub rdx, r15
jne 0x140020cc0
test edi, edi
mov r15, rdx
jne 0x140020d0e
mov rdx, qword [rbp - 0x10]
cmp qword [rbp - 8], rdx
je 0x140020d01
movups xmm0, xmmword [rbp - 0x28]
movups xmmword [rdx], xmm0
add rdx, 0x10
mov qword [rbp - 0x10], rdx
jmp 0x140020d0e
lea r8, [rbp - 0x28]
lea rcx, [rbp - 0x18]
call fcn.140021810
lea r8, [rbp - 0x18]
mov rdx, r14
lea rcx, [rbp]
call fcn.14001ecd0
mov rdx, r13
lea rcx, [rbp]
call fcn.140021b80
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 0x140020ad0
test rsi, rsi
je 0x140020d83
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov rsi, r15
jmp 0x140020d83
mov dword [rsp + 0x20], edi
mov r9, qword [rbx]
mov r8d, 0x1bf
lea rdx, str.CRtkBssGen4BtUsbApoChainModifier::RemoveLegacyAPOKey
lea rcx, str._s__d_open__s__x
call fcn.14004c3d0
mov rbx, qword [rbp - 0x40]
mov rsi, qword [rbp]
test rsi, rsi
je 0x140020d92
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 0x140020dd4
mov rdx, qword [rbp - 8]
sub rdx, rcx
and rdx, 0xfffffffffffffff0
mov rax, rcx
cmp rdx, 0x1000
jb 0x140020dce
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140020dce
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400a404c
nop
test rbx, rbx
je 0x14002090a
mov rdx, qword [rbp - 0x30]
sub rdx, rbx
and rdx, 0xfffffffffffffff0
mov rax, rbx
cmp rdx, 0x1000
jb 0x140020e10
add rdx, 0x27
mov rbx, qword [rbx - 8]
sub rax, rbx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140020e10
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, rbx
call fcn.1400a404c
jmp 0x14002090a
mov ecx, 0x80004005
call fcn.140004670
int3
mov ecx, 0x80070057
call fcn.140004670
int3