Function at 0x14001cc10
Capabilities:
Query or enumerate registry value

Disassembly:
push rbx
push rbp
push rsi
push r13
sub rsp, 0x278
mov rbx, rcx
mov rbp, rdx
lea rcx, str.GetDeviceProfileFromReg_called._mRegHandle__0x_x
mov rdx, r8
mov esi, r9d
mov r13, r8
call fcn.14000cbb0
test r13, r13
jne 0x14001cc4c
xor eax, eax
add rsp, 0x278
pop r13
pop rsi
pop rbp
pop rbx
ret
mov qword [rsp + 0x2a0], rdi
lea rcx, [rsp + 0x50]
xor edx, edx
mov r8d, 0x104
mov qword [rsp + 0x2a8], r12
mov qword [rsp + 0x270], r14
call fcn.14007cd30
xor r14d, r14d
cmp esi, 1
mov qword [rsp + 0x40], r14
mov dword [rsp + 0x2b0], r14d
mov dword [rsp + 0x30], r14d
jne 0x14001cca3
lea rdx, str.Connected_
lea rcx, [rsp + 0x50]
call fcn.14001bdd0
jmp 0x14001ccbe
cmp esi, 2
je 0x14001ccad
cmp esi, 3
jne 0x14001ccbe
lea rdx, str.Selected_
lea rcx, [rsp + 0x50]
call fcn.14001bdd0
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x50]
repne scasb al, byte [rdi]
xor ecx, ecx
nop
movzx eax, byte [rbp + rcx + 8]
add rcx, 1
test al, al
mov byte [rdi + rcx - 2], al
jne 0x14001ccd0
lea rcx, [rsp + 0x50]
call fcn.14000cbb0
lea rdx, [rsp + 0x40]
mov r9d, 0x2001f
mov qword [rsp + 0x20], rdx
lea rdx, [rsp + 0x50]
xor r8d, r8d
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x14001cd69
lea rcx, str.GetDeviceProfileFromReg._Profile_doesnt_exist_n
call fcn.14000cbb0
cmp esi, 1
jne 0x14001cd28
bt dword [rbx + 0x3c], 0x14
jb 0x14001cd3a
cmp dword [rbx + 0x470], 0x10
jne 0x14001cd62
cmp dword [rbx + 0xba8], 4
jne 0x14001cd62
lea rcx, str.GetDeviceProfileFromReg._Try_selected_profile_n
call fcn.14000cbb0
lea r8, [rbp + 8]
mov r9, r13
mov rdx, rbp
mov rcx, rbx
call fcn.14001ca60
test eax, eax
mov edi, eax
jne 0x14001ce99
xor eax, eax
jmp 0x14001cfad
cmp esi, 1
jne 0x14001cd75
bt dword [rbx + 0x3c], 0x14
jb 0x14001cd8f
cmp dword [rbx + 0x470], 0x10
jne 0x14001ce58
cmp dword [rbx + 0xba8], 4
jne 0x14001ce58
lea rcx, [rsp + 0x160]
xor edx, edx
mov r8d, 0x104
call fcn.14007cd30
lea rcx, str.GetDeviceProfileFromReg:_try_to_find_selected_key_n
call fcn.14000cbb0
mov rcx, qword [rsp + 0x40]
lea rax, [rsp + 0x2b0]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x160]
lea r9, [rsp + 0x30]
lea rdx, str.SelectedProfileKey
xor r8d, r8d
mov dword [rsp + 0x30], 7
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x2b0], 0x104
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x14001ce58
cmp byte [rsp + 0x160], r14b
je 0x14001ce58
lea r8, [rsp + 0x160]
mov r9, r13
mov rdx, rbp
mov rcx, rbx
call fcn.14001ca60
test eax, eax
mov edi, eax
je 0x14001ce4c
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rdx, [rsp + 0x160]
lea rcx, str.GetDeviceProfileFromReg:_using_this_selected_key:__s_n
call fcn.14000cbb0
lea rcx, [0x1400e1d00]
jmp 0x14001cf79
lea rcx, str.GetDeviceProfileFromReg:_using_this_selected_key:_doesnt_exist._using_connected_profile_instead_n
call fcn.14000cbb0
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp esi, 1
jne 0x14001ce6f
bt dword [rbx + 0x3c], 0x14
jb 0x14001ce81
cmp dword [rbx + 0x470], 0x10
jne 0x14001cea5
cmp dword [rbx + 0xba8], 4
jne 0x14001cea5
lea r8, [rbp + 8]
mov r9, r13
mov rdx, rbp
mov rcx, rbx
call fcn.14001ca60
test eax, eax
mov edi, eax
je 0x14001cea5
lea rcx, [0x1400e1d00]
jmp 0x14001cf79
test rbp, rbp
je 0x14001cf9c
lea rax, [rsp + 0x38]
lea rdx, [rsp + 0x50]
mov r9d, 0x2001f
xor r8d, r8d
mov rcx, r13
mov qword [rsp + 0x38], r14
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x14001ceee
lea rdx, [rsp + 0x50]
lea rcx, str.CAutoDisplay::GetProfileFromReg._Failed_to_open_key___s__n
call fcn.14000cbb0
jmp 0x14001cfa8
mov rdx, qword [rsp + 0x38]
lea rcx, [rbx + 0x40]
call fcn.140041310
test eax, eax
jne 0x14001cf1c
lea rcx, str.CAutoDisplay::GetProfileFromReg._Failed_to_UpdateFromRegistry
call fcn.14000cbb0
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x14001cfa8
lea rdx, [rbx + 0xf4]
mov rcx, rbp
mov r8d, 0x1a0
call fcn.14007d090
mov r11d, dword [rbx + 0x45c]
test r11b, 2
je 0x14001cf5e
mov rdx, qword [rsp + 0x38]
and r11d, 0xfffffffd
mov byte [rbx + 0xcb4], 1
or dword [rbx + 0x45c], r11d
lea rcx, [rbx + 0x40]
call fcn.1400410d0
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, 1
cmp esi, edi
jne 0x14001cf89
lea rcx, [0x1400e1fb0]
mov rdx, rbp
mov r8d, 0x1a0
call fcn.14007d090
jmp 0x14001cfab
cmp esi, 2
je 0x14001cf93
cmp esi, 3
jne 0x14001cfab
lea rcx, [0x1400e1d00]
jmp 0x14001cf79
lea rcx, str.CAutoDisplay::GetProfileFromReg._NULL_pointer_passed._SOFTWAREBUG_n
call fcn.14000cbb0
mov edi, r14d
mov eax, edi
mov r12, qword [rsp + 0x2a8]
mov rdi, qword [rsp + 0x2a0]
mov r14, qword [rsp + 0x270]
add rsp, 0x278
pop r13
pop rsi
pop rbp
pop rbx
ret