Function at 0x140059030
Capabilities:
Query or enumerate registry value

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x2f8]
sub rsp, 0x3d0
mov rax, qword [0x1400d9180]
xor rax, rsp
mov qword [rbp + 0x2c0], rax
mov r15d, edx
xor edx, edx
mov r12, rcx
lea rcx, [rsp + 0x6c]
lea r8d, [rdx + 0x1c]
mov dword [rsp + 0x68], 0x20
call fcn.14005bab0
lea rcx, [0x14009e5a0]
mov r9d, 2
xor r8d, r8d
xor edx, edx
call qword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsW]
mov r13, rax
test rax, rax
jne 0x1400590c3
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.MakeAllBtDevsNonRemovable:_SetupDiGetClassDevs_failed._err_d_n
lea ecx, [r13 + 1]
mov r8d, eax
call fcn.140046d10
jmp 0x14005954c
xor edx, edx
mov rcx, r12
xor esi, esi
call fcn.1400544b0
lea ebx, [rsi + 1]
test eax, eax
je 0x14005914b
xor edi, edi
mov rax, qword [r12 + 8]
lea rcx, [rsp + 0x40]
xor r8d, r8d
mov edx, dword [rdi + rax + 0x18]
call qword [sym.imp.SETUPAPI.dll_CM_Get_Parent]
test eax, eax
jne 0x140059118
mov edx, dword [rsp + 0x40]
lea rcx, [rsp + 0x40]
xor r8d, r8d
call qword [sym.imp.SETUPAPI.dll_CM_Get_Parent]
test eax, eax
jne 0x140059118
mov rcx, qword [r12 + 8]
mov eax, dword [rsp + 0x40]
mov dword [rdi + rcx + 0x18], eax
jmp 0x140059134
lea rdx, str.MakeAllBtDevsNonRemovable:_CM_Get_Parent_failed._err_d_n
mov r8d, eax
mov ecx, ebx
call fcn.140046d10
mov r11, qword [r12 + 8]
and dword [rdi + r11 + 0x18], 0
add esi, ebx
mov rcx, r12
add rdi, 0x1b0
mov edx, esi
call fcn.1400544b0
test eax, eax
jne 0x1400590d8
xor r14d, r14d
lea r8, [rsp + 0x68]
mov edx, r14d
mov rcx, r13
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x140059529
lea rax, [rsp + 0x44]
xor r9d, r9d
lea rdx, [rsp + 0x68]
mov qword [rsp + 0x30], rax
lea rax, [rbp + 0xa0]
lea r8d, [r9 + 0x23]
mov rcx, r13
mov dword [rsp + 0x28], 0x104
mov dword [rsp + 0x44], 0x104
mov qword [rsp + 0x20], rax
mov byte [rbp + 0xa0], 0
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
test eax, eax
jne 0x1400591c9
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.MakeAllBtDevsNonRemovable:_SetupDiGetDeviceRegistryProperty_SPDRP_LOCATION_PATHS__failed._err_d_n
mov ecx, ebx
mov r8d, eax
call fcn.140046d10
jmp 0x140059517
lea rdx, [rsp + 0x68]
xor r9d, r9d
mov r8d, ebx
mov rcx, r13
mov dword [rsp + 0x28], 0x20019
mov dword [rsp + 0x20], ebx
call qword [sym.imp.SETUPAPI.dll_SetupDiOpenDevRegKey]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x140059204
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.MakeAllBtDevsNonRemovable:_SetupDiOpenDevRegKey_failed._err_d_LocationPaths_hs_n
jmp 0x140059506
lea rax, [rsp + 0x44]
lea rdx, str.RemovableOverride
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x48]
xor r8d, r8d
mov rcx, rdi
mov dword [rsp + 0x44], 4
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov rcx, rdi
mov esi, eax
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x140059259
mov r8d, esi
lea rdx, str.MakeAllBtDevsNonRemovable:_no_RemovableOverride._RegQueryValueEx_returned__d._LocationPaths_hs_n
mov ecx, 4
jmp 0x14005950b
cmp dword [rsp + 0x48], 0
jne 0x14005927d
lea r8, [rbp + 0xa0]
lea rdx, str.MakeAllBtDevsNonRemovable:_no_RemovableOverride._LocationPaths_hs_n
mov ecx, 4
call fcn.140046d10
jmp 0x140059517
mov edx, dword [rsp + 0x7c]
lea rcx, [rsp + 0x40]
xor r8d, r8d
call qword [sym.imp.SETUPAPI.dll_CM_Get_Parent]
test eax, eax
je 0x14005929f
lea rdx, str.MakeAllBtDevsNonRemovable:_CM_Get_Parent_failed._err_d_LocationPaths_hs_n
jmp 0x140059506
xor edx, edx
mov rcx, r12
xor r10d, r10d
call fcn.1400544b0
test eax, eax
je 0x1400592dc
mov r9, qword [r12 + 8]
mov r11d, dword [rsp + 0x40]
add r9, 0x18
cmp r11d, dword [r9]
je 0x1400592dc
add r10d, ebx
mov rcx, r12
add r9, 0x1b0
mov edx, r10d
call fcn.1400544b0
test eax, eax
jne 0x1400592be
mov edx, r10d
mov rcx, r12
call fcn.1400544b0
mov edi, eax
test eax, eax
je 0x140059321
lea rcx, [rbp + 0xa0]
mov edx, 0x23
call fcn.1400616a8
test rax, rax
jne 0x140059318
lea r8, [rbp + 0xa0]
lea rdx, str.MakeAllBtDevsNonRemovable:_wrong_LocationPaths__hs_n
mov ecx, ebx
jmp 0x140059273
mov byte [rax], 0
mov ecx, dword [rsp + 0x40]
jmp 0x140059329
mov ecx, dword [rsp + 0x7c]
mov dword [rsp + 0x40], ecx
lea rdx, [rbp - 0x70]
xor r9d, r9d
mov r8d, 0x104
call qword [sym.imp.SETUPAPI.dll_CM_Get_Device_IDA]
test eax, eax
je 0x14005934c
lea rdx, str.MakeAllBtDevsNonRemovable:_CM_Get_Device_ID._err_d_LocationPaths_hs_n
jmp 0x140059506
lea rcx, [rbp - 0x70]
mov edx, 0x104
call fcn.14005d740
lea rdx, str.USBVID_
lea rcx, [rbp - 0x70]
mov r8d, 8
call fcn.14005bbb0
test eax, eax
je 0x140059381
lea r8, [rbp - 0x70]
lea rdx, str.MakeAllBtDevsNonRemovable:_wrong_instance_id__hs_n
jmp 0x140059311
lea rcx, [rbp - 0x70]
mov edx, 0x5c
mov byte [rbp - 0x6d], 0x23
call fcn.140061e90
test rax, rax
jne 0x1400593a8
lea r8, [rbp - 0x70]
lea rdx, str.MakeAllBtDevsNonRemovable:_wrong_InstanceId__hs_n
jmp 0x140059311
mov byte [rax], 0
lea rax, [rbp + 0xa0]
lea r9, [rbp - 0x70]
lea r8, str.SYSTEMCurrentControlSetControlDeviceOverrides_hsLocationPaths_hs
lea rcx, [rbp + 0x1b0]
mov edx, 0x104
mov qword [rsp + 0x20], rax
call fcn.14005d88c
lea r11, [rsp + 0x4c]
lea r8, str.Removable
lea rdx, [rbp + 0x1b0]
xor r9d, r9d
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], r11
call fcn.140058330
test eax, eax
je 0x140059517
cmp dword [rsp + 0x4c], 0
je 0x140059419
lea r8, [rbp - 0x70]
lea rdx, str.MakeAllBtDevsNonRemovable:_not_changed._InstanceId_hs_n
jmp 0x14005926e
test edi, edi
je 0x140059464
lea r9, [rbp - 0x70]
lea r8, str.SYSTEMCurrentControlSetControlDeviceOverrides_hsChildLocationPaths
lea rcx, [rbp + 0x1b0]
mov edx, 0x104
call fcn.14005d88c
and qword [rsp + 0x20], 0
lea r8, str.Removable
lea rdx, [rbp + 0x1b0]
xor r9d, r9d
mov rcx, 0xffffffff80000002
call fcn.140058330
test eax, eax
je 0x140059517
lea r8, [rbp - 0x70]
mov ecx, 4
test r15d, r15d
jne 0x14005947e
lea rdx, str.MakeAllBtDevsNonRemovable:_do_not_notify_system._InstanceId_hs_n
jmp 0x140059273
lea rdx, str.MakeAllBtDevsNonRemovable:_notify_system._InstanceId_hs_n
call fcn.140046d10
xor edx, edx
lea rcx, [rsp + 0x54]
lea r8d, [rdx + 0x10]
call fcn.14005bab0
lea r8, [rsp + 0x50]
lea rdx, [rsp + 0x68]
mov r9d, reloc.WS2_32.dll_sendto
mov rcx, r13
mov dword [rsp + 0x50], 8
mov dword [rsp + 0x54], socket
mov dword [rsp + 0x58], 3
mov dword [rsp + 0x5c], ebx
call qword [sym.imp.SETUPAPI.dll_SetupDiSetClassInstallParamsA]
test eax, eax
jne 0x1400594e2
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.MakeAllBtDevsNonRemovable:_SetupDiSetClassInstallParams_failed._err_d_LocationPaths_hs_n
jmp 0x140059506
lea r8, [rsp + 0x68]
mov rdx, r13
mov ecx, sendto
call qword [sym.imp.SETUPAPI.dll_SetupDiCallClassInstaller]
test eax, eax
jne 0x140059517
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.MakeAllBtDevsNonRemovable:_SetupDiCallClassInstaller_failed._err_d_LocationPaths_hs_n
mov ecx, ebx
mov r8d, eax
lea r9, [rbp + 0xa0]
call fcn.140046d10
add r14d, ebx
cmp r14d, 0x3e8
jb 0x14005914e
jmp 0x140059543
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.MakeAllBtDevsNonRemovable:_no_more_devices._SetupDiEnumDeviceInfo_returned__d__n
mov ecx, 4
mov r8d, eax
call fcn.140046d10
mov rcx, r13
call qword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov rcx, qword [rbp + 0x2c0]
xor rcx, rsp
call fcn.14005ba20
lea r11, [rsp + 0x3d0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret