Function at 0x1400409c0
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 + 8], 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 ebx, ecx
mov dword [rbp - 0x5c], ecx
lea r8, str.KBBDarfonCall::SetKBBStatusFromDarfon
mov qword [rbp - 0x28], r8
lea r12, str.c:users_scddocumentsmyworkproject__dynabooksystemdriverdsd_for_tos6208_v6dsd_branch_dev_6.01.0029.xxcentennial_rs5dynabookecoservice_tecohcilibkbbdarfoncall.cpp
mov qword [rbp - 0x20], r12
mov dword [rbp - 0x18], 0x97
lea rax, str.__KBBDarfonCall::SetKBBStatusFromDarfon_
mov qword [rbp - 0x10], rax
lea rdi, [0x1402a214c]
mov qword [rbp - 8], rdi
mov dword [rbp], 3
lea rdx, str.ENTER__s
lea rcx, [rbp - 0x20]
call fcn.140008d50
nop
mov esi, 5
mov r14d, esi
mov dword [rsp + 0x60], 0xf
xor r15d, r15d
mov r13d, r15d
mov dword [rbp - 0x60], r15d
mov dword [rsp + 0x64], r15d
lea r8, str.KBBDarfonCall::GetKBBSetTimer
mov qword [rsp + 0x30], r8
mov qword [rsp + 0x38], r12
mov dword [rsp + 0x40], 0x138
lea rax, str.__KBBDarfonCall::GetKBBSetTimer_
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x50], rdi
mov dword [rsp + 0x58], 3
lea rdx, str.ENTER__s
lea rcx, [rsp + 0x38]
call fcn.140008d50
nop
mov qword [rsp + 0x70], r12
mov dword [rsp + 0x78], 0x13b
lea rax, str.__KBBDarfonCall::GetKBBSetTimer_
mov qword [rbp - 0x80], rax
mov qword [rbp - 0x78], rdi
mov dword [rbp - 0x70], 3
lea rdx, str.Try_to_GetTimerFromBIOS
lea rcx, [rsp + 0x70]
call fcn.140008d50
lea rcx, [rsp + 0x60]
call fcn.1400411c0
test eax, eax
jns 0x140040b72
mov qword [rsp + 0x70], r12
mov dword [rsp + 0x78], 0x13e
lea rax, str.__KBBDarfonCall::GetKBBSetTimer_
mov qword [rbp - 0x80], rax
mov qword [rbp - 0x78], rdi
mov dword [rbp - 0x70], 3
lea rdx, str.Try_to_GetTimerFromReg
lea rcx, [rsp + 0x70]
call fcn.140008d50
lea rcx, [rsp + 0x60]
call fcn.140041430
test eax, eax
jns 0x140040b72
mov qword [rsp + 0x70], r12
mov dword [rsp + 0x78], 0x141
lea rax, str.__KBBDarfonCall::GetKBBSetTimer_
mov qword [rbp - 0x80], rax
mov qword [rbp - 0x78], rdi
mov dword [rbp - 0x70], 3
lea rdx, str.Use_default_KBB_timer.
lea rcx, [rsp + 0x70]
call fcn.140008d50
mov dword [rsp + 0x60], 0xf
mov r8, qword [rsp + 0x30]
lea rdx, str.LEAVE__s
lea rcx, [rsp + 0x38]
call fcn.140008d50
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp + 0x10]
call fcn.1401f5d40
mov qword [rsp + 0x70], r15
xor eax, eax
mov dword [rsp + 0x78], eax
mov qword [rbp - 0x80], rax
mov qword [rsp + 0x68], rax
lea rax, [rsp + 0x68]
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 0x140041115
xor r15d, r15d
mov dword [rsp + 0x78], r15d
mov rdi, qword [rsp + 0x68]
mov qword [rsp + 0x70], rdi
mov dword [rsp + 0x78], r15d
mov dword [rbp - 0x68], 0x208
lea rax, [rbp - 0x68]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x10]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x68]
xor r8d, r8d
lea rdx, str.KBBDllPath
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140040c49
mov eax, dword [rsp + 0x68]
dec eax
cmp eax, 1
ja 0x140040c49
mov eax, dword [rbp - 0x68]
test eax, eax
je 0x140040c7d
test al, 1
jne 0x140040c49
shr rax, 1
cmp word [rbp + rax*2 + 0xe], r15w
je 0x140040c82
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x38], 0xb0
lea rax, str.__KBBDarfonCall::SetKBBStatusFromDarfon_
mov qword [rsp + 0x40], rax
lea rax, [0x1402a214c]
mov qword [rsp + 0x48], rax
mov dword [rsp + 0x50], r15d
mov ebx, 0x80004005
jmp 0x140040d02
mov word [rbp + 0x10], r15w
lea r15, str.c:users_scddocumentsmyworkproject__dynabooksystemdriverdsd_for_tos6208_v6dsd_branch_dev_6.01.0029.xxcentennial_rs5dynabookecoservice_tecohcilibkbbdarfoncall.cpp
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x38], UnRegisterTypeLib
lea r12, str.__KBBDarfonCall::SetKBBStatusFromDarfon_
mov qword [rsp + 0x40], r12
lea rdi, [0x1402a214c]
mov qword [rsp + 0x48], rdi
mov dword [rsp + 0x50], 3
lea r8, [rbp + 0x10]
lea rdx, str.KBB_dll_path:__s
lea rcx, [rsp + 0x30]
call fcn.140008d50
lea rcx, [rbp + 0x10]
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov r8, rax
mov qword [rsp + 0x68], rax
test rax, rax
jne 0x140040d20
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x38], UnRegisterTypeLib
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x48], rdi
mov dword [rsp + 0x50], eax
mov ebx, 0x80004003
mov r8d, ebx
lea rdx, str.Error_Code:_0x_x
lea rcx, [rsp + 0x30]
call fcn.140008d50
mov r15, qword [rsp + 0x70]
jmp 0x140041154
lea rdx, [rbp + 0x10]
lea r9, str.KT1KGF.dll
mov rcx, 0xffffffffffffffff
movzx eax, word [rdx + rcx*2 + 2]
cmp ax, word [r9 + rcx*2 + 2]
jne 0x140040d54
add rcx, 2
cmp rcx, 0xb
je 0x140040d5f
movzx eax, word [rdx + rcx*2]
cmp ax, word [r9 + rcx*2]
je 0x140040d32
mov r12d, 2
jmp 0x140040f50
mov qword [rbp - 0x68], 1
lea rdx, str.GetKeyboardModel
mov rcx, r8
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov r15, rax
test rax, rax
jne 0x140040de3
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], 0xc7
mov ebx, 0x80004003
lea rax, str.__KBBDarfonCall::SetKBBStatusFromDarfon_
mov qword [rsp + 0x40], rax
mov dword [rsp + 0x50], 0
mov edi, ebx
lea rax, [0x1402a214c]
mov qword [rsp + 0x48], rax
mov r8d, ebx
lea rdx, str.Error_Code:_0x_x
lea rcx, [rsp + 0x30]
call fcn.140008d50
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov r15, qword [rsp + 0x70]
jmp 0x140041156
lea r13, str.c:users_scddocumentsmyworkproject__dynabooksystemdriverdsd_for_tos6208_v6dsd_branch_dev_6.01.0029.xxcentennial_rs5dynabookecoservice_tecohcilibkbbdarfoncall.cpp
lea r12, [0x1402a214c]
lea rsi, str.__KBBDarfonCall::SetKBBStatusFromDarfon_
lea rcx, [rsp + 0x64]
call r15
movzx ebx, al
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x38], 0xcc
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x48], r12
mov dword [rsp + 0x50], 3
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 0x140040e4e
mov ecx, 0x64
call qword [sym.imp.KERNEL32.dll_Sleep]
sub r14d, 1
jne 0x140040df8
lea r15, str.c:users_scddocumentsmyworkproject__dynabooksystemdriverdsd_for_tos6208_v6dsd_branch_dev_6.01.0029.xxcentennial_rs5dynabookecoservice_tecohcilibkbbdarfoncall.cpp
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x38], 0xd5
lea r14, str.__KBBDarfonCall::SetKBBStatusFromDarfon_
mov qword [rsp + 0x40], r14
mov qword [rsp + 0x48], r12
mov dword [rsp + 0x50], 3
mov r8d, ebx
lea rdx, str.GetKeyboardModel_return:__d
lea rcx, [rsp + 0x30]
call fcn.140008d50
test bl, bl
mov esi, 5
mov r12, qword [rbp - 0x68]
mov r13d, dword [rbp - 0x60]
mov qword [rsp + 0x30], r15
mov qword [rsp + 0x40], r14
lea rcx, [rsp + 0x30]
jne 0x140040ef3
mov ebx, 0x80004005
mov edi, ebx
mov dword [rsp + 0x38], 0xd6
lea rax, [0x1402a214c]
mov qword [rsp + 0x48], rax
mov dword [rsp + 0x50], r13d
mov r8d, ebx
lea rdx, str.Error_Code:_0x_x
call fcn.140008d50
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov r15, qword [rsp + 0x70]
jmp 0x140041156
mov dword [rsp + 0x38], 0xd8
lea rdi, [0x1402a214c]
mov qword [rsp + 0x48], rdi
mov dword [rsp + 0x50], 3
mov r8d, dword [rsp + 0x64]
lea rdx, str.Keyboard_mode:__d
call fcn.140008d50
cmp dword [rsp + 0x64], r13d
je 0x140040f48
mov ebx, 0x80004005
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x38], 0xd9
mov qword [rsp + 0x40], r14
mov dword [rsp + 0x50], r13d
jmp 0x140040dac
mov r8, qword [rsp + 0x68]
mov ebx, dword [rbp - 0x5c]
lea rdx, str.SetBackLight
mov rcx, r8
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov r14, rax
test rax, rax
jne 0x140040f7a
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x38], 0xdf
jmp 0x140040d93
lea r8, str.KBBDarfonCall::TranslateKBBStatusToDarfon
mov qword [rbp - 0x58], r8
mov qword [rbp - 0x50], r15
mov dword [rbp - 0x48], 0x11f
lea rax, str.__KBBDarfonCall::TranslateKBBStatusToDarfon_
mov qword [rbp - 0x40], rax
mov qword [rbp - 0x38], rdi
mov dword [rbp - 0x30], 3
lea rdx, str.ENTER__s
lea rcx, [rbp - 0x50]
call fcn.140008d50
nop
mov ecx, ebx
sub ecx, 1
je 0x14004100e
sub ecx, 2
je 0x140041006
cmp ecx, 1
je 0x140041001
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x38], 0x12e
lea rax, str.__KBBDarfonCall::TranslateKBBStatusToDarfon_
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], rdi
mov dword [rsp + 0x50], 3
lea rdx, str.eco_KBB_status_error.
lea rcx, [rsp + 0x30]
call fcn.140008d50
jmp 0x140041014
xor r13d, r13d
jmp 0x140041014
mov r13d, 1
jmp 0x140041014
mov r13d, 2
mov r8, qword [rbp - 0x58]
lea rdx, str.LEAVE__s
lea rcx, [rbp - 0x50]
call fcn.140008d50
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x38], 0xe3
lea rax, str.__KBBDarfonCall::SetKBBStatusFromDarfon_
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], rdi
mov dword [rsp + 0x50], 3
mov r9d, r13d
mov r8d, ebx
lea rdx, str.KBB_value:_d_Darfon_KBB_value:_d
lea rcx, [rsp + 0x30]
call fcn.140008d50
jmp 0x140041077
lea rdi, [0x1402a214c]
mov edx, dword [rsp + 0x60]
mov ecx, r13d
call r14
movzx ebx, al
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x38], 0xe9
lea rax, str.__KBBDarfonCall::SetKBBStatusFromDarfon_
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], rdi
mov dword [rsp + 0x50], 3
mov r9d, ebx
mov r8d, esi
lea rdx, str.SetBackLight__retry:__d__result:__d
lea rcx, [rsp + 0x30]
call fcn.140008d50
test bl, bl
jne 0x1400410f6
mov ecx, 0x64
call qword [sym.imp.KERNEL32.dll_Sleep]
sub esi, 1
je 0x1400410db
cmp r12, 1
je 0x140041070
test bl, bl
jne 0x1400410f6
mov ebx, 0x80004005
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x38], 0xf2
jmp 0x140040d98
xor edi, edi
mov ecx, 0x12c
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov r15, qword [rsp + 0x70]
jmp 0x140041156
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x38], 0xad
lea rax, str.__KBBDarfonCall::SetKBBStatusFromDarfon_
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], rdi
mov dword [rsp + 0x50], 0
mov ebx, 0x80004005
mov r8d, ebx
lea rdx, str.Error_Code:_0x_x
lea rcx, [rsp + 0x30]
call fcn.140008d50
mov edi, ebx
test r15, r15
je 0x14004116d
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov qword [rsp + 0x70], 0
mov dword [rsp + 0x78], 0
mov r8, qword [rbp - 0x28]
lea rdx, str.LEAVE__s
lea rcx, [rbp - 0x20]
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