Function at 0x1400401b0
Capabilities:
Query or enumerate registry value

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x258]
sub rsp, 0x330
mov qword [rbp], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x1402f8c60]
xor rax, rsp
mov qword [rbp + 0x220], rax
mov r13, rcx
mov qword [rbp - 0x68], rcx
lea r8, str.KBBDarfonCall::GetKBBStatusFromDarfon
mov qword [rbp - 0x30], r8
lea r12, str.c:users_scddocumentsmyworkproject__dynabooksystemdriverdsd_for_tos6208_v6dsd_branch_dev_6.01.0029.xxcentennial_rs5dynabookecoservice_tecohcilibkbbdarfoncall.cpp
mov qword [rbp - 0x28], r12
mov dword [rbp - 0x20], 0x26
lea r15, str.__KBBDarfonCall::GetKBBStatusFromDarfon_
mov qword [rbp - 0x18], r15
lea rsi, [0x1402a214c]
mov qword [rbp - 0x10], rsi
mov dword [rbp - 8], 3
lea rdx, str.ENTER__s
lea rcx, [rbp - 0x28]
call fcn.140008d50
nop
mov edi, 0x80004005
mov ebx, edi
mov r14d, 5
test r13, r13
jne 0x14004028b
mov qword [rsp + 0x70], r12
mov dword [rsp + 0x78], 0x2d
mov qword [rbp - 0x80], r15
mov qword [rbp - 0x78], rsi
xor esi, esi
mov dword [rbp - 0x70], esi
mov edi, 0x80004003
mov r8d, edi
lea rdx, str.Error_Code:_0x_x
lea rcx, [rsp + 0x70]
call fcn.140008d50
jmp 0x14004096b
xor esi, esi
mov dword [rsp + 0x60], esi
mov dword [rsp + 0x6c], 0xf
mov dword [rsp + 0x64], 0xffffffff
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp + 0x10]
call fcn.1401f5d40
mov r15d, esi
mov qword [rsp + 0x70], rsi
mov dword [rsp + 0x78], esi
mov qword [rbp - 0x80], rsi
mov qword [rsp + 0x58], rsi
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
lea rdx, str.SoftwareDynabookeco_Utility
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140040916
mov dword [rsp + 0x78], esi
mov r15, qword [rsp + 0x58]
mov qword [rsp + 0x70], r15
mov dword [rsp + 0x78], esi
mov dword [rsp + 0x68], 0x208
lea rax, [rsp + 0x68]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x10]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x58]
xor r8d, r8d
lea rdx, str.KBBDllPath
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140040360
mov eax, dword [rsp + 0x58]
dec eax
cmp eax, 1
ja 0x140040360
mov eax, dword [rsp + 0x68]
test eax, eax
je 0x14004036d
test al, 1
jne 0x140040360
shr rax, 1
cmp word [rbp + rax*2 + 0xe], si
je 0x140040371
mov dword [rsp + 0x38], 0x3e
jmp 0x14004091e
mov word [rbp + 0x10], si
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x38], 0x40
lea rax, str.__KBBDarfonCall::GetKBBStatusFromDarfon_
mov qword [rsp + 0x40], rax
lea rax, [0x1402a214c]
mov qword [rsp + 0x48], rax
mov dword [rsp + 0x50], 3
lea r8, [rbp + 0x10]
lea rdx, str.KBB_dll_path:__s
lea rcx, [rsp + 0x30]
call fcn.140008d50
lea rdx, [rbp + 0x10]
lea r8, str.KT1KGF.dll
mov rcx, 0xffffffffffffffff
movzx eax, word [rdx + rcx*2 + 2]
cmp ax, word [r8 + rcx*2 + 2]
jne 0x140040912
add rcx, 2
cmp rcx, 0xb
je 0x1400403f1
movzx eax, word [rdx + rcx*2]
cmp ax, word [r8 + rcx*2]
jne 0x140040912
jmp 0x1400403c5
lea rcx, [rbp + 0x10]
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov qword [rsp + 0x58], rax
test rax, rax
jne 0x140040417
mov dword [rsp + 0x38], 0x53
mov edi, 0x80004003
jmp 0x14004091e
lea rdx, str.GetKeyboardModel
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov r12, rax
test rax, rax
jne 0x14004048d
mov edi, 0x80004003
mov ebx, edi
lea rax, str.c:users_scddocumentsmyworkproject__dynabooksystemdriverdsd_for_tos6208_v6dsd_branch_dev_6.01.0029.xxcentennial_rs5dynabookecoservice_tecohcilibkbbdarfoncall.cpp
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x38], 0x56
lea rax, str.__KBBDarfonCall::GetKBBStatusFromDarfon_
mov qword [rsp + 0x40], rax
lea rax, [0x1402a214c]
mov qword [rsp + 0x48], rax
mov dword [rsp + 0x50], esi
mov r8d, edi
lea rdx, str.Error_Code:_0x_x
lea rcx, [rsp + 0x30]
call fcn.140008d50
mov r12, qword [rsp + 0x58]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x140040954
lea rsi, str.c:users_scddocumentsmyworkproject__dynabooksystemdriverdsd_for_tos6208_v6dsd_branch_dev_6.01.0029.xxcentennial_rs5dynabookecoservice_tecohcilibkbbdarfoncall.cpp
lea rdi, [0x1402a214c]
lea r13, str.__KBBDarfonCall::GetKBBStatusFromDarfon_
lea rcx, [rsp + 0x64]
call r12
movzx ebx, al
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x38], 0x5b
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x48], rdi
mov dword [rsp + 0x50], 3
mov r15d, ebx
mov r9d, ebx
mov r8d, r14d
lea rdx, str.GetKeyboardMode__retry:__d__result:__d
lea rcx, [rsp + 0x30]
call fcn.140008d50
test bl, bl
jne 0x1400404fb
mov ecx, 0x64
call qword [sym.imp.KERNEL32.dll_Sleep]
sub r14d, 1
jne 0x1400404a2
lea r14, str.c:users_scddocumentsmyworkproject__dynabooksystemdriverdsd_for_tos6208_v6dsd_branch_dev_6.01.0029.xxcentennial_rs5dynabookecoservice_tecohcilibkbbdarfoncall.cpp
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x38], 0x64
lea rbx, str.__KBBDarfonCall::GetKBBStatusFromDarfon_
mov qword [rsp + 0x40], rbx
lea r12, [0x1402a214c]
mov qword [rsp + 0x48], r12
mov dword [rsp + 0x50], 3
mov r8d, r15d
lea rdx, str.GetKeyboardModel_return:__d
lea rcx, [rsp + 0x30]
call fcn.140008d50
test r15d, r15d
mov edi, 0x80004005
mov esi, 0
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x48], r12
lea rcx, [rsp + 0x30]
jne 0x14004058f
mov ebx, edi
mov dword [rsp + 0x38], 0x65
lea rax, str.__KBBDarfonCall::GetKBBStatusFromDarfon_
mov qword [rsp + 0x40], rax
mov dword [rsp + 0x50], esi
mov r8d, edi
lea rdx, str.Error_Code:_0x_x
call fcn.140008d50
jmp 0x1400408ff
mov dword [rsp + 0x38], 0x67
mov qword [rsp + 0x40], rbx
mov dword [rsp + 0x50], 3
mov r8d, dword [rsp + 0x64]
lea rdx, str.Keyboard_mode:__d
call fcn.140008d50
cmp dword [rsp + 0x64], esi
je 0x1400405f8
mov ebx, edi
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x38], 0x68
lea rax, str.__KBBDarfonCall::GetKBBStatusFromDarfon_
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], r12
mov dword [rsp + 0x50], esi
mov r8d, edi
lea rdx, str.Error_Code:_0x_x
lea rcx, [rsp + 0x30]
call fcn.140008d50
jmp 0x1400408ff
lea rdx, str.BackLightStatus
mov r12, qword [rsp + 0x58]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov r15, rax
lea rcx, [rsp + 0x30]
test rax, rax
jne 0x14004066c
mov edi, 0x80004003
mov ebx, edi
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x38], VarBstrFromDisp
lea rax, str.__KBBDarfonCall::GetKBBStatusFromDarfon_
mov qword [rsp + 0x40], rax
lea rax, [0x1402a214c]
mov qword [rsp + 0x48], rax
mov dword [rsp + 0x50], esi
mov r8d, edi
lea rdx, str.Error_Code:_0x_x
call fcn.140008d50
mov r15, qword [rsp + 0x70]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x140040954
lea r12, str.c:users_scddocumentsmyworkproject__dynabooksystemdriverdsd_for_tos6208_v6dsd_branch_dev_6.01.0029.xxcentennial_rs5dynabookecoservice_tecohcilibkbbdarfoncall.cpp
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x38], VarBstrFromDisp
lea r13, str.__KBBDarfonCall::GetKBBStatusFromDarfon_
mov qword [rsp + 0x40], r13
lea rsi, [0x1402a214c]
mov qword [rsp + 0x48], rsi
mov dword [rsp + 0x50], 3
lea rdx, str.GetProcAddress__BackLightStatus_done_
call fcn.140008d50
mov ebx, 5
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x38], 0x73
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x48], rsi
mov dword [rsp + 0x50], 3
mov r8d, ebx
lea rdx, str.Retry:__d
lea rcx, [rsp + 0x30]
call fcn.140008d50
lea rdx, [rsp + 0x6c]
lea rcx, [rsp + 0x60]
call r15
movzx edi, al
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x38], 0x75
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x48], rsi
mov dword [rsp + 0x50], 3
mov r14d, edi
mov r9d, edi
mov r8d, ebx
lea rdx, str.BackLightStatus__retry:__d__result:__d
lea rcx, [rsp + 0x30]
call fcn.140008d50
test dil, dil
jne 0x140040746
mov ecx, 0x64
call qword [sym.imp.KERNEL32.dll_Sleep]
sub ebx, 1
jne 0x1400406b1
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x38], 0x7f
mov qword [rsp + 0x40], r13
lea r15, [0x1402a214c]
mov qword [rsp + 0x48], r15
mov dword [rsp + 0x50], 3
mov r8d, r14d
lea rdx, str.p_BackLightStatus_return:__d
lea rcx, [rsp + 0x30]
call fcn.140008d50
test dil, dil
jne 0x1400407c2
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x38], 0x82
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x48], r15
mov dword [rsp + 0x50], 3
lea rdx, str.KB_dock_deatch
lea rcx, [rsp + 0x30]
call fcn.140008d50
mov r8d, 3
mov dword [rsp + 0x60], r8d
jmp 0x1400407c7
mov r8d, dword [rsp + 0x60]
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x38], 0x85
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x48], r15
mov dword [rsp + 0x50], 2
mov r9d, dword [rsp + 0x6c]
lea rdx, str.Darfon_KBB_current_state__u__timer__u_
lea rcx, [rsp + 0x30]
call fcn.140008d50
mov ebx, dword [rsp + 0x60]
lea r8, str.KBBDarfonCall::TranslateDarfonKBBStatus
mov qword [rbp - 0x60], r8
mov qword [rbp - 0x58], r12
mov dword [rbp - 0x50], 0x103
lea rdi, str.__KBBDarfonCall::TranslateDarfonKBBStatus_
mov qword [rbp - 0x48], rdi
mov qword [rbp - 0x40], r15
mov dword [rbp - 0x38], 3
lea rdx, str.ENTER__s
lea rcx, [rbp - 0x58]
call fcn.140008d50
nop
test ebx, ebx
mov r13, qword [rbp - 0x68]
je 0x1400408a4
sub ebx, 1
je 0x14004089a
sub ebx, 1
je 0x140040890
cmp ebx, 1
je 0x140040886
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x38], 0x115
mov qword [rsp + 0x40], rdi
mov qword [rsp + 0x48], r15
mov dword [rsp + 0x50], 3
lea rdx, str.Darfon_KBB_status_error.
lea rcx, [rsp + 0x30]
call fcn.140008d50
jmp 0x1400408ac
mov dword [r13], 5
jmp 0x1400408ac
mov dword [r13], 1
jmp 0x1400408ac
mov dword [r13], 3
jmp 0x1400408ac
mov dword [r13], 4
mov r8, qword [rbp - 0x60]
lea rdx, str.LEAVE__s
lea rcx, [rbp - 0x58]
call fcn.140008d50
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x38], 0x88
lea rax, str.__KBBDarfonCall::GetKBBStatusFromDarfon_
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], r15
mov dword [rsp + 0x50], 3
mov r8d, dword [r13]
lea rdx, str.After_translate_KBB_state__d
lea rcx, [rsp + 0x30]
call fcn.140008d50
xor esi, esi
mov ebx, esi
mov r15, qword [rsp + 0x70]
mov r12, qword [rsp + 0x58]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov edi, ebx
jmp 0x140040954
mov dword [rsp + 0x38], 0x3b
lea rax, str.__KBBDarfonCall::GetKBBStatusFromDarfon_
mov qword [rsp + 0x40], rax
lea rax, [0x1402a214c]
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x48], rax
mov dword [rsp + 0x50], esi
mov r8d, edi
lea rdx, str.Error_Code:_0x_x
lea rcx, [rsp + 0x30]
call fcn.140008d50
nop
test r15, r15
je 0x140040967
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov qword [rsp + 0x70], rsi
mov dword [rsp + 0x78], esi
mov r8, qword [rbp - 0x30]
lea rdx, str.LEAVE__s
lea rcx, [rbp - 0x28]
call fcn.140008d50
mov eax, edi
mov rcx, qword [rbp + 0x220]
xor rcx, rsp
call fcn.140072680
lea r11, [rsp + 0x330]
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