Function at 0x140012a30
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
mov dword [rsp + 8], ecx
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x78
mov qword [rbp - 0x10], 0xfffffffffffffffe
lea rcx, [0x14008d120]
call fcn.140018760
lea r9, [0x1400af290]
mov r8d, 0x4cd
lea rdx, str.SetBtSelectiveSuspendEnabled
lea rcx, str.__hs_____d_:_____s
call fcn.140018f50
xor r15d, r15d
mov dword [rbp + 0x50], r15d
call fcn.1400030f0
mov rcx, rax
test rax, rax
je 0x1400131cf
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rbp - 0x48], rax
lea rdx, [0x14008ac30]
lea r14, [r15 - 1]
cmp rdx, 0x10000
jae 0x140012ac3
movzx edx, dx
lea rcx, [rbp - 0x48]
call fcn.140003290
jmp 0x140012add
mov rax, r14
inc rax
cmp word [rdx + rax*2], 0
jne 0x140012ac6
mov r8d, eax
lea rcx, [rbp - 0x48]
call fcn.140005a50
nop
xor edx, edx
mov r8d, 0x100
lea rcx, [rbp + 0x50]
call qword [sym.imp.api_ms_win_devices_config_l1_1_1.dll_CM_Get_Device_ID_List_SizeW]
test eax, eax
je 0x140012b2a
mov edx, eax
lea rcx, str.CM_Get_Device_ID_List_Size_failed__ret:__x
call fcn.140018760
mov r8d, 0x4d9
lea r9, [0x1400af290]
lea rdx, str.SetBtSelectiveSuspendEnabled
lea rcx, str.__hs_____d_:_____s
call fcn.140018f50
mov rbx, qword [rbp - 0x48]
jmp 0x140013154
mov ebx, dword [rbp + 0x50]
add rbx, rbx
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_GetProcessHeap]
mov rcx, rax
mov r8, rbx
mov edx, 8
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapAlloc]
mov r12, rax
test rax, rax
jne 0x140012b6b
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov edx, eax
lea rcx, str.DeviceList_HeapAlloc_failed__ret:_0x_x
call fcn.140018760
mov r8d, 0x4e2
jmp 0x140012b07
mov r9d, 0x10000142
mov r8d, dword [rbp + 0x50]
mov rdx, r12
lea rcx, str.RtkBtFilter
call qword [sym.imp.api_ms_win_devices_config_l1_1_1.dll_CM_Get_Device_ID_ListW]
test eax, eax
je 0x140012bc0
mov edx, eax
lea rcx, str.CM_Get_Device_ID_ListW_failed__ret:__x
call fcn.140018760
lea r9, [0x1400af290]
mov r8d, 0x4eb
lea rdx, str.SetBtSelectiveSuspendEnabled
lea rcx, str.__hs_____d_:_____s
call fcn.140018f50
mov rbx, qword [rbp - 0x48]
jmp 0x140013140
mov rsi, r12
cmp word [r12], 0
je 0x140013110
mov r13d, 1
nop word [rax + rax]
mov rax, r14
inc rax
cmp word [rsi + rax*2], 0
jne 0x140012be3
mov r8d, eax
mov rdx, rsi
lea rcx, [rbp - 0x48]
call fcn.140005a50
mov rbx, qword [rbp - 0x48]
movsxd rdi, dword [rbx - 0x10]
test edi, edi
js 0x1400131c4
mov ecx, r13d
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, edi
or eax, ecx
jge 0x140012c2a
mov edx, edi
lea rcx, [rbp - 0x48]
call fcn.140004030
mov rbx, qword [rbp - 0x48]
lea eax, [rdi + 1]
movsxd rdx, eax
mov rcx, rbx
call fcn.14003203c
cmp edi, dword [rbx - 0xc]
jg 0x1400131eb
mov dword [rbx - 0x10], edi
mov word [rbx + rdi*2], r15w
mov rdx, rbx
lea rcx, str.Present_hardwareid:__s
call fcn.140018760
lea r9, [0x1400af290]
mov r8d, 0x4f5
lea rdx, str.SetBtSelectiveSuspendEnabled
lea rcx, str.__hs_____d_:_____s
call fcn.140018f50
mov edi, r15d
lea rax, [rbp - 0x20]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
lea rdx, str.SoftwareRealtekBluetooth_service
mov rcx, 0xffffffff80000002
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
test eax, eax
jne 0x140012de7
mov dword [rbp - 0x2c], 4
mov dword [rbp - 0x30], 4
mov dword [rbp + 0x58], r15d
lea rax, [rbp - 0x30]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x58]
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x2c]
xor r8d, r8d
lea rdx, str.BTSSOption
mov rcx, qword [rbp - 0x20]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
jne 0x140012cf1
cmp dword [rbp + 0x58], r13d
cmove edi, r13d
mov rcx, qword [rbp - 0x20]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
test edi, edi
je 0x140012de7
cmp dword [rbx - 0x10], 0
jl 0x140012f33
lea rdx, [0x1400882d0]
mov rcx, rbx
call fcn.140024bf4
test rax, rax
je 0x140012f33
sub rax, rbx
sar rax, 1
cmp eax, 0xffffffff
je 0x140012f33
cmp dword [rbx - 0x10], 0
jl 0x140012f33
lea rdx, [0x1400882d8]
mov rcx, rbx
call fcn.140024bf4
test rax, rax
je 0x140012f33
sub rax, rbx
sar rax, 1
cmp eax, 0xffffffff
je 0x140012f33
cmp dword [rbx - 0x10], 0
jl 0x140012d8e
lea rdx, str._0000_1000_8000_00805F9B34FB
mov rcx, rbx
call fcn.140024bf4
test rax, rax
je 0x140012d8e
sub rax, rbx
sar rax, 1
cmp eax, 0xffffffff
jne 0x140012f33
mov dword [rbp + 0x60], 0xffffffff
mov dword [rbp - 0x3c], 4
mov dword [rbp - 0x40], 4
call fcn.1400030f0
mov rcx, rax
test rax, rax
je 0x1400131da
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rbp - 0x38], rax
lea rdx, str.SYSTEMCurrentControlSetEnum_
cmp rdx, 0x10000
jae 0x140012f62
movzx edx, dx
lea rcx, [rbp - 0x38]
call fcn.140003290
jmp 0x140012f7c
cmp dword [rbx - 0x10], 0
jl 0x140012f33
lea rdx, str.VID_0BDA
mov rcx, rbx
call fcn.140024bf4
test rax, rax
je 0x140012e3d
sub rax, rbx
sar rax, 1
cmp eax, 0xffffffff
je 0x140012e3d
cmp dword [rbx - 0x10], 0
jl 0x140012f33
lea rdx, str.PID_1724
mov rcx, rbx
call fcn.140024bf4
test rax, rax
je 0x140012e3d
sub rax, rbx
sar rax, 1
cmp eax, 0xffffffff
jne 0x140012d8e
cmp dword [rbx - 0x10], 0
jl 0x140012f33
lea rdx, str.VID_0BDA
mov rcx, rbx
call fcn.140024bf4
test rax, rax
je 0x140012e93
sub rax, rbx
sar rax, 1
cmp eax, 0xffffffff
je 0x140012e93
cmp dword [rbx - 0x10], 0
jl 0x140012f33
lea rdx, str.PID_8725
mov rcx, rbx
call fcn.140024bf4
test rax, rax
je 0x140012e93
sub rax, rbx
sar rax, 1
cmp eax, 0xffffffff
jne 0x140012d8e
cmp dword [rbx - 0x10], 0
jl 0x140012f33
lea rdx, str.VID_0BDA
mov rcx, rbx
call fcn.140024bf4
test rax, rax
je 0x140012ee5
sub rax, rbx
sar rax, 1
cmp eax, 0xffffffff
je 0x140012ee5
cmp dword [rbx - 0x10], 0
jl 0x140012f33
lea rdx, str.PID_0724
mov rcx, rbx
call fcn.140024bf4
test rax, rax
je 0x140012ee5
sub rax, rbx
sar rax, 1
cmp eax, 0xffffffff
jne 0x140012d8e
cmp dword [rbx - 0x10], 0
jl 0x140012f33
lea rdx, str.VID_0BDA
mov rcx, rbx
call fcn.140024bf4
test rax, rax
je 0x140012f33
sub rax, rbx
sar rax, 1
cmp eax, 0xffffffff
je 0x140012f33
cmp dword [rbx - 0x10], 0
jl 0x140012f33
lea rdx, str.PID_0723
mov rcx, rbx
call fcn.140024bf4
test rax, rax
je 0x140012f33
sub rax, rbx
sar rax, 1
cmp eax, 0xffffffff
jne 0x140012d8e
mov rax, r14
nop word [rax + rax]
lea rax, [rax + 1]
cmp word [rsi + rax*2], 0
jne 0x140012f40
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], 0
je 0x140013114
jmp 0x140012be0
mov rax, r14
inc rax
cmp word [rdx + rax*2], 0
jne 0x140012f65
mov r8d, eax
lea rcx, [rbp - 0x38]
call fcn.140005a50
nop
lea r8, [rbp - 0x48]
lea rdx, [rbp - 0x38]
lea rcx, [rbp - 0x18]
call fcn.140008f10
nop
mov rcx, qword [rax]
mov edx, dword [rcx - 0x10]
call qword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
mov rbx, rax
test rax, rax
je 0x1400131e5
mov rdx, qword [rbp - 0x18]
add rdx, 0xffffffffffffffe8
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140012fc4
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
lea rax, [rbp - 0x28]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
mov rdx, rbx
mov rcx, 0xffffffff80000002
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
test eax, eax
jne 0x1400130bb
lea rax, [rbp - 0x40]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x60]
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x3c]
xor r8d, r8d
lea rdx, str.SelectiveSuspendEnabled
mov rcx, qword [rbp - 0x28]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
jne 0x140013038
mov edx, dword [rbp + 0x60]
cmp edx, dword [rbp + 0x48]
jne 0x140013038
lea rcx, str.not_need_SelectiveSuspendEnabled_d
call fcn.140018760
mov r8d, 0x520
jmp 0x140013095
mov eax, dword [rbp - 0x40]
mov dword [rsp + 0x28], eax
lea rax, [rbp + 0x48]
mov qword [rsp + 0x20], rax
mov r9d, dword [rbp - 0x3c]
xor r8d, r8d
lea rdx, str.SelectiveSuspendEnabled
mov rcx, qword [rbp - 0x28]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
test eax, eax
je 0x140013080
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov edx, eax
lea rcx, str.set_SelectiveSuspendEnabled_fail__GetLastError___d.
call fcn.140018760
mov r8d, 0x527
jmp 0x140013095
mov edx, dword [rbp + 0x48]
lea rcx, str.set_SelectiveSuspendEnabled_d
call fcn.140018760
mov r8d, 0x52b
lea r9, [0x1400af290]
lea rdx, str.SetBtSelectiveSuspendEnabled
lea rcx, str.__hs_____d_:_____s
call fcn.140018f50
mov rcx, qword [rbp - 0x28]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
jmp 0x1400130e8
lea rcx, str.error::wont_enter_here
call fcn.140018760
lea r9, [0x1400af290]
mov r8d, 0x532
lea rdx, str.SetBtSelectiveSuspendEnabled
lea rcx, str.__hs_____d_:_____s
call fcn.140018f50
nop
mov rdx, qword [rbp - 0x38]
add rdx, 0xffffffffffffffe8
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140012bb7
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rbx, qword [rbp - 0x48]
jmp 0x140013140
mov rbx, qword [rbp - 0x48]
lea rcx, str.not_found_rtk_bt
call fcn.140018760
lea r9, [0x1400af290]
mov r8d, 0x537
lea rdx, str.SetBtSelectiveSuspendEnabled
lea rcx, str.__hs_____d_:_____s
call fcn.140018f50
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_GetProcessHeap]
mov rcx, rax
mov r8, r12
xor edx, edx
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov edi, eax
mov ecx, eax
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
lea rcx, str.SetBtSelectiveSuspendEnabled__
call fcn.140018760
lea r9, [0x1400af290]
mov r8d, 0x544
lea rdx, str.SetBtSelectiveSuspendEnabled
lea rcx, str.__hs_____d_:_____s
call fcn.140018f50
test edi, edi
sete r15b
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], r14d
sub r14d, 1
jg 0x1400131b0
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [r8 + 8]
mov eax, r15d
add rsp, 0x78
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov ecx, 0x80070057
call fcn.140002850
nop
mov ecx, 0x80004005
call fcn.140002850
nop
mov ecx, 0x80004005
call fcn.140002850
nop
call fcn.140005bc0
nop
mov ecx, 0x80070057
call fcn.140002850
int3