Function at 0x14004a210
Capabilities:
Query or enumerate registry key
Query or enumerate registry value
Set registry value

Disassembly:
push rbp
push r13
push r14
lea rbp, [rsp - 0x53d0]
mov eax, 0x54d0
call fcn.14005ba50
sub rsp, rax
mov qword [rsp + 0x78], 0xfffffffffffffffe
mov qword [rsp + 0x54f0], rbx
mov qword [rsp + 0x54f8], rsi
mov qword [rsp + 0x5500], rdi
mov qword [rsp + 0x5508], r12
mov rax, qword [0x1400d9180]
xor rax, rsp
mov qword [rbp + 0x53c0], rax
lea rcx, [rbp + 0x10]
call fcn.1400261f4
mov rbx, 0xffffffff80000002
mov qword [rbp + 0x428], rbx
lea rcx, [rbp + 0x10]
call fcn.140022d94
mov edx, dword [rbp + 0x2810]
xor r13d, r13d
test edx, edx
je 0x14004a2a3
lea rcx, str.DisableSelectiveSuspend:_m_dwSelectiveSuspendEnabled__d_n
call fcn.1400300fc
jmp 0x14004a6c6
mov word [rbp + 0x4fa0], r13w
lea r8, [rbp + 0x2814]
mov r14d, 0x104
mov edx, r14d
lea rcx, [rbp + 0x4fa0]
call fcn.14005fbe4
lea rdx, [rbp + 0x4fa0]
lea rcx, str.DisableSelectiveSuspend:_szPidVidList__s_n
call fcn.1400300fc
lea rcx, [rbp + 0x4fa0]
call fcn.14005d25c
test rax, rax
je 0x14004a6c6
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov r9d, 0x2000e
xor r8d, r8d
lea rdx, str.SYSTEMCurrentControlSetEnumUSB
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x14004a329
lea rcx, str.DisableSelectiveSuspend:_Reg_open_failed_SYSTEMCurrentControlSetEnumUSB__n
call fcn.1400300fc
xor eax, eax
jmp 0x14004a6cb
mov rax, qword [str.BT2K_INS.dll]
mov qword [rbp + 0x4b60], rax
mov rax, qword [0x14009df60]
mov qword [rbp + 0x4b68], rax
mov rax, qword [0x14009df68]
mov qword [rbp + 0x4b70], rax
movzx eax, word [0x14009df70]
mov word [rbp + 0x4b78], ax
mov word [rbp + 0x51b0], r13w
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp + 0x51b2]
call fcn.14005bab0
lea rcx, [rbp + 0x32b0]
call fcn.140026df4
lea rcx, [rbp + 0x32b0]
call fcn.140022d94
mov rdx, r14
lea rcx, [rbp + 0x51b0]
test eax, eax
jne 0x14004a3c4
lea rax, [rbp + 0x4b60]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x36d0]
lea r8, [0x14009a050]
call fcn.14005ce1c
jmp 0x14004a3d7
lea r9, [rbp + 0x4b60]
lea r8, [0x14009df50]
call fcn.14005ce1c
mov r12d, r13d
xor edx, edx
jmp 0x14004a66f
lea rdx, [rbp + 0x4b80]
lea rcx, str.DisableSelectiveSuspend:_found_VID_PID__s__n
call fcn.1400300fc
lea rdx, [rbp + 0x4b80]
lea rcx, [rbp + 0x4fa0]
call fcn.1400604d4
test rax, rax
je 0x14004a669
lea rcx, str.DisableSelectiveSuspend:_matches_PID_VID_in_list_n
call fcn.1400300fc
lea r11, [rsp + 0x58]
mov qword [rsp + 0x20], r11
mov r9d, 0x2000e
xor r8d, r8d
lea rdx, [rbp + 0x4b80]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14004a656
mov esi, r13d
xor edx, edx
jmp 0x14004a5fd
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
mov r9d, 0x2000e
xor r8d, r8d
lea rdx, [rbp + 0x4d90]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14004a5e6
lea rax, [rsp + 0x68]
mov qword [rsp + 0x20], rax
mov r9d, 0x2000f
xor r8d, r8d
lea rdx, str.Device_Parameters
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14004a5cd
mov dword [rsp + 0x60], 4
mov dword [rsp + 0x40], r13d
lea rax, [rsp + 0x60]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea rdx, str.SelectiveSuspendEnabled
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x14004a505
mov edx, dword [rsp + 0x40]
lea rcx, str.DisableSelectiveSuspend:_RegQueryValueEx_SelectiveSuspendEnabled_value___d_n
call fcn.1400300fc
cmp dword [rsp + 0x40], r13d
je 0x14004a5d9
mov dword [rsp + 0x40], r13d
mov dword [rsp + 0x28], 4
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
lea rdx, str.SelectiveSuspendEnabled
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea rcx, str.DisableSelectiveSuspend:_SelectiveSuspendEnabled__0_set__n
call fcn.1400300fc
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rcx, [rbp + 0x51b0]
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rbx, rax
test rax, rax
je 0x14004a5d9
lea rdx, str.BT2K_RefreshDevice
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rdi, rax
test rax, rax
je 0x14004a5c2
lea rax, [rbp - 0x78]
mov qword [rbp - 0x80], rax
mov r8d, 3
lea rdx, [rbp + 0x4b80]
lea rcx, [rbp - 0x80]
call fcn.14004b928
nop
mov rcx, qword [rbp - 0x80]
call rdi
mov edi, eax
lea rax, [rbp - 0x78]
mov rcx, qword [rbp - 0x80]
cmp rcx, rax
je 0x14004a5b4
call fcn.14005c1e4
mov edx, edi
lea rcx, str.DisableSelectiveSuspend:_BT2K_RefreshDevice__d_n
call fcn.1400300fc
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x14004a5d9
lea rcx, str.DisableSelectiveSuspend:_RegOpenKeyEx_false_Device_Parameters__n
call fcn.1400300fc
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x14004a5f9
lea rdx, [rbp + 0x4d90]
lea rcx, str.DisableSelectiveSuspend:_RegOpenKeyEx_false__s_n
call fcn.1400300fc
inc esi
mov edx, esi
mov qword [rsp + 0x38], r13
mov qword [rsp + 0x30], r13
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x20], r13
mov word [rbp + 0x4d90], r13w
mov dword [rsp + 0x48], r14d
lea r9, [rsp + 0x48]
lea r8, [rbp + 0x4d90]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
je 0x14004a453
lea rcx, str.DisableSelectiveSuspend:_RegEnumKeyEx_szKeyNameDevInstance_false_n
call fcn.1400300fc
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x14004a669
lea rdx, [rbp + 0x4b80]
lea rcx, str.DisableSelectiveSuspend:_RegOpenKeyEx_false__s_n
call fcn.1400300fc
inc r12d
mov edx, r12d
mov qword [rsp + 0x38], r13
mov qword [rsp + 0x30], r13
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x20], r13
mov word [rbp + 0x4b80], r13w
mov dword [rsp + 0x44], r14d
lea r9, [rsp + 0x44]
lea r8, [rbp + 0x4b80]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
je 0x14004a3e1
lea rcx, str.DisableSelectiveSuspend:_RegEnumKeyEx_szKeyNamePidVid_false_n
call fcn.1400300fc
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 1
mov rcx, qword [rbp + 0x53c0]
xor rcx, rsp
call fcn.14005ba20
lea r11, [rsp + 0x54d0]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov r12, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop r13
pop rbp
ret