Function at 0x1400197ec
Capabilities:
Get keyboard layout

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x220]
sub rsp, 0x320
mov rax, qword [0x1401e7e78]
xor rax, rsp
mov qword [rbp + 0x210], rax
mov rax, qword [0x14021c740]
mov rdi, rdx
mov r15d, r8d
mov rbx, rcx
mov dword [rsp + 0x40], r15d
mov qword [rsp + 0x48], rdx
test byte [rax + 0x11459], 1
je 0x140019dc0
mov rcx, rdx
call fcn.140114910
test al, al
je 0x140019dc0
test r15d, r15d
jne 0x1400198a5
movzx r9d, byte [0x14021c5bd]
lea rdx, str.CConEmuMain::OnLangChangeConsole__0x_08X___Wine_i
xor r8d, r8d
lea rcx, [rbp + 0x10]
call fcn.14000d13c
test rbx, rbx
je 0x140019dc0
mov rcx, qword [rbx + 0x3fa0]
test rcx, rcx
je 0x140019dc0
xor r9d, r9d
mov byte [rsp + 0x20], 1
mov r8b, 1
lea rdx, [rbp + 0x10]
call fcn.1401298e4
jmp 0x140019dc0
call fcn.14011ff24
mov rcx, qword [0x14021c740]
mov edx, 2
test al, al
jne 0x140019919
call fcn.140087888
test eax, eax
je 0x1400198fb
mov r8d, r15d
lea rdx, str.CConEmuMain::OnLangChangeConsole__0x_08X___Posting_to_main_thread
lea rcx, [rbp + 0x10]
call fcn.14000d13c
test rbx, rbx
je 0x1400198fb
mov rcx, qword [rbx + 0x3fa0]
test rcx, rcx
je 0x1400198fb
xor r9d, r9d
mov byte [rsp + 0x20], 1
mov r8b, 1
lea rdx, [rbp + 0x10]
call fcn.1401298e4
mov edx, dword [rbx + 0x7cac]
mov r8, r15
mov rcx, qword [0x14021c5e0]
mov r9, rdi
call qword [sym.imp.USER32.dll_PostMessageW]
jmp 0x140019dc0
call fcn.140087888
test eax, eax
je 0x14001995a
mov r8d, r15d
lea rdx, str.CConEmuMain::OnLangChangeConsole__0x_08X___MainThread
lea rcx, [rbp + 0x10]
call fcn.14000d13c
test rbx, rbx
je 0x14001995a
mov rcx, qword [rbx + 0x3fa0]
test rcx, rcx
je 0x14001995a
xor r9d, r9d
mov byte [rsp + 0x20], 1
mov r8b, 1
lea rdx, [rbp + 0x10]
call fcn.1401298e4
mov r8d, r15d
lea rdx, str._08X
lea rcx, [rbp - 0x10]
call fcn.14000cfb0
xor edx, edx
lea rcx, [rsp + 0x50]
mov r8d, 0xa0
mov r12, r15
call fcn.14013b230
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea rdx, [rsp + 0x50]
mov ecx, 0x14
call qword [sym.imp.USER32.dll_GetKeyboardLayoutList]
mov esi, eax
mov dword [rsp + 0x30], eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
or r8d, 0xffffffff
mov dword [rsp + 0x44], eax
mov dword [rsp + 0x34], r8d
lea rdx, [rbx + 0x5894]
mov r13d, r8d
xor ecx, ecx
cmp dword [rdx - 4], 0
jne 0x1400199d3
cmp r13d, r8d
mov eax, ecx
cmovne eax, r13d
mov r13d, eax
jmp 0x1400199dc
cmp dword [rdx], r15d
je 0x140019bea
inc ecx
add rdx, 0x10
cmp ecx, 0x14
jb 0x1400199bf
xor r9d, r9d
mov dword [rsp + 0x3c], r9d
xor edi, edi
cmp r9d, 5
ja 0x140019bc9
xor r8d, r8d
mov dword [rsp + 0x38], r8d
test esi, esi
je 0x140019b56
lea rsi, [rsp + 0x50]
test r9d, r9d
jne 0x140019a22
movzx eax, r15w
cmp eax, r15d
jne 0x140019b3b
lea r14, [rbx + 0x5898]
xor edx, edx
mov rcx, r14
cmp dword [rcx - 8], 0
je 0x140019a40
mov rax, qword [rsi]
cmp qword [rcx], rax
je 0x140019b3b
inc edx
add rcx, 0x10
cmp edx, 0x14
jb 0x140019a2e
mov eax, r9d
test r9d, r9d
je 0x140019ba9
sub eax, 1
je 0x140019b96
sub eax, 1
je 0x140019b8a
sub eax, 1
je 0x140019b81
sub eax, 1
je 0x140019b75
cmp eax, 1
jne 0x140019b33
mov r11d, dword [rsp + 0x30]
lea r9, [rsp + 0x50]
xor r10d, r10d
xor r8b, r8b
mov rcx, r14
xor edx, edx
cmp dword [rcx - 8], 0
je 0x140019aa7
mov rax, qword [r9]
cmp qword [rcx], rax
je 0x140019ab6
inc rdx
add rcx, 0x10
cmp rdx, 0x14
jae 0x140019ab9
jmp 0x140019a99
mov r8b, 1
test r8b, r8b
lea r12d, [r10 + 1]
cmovne r12d, r10d
add r9, 8
mov dword [rsp + 0x34], r12d
mov r10d, r12d
sub r11, 1
jne 0x140019a91
mov r9, qword [rsi]
lea rdx, str.hkl0x_08X__dwLayout0x_08X_08X____Warning__strange_layout_ID
mov eax, dword [rsi]
lea rcx, [rbp + 0x10]
xor edi, edi
mov dword [rsp + 0x20], eax
cmp r10d, 1
mov r8d, r15d
mov r12, r15
sete dil
shr r9, 0x20
call qword [sym.imp.USER32.dll_wsprintfW]
test rbx, rbx
je 0x140019b29
mov rcx, qword [rbx + 0x3fa0]
test rcx, rcx
je 0x140019b29
xor r9d, r9d
mov byte [rsp + 0x20], 1
mov r8b, 1
lea rdx, [rbp + 0x10]
call fcn.1401298e4
mov r8d, dword [rsp + 0x38]
mov r9d, dword [rsp + 0x3c]
test edi, edi
jne 0x140019bbf
inc r8d
add rsi, 8
mov dword [rsp + 0x38], r8d
cmp r8d, dword [rsp + 0x30]
jb 0x140019a10
mov esi, dword [rsp + 0x30]
inc r9d
mov dword [rsp + 0x3c], r9d
test edi, edi
je 0x1400199f1
mov r10d, dword [rsp + 0x34]
mov dword [rsp + 0x34], r10d
jmp 0x140019bff
mov al, r12b
mov edi, 0
xor al, byte [rsi]
jmp 0x140019b90
xor edi, edi
cmp word [rsi + 2], r12w
jmp 0x140019b90
xor edi, edi
cmp word [rsi], r12w
sete dil
jmp 0x140019b33
movzx eax, word [rsi]
cmp word [rsi + 2], ax
je 0x140019ba5
cmp ax, r12w
je 0x140019bba
xor edi, edi
jmp 0x140019b3b
mov rax, r12
xor edi, edi
shl rax, 0x10
or rax, r12
cmp qword [rsi], rax
jmp 0x140019b90
mov edi, 1
mov eax, r8d
mov r12, qword [rsp + rax*8 + 0x50]
jmp 0x140019bff
mov r8d, dword [rsp + 0x34]
mov edx, 1
mov rcx, qword [0x14021c740]
mov dword [rsp + 0x34], r8d
call fcn.140087888
test eax, eax
jne 0x140019c1c
jmp 0x140019bff
mov eax, ecx
mov edi, 1
add rax, rax
mov r13d, r8d
mov r12, qword [rbx + rax*8 + 0x5898]
mov rcx, qword [0x14021c740]
mov edx, 2
call fcn.140087888
mov esi, dword [rsp + 0x30]
test eax, eax
je 0x140019d3d
lea rax, str.Succeeded
test edi, edi
lea r9, str.FAILED
mov r8d, r15d
cmovne r9, rax
lea rdx, str.Keyboard_layout_lookup__0x_08X___s
lea rcx, [rbp + 0x10]
call fcn.14000d13c
test rbx, rbx
je 0x140019c68
mov rcx, qword [rbx + 0x3fa0]
test rcx, rcx
je 0x140019c68
xor r9d, r9d
mov byte [rsp + 0x20], 1
mov r8b, 1
lea rdx, [rbp + 0x10]
call fcn.1401298e4
xor ecx, ecx
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
mov r8, rax
lea rdx, str.__Current_keyboard_layout:_r_n_______0x_08X_08X_n
shr r8, 0x20
lea rcx, [rbp + 0x10]
mov r9d, eax
call fcn.14000d13c
test rbx, rbx
je 0x140019cd2
mov rcx, qword [rbx + 0x3fa0]
test rcx, rcx
je 0x140019cd2
xor r9d, r9d
mov byte [rsp + 0x20], 0
xor r8d, r8d
lea rdx, [rbp + 0x10]
call fcn.1401298e4
mov rcx, qword [rbx + 0x3fa0]
test rcx, rcx
je 0x140019cd2
xor r9d, r9d
mov byte [rsp + 0x20], 0
xor r8d, r8d
lea rdx, str.__Installed_keyboard_layouts:_r_n
call fcn.1401298e4
xor r14d, r14d
test esi, esi
je 0x140019d3d
mov r15d, dword [rsp + 0x30]
lea rsi, [rsp + 0x50]
mov r9, qword [rsi]
lea rdx, str._____u:_0x_08X_08X_n
mov eax, dword [rsi]
lea rcx, [rbp + 0x10]
inc r14d
shr r9, 0x20
mov r8d, r14d
mov dword [rsp + 0x20], eax
call fcn.14000d13c
test rbx, rbx
je 0x140019d2b
mov rcx, qword [rbx + 0x3fa0]
test rcx, rcx
je 0x140019d2b
xor r9d, r9d
mov byte [rsp + 0x20], 0
xor r8d, r8d
lea rdx, [rbp + 0x10]
call fcn.1401298e4
add rsi, 8
cmp r14d, r15d
jb 0x140019ce3
mov r15d, dword [rsp + 0x40]
mov esi, dword [rsp + 0x30]
test edi, edi
jne 0x140019d83
mov eax, dword [rsp + 0x44]
lea rdx, str.dwLayoutName_not_found:_Count_u_Left_i_Err_u__08X_r_n
mov r9d, dword [rsp + 0x34]
lea rcx, [rbp + 0x10]
mov dword [rsp + 0x28], r15d
mov r8d, esi
mov dword [rsp + 0x20], eax
call fcn.14000d13c
lea r9, [rsp + 0x50]
mov dword [rsp + 0x20], esi
mov r8d, 0xff
lea rdx, [rbp + 0x10]
mov rcx, rbx
call fcn.14000f3d4
jmp 0x140019d9a
cmp r13d, 0xffffffff
je 0x140019d9a
mov r9, r12
mov r8d, r15d
mov edx, r13d
mov rcx, rbx
call fcn.140023b0c
mov rbx, qword [rsp + 0x48]
xor edx, edx
mov rcx, rbx
call fcn.14011f298
test al, al
je 0x140019dc0
mov rcx, rbx
call fcn.14011bab8
mov rcx, rax
mov rdx, r12
call fcn.1400b40e0
xor eax, eax
mov rcx, qword [rbp + 0x210]
xor rcx, rsp
call fcn.140139b10
mov rbx, qword [rsp + 0x378]
add rsp, 0x320
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret