Function at 0x1400182d8
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 [0x1401f5698]
xor rax, rsp
mov qword [rbp + 0x210], rax
mov rax, qword [0x14022ab50]
mov rdi, rdx
mov r15d, r8d
mov rbx, rcx
mov dword [rsp + 0x40], r15d
mov qword [rsp + 0x48], rdx
test byte [rax + 0x11451], 1
je 0x1400188ee
mov rcx, rdx
call fcn.140108474
test al, al
je 0x1400188ee
test r15d, r15d
jne 0x140018391
movzx r9d, byte [0x14022aa19]
lea rdx, str.CConEmuMain::OnLangChangeConsole__0x_08X___Wine_i
xor r8d, r8d
lea rcx, [rbp + 0x10]
call fcn.14000c8e8
test rbx, rbx
je 0x1400188ee
mov rcx, qword [rbx + 0x3e70]
test rcx, rcx
je 0x1400188ee
xor r9d, r9d
mov byte [rsp + 0x20], 1
mov r8b, 1
lea rdx, [rbp + 0x10]
call fcn.14011c0a8
jmp 0x1400188ee
call fcn.140113cb4
mov rcx, qword [0x14022ab50]
mov edx, 2
test al, al
jne 0x140018405
call fcn.14007f158
test eax, eax
je 0x1400183e7
mov r8d, r15d
lea rdx, str.CConEmuMain::OnLangChangeConsole__0x_08X___Posting_to_main_thread
lea rcx, [rbp + 0x10]
call fcn.14000c8e8
test rbx, rbx
je 0x1400183e7
mov rcx, qword [rbx + 0x3e70]
test rcx, rcx
je 0x1400183e7
xor r9d, r9d
mov byte [rsp + 0x20], 1
mov r8b, 1
lea rdx, [rbp + 0x10]
call fcn.14011c0a8
mov edx, dword [rbx + 0x7b64]
mov r8, r15
mov rcx, qword [0x14022a9e8]
mov r9, rdi
call qword [sym.imp.USER32.dll_PostMessageW]
jmp 0x1400188ee
call fcn.14007f158
test eax, eax
je 0x140018446
mov r8d, r15d
lea rdx, str.CConEmuMain::OnLangChangeConsole__0x_08X___MainThread
lea rcx, [rbp + 0x10]
call fcn.14000c8e8
test rbx, rbx
je 0x140018446
mov rcx, qword [rbx + 0x3e70]
test rcx, rcx
je 0x140018446
xor r9d, r9d
mov byte [rsp + 0x20], 1
mov r8b, 1
lea rdx, [rbp + 0x10]
call fcn.14011c0a8
mov r8d, r15d
lea rdx, str._08X
lea rcx, [rbp - 0x10]
call fcn.14000c75c
xor edx, edx
lea rcx, [rsp + 0x50]
mov r8d, 0xa0
mov r12, r15
call fcn.14012d4b0
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 + 0x573c]
mov r13d, r8d
xor ecx, ecx
cmp dword [rdx - 4], 0
jne 0x1400184bf
cmp r13d, r8d
mov eax, ecx
cmovne eax, r13d
mov r13d, eax
jmp 0x1400184c8
cmp dword [rdx], r15d
je 0x1400186fd
inc ecx
add rdx, 0x10
cmp ecx, 0x14
jb 0x1400184ab
xor r9d, r9d
mov dword [rsp + 0x3c], r9d
xor edi, edi
cmp r9d, 5
ja 0x1400186dc
xor r8d, r8d
mov dword [rsp + 0x38], r8d
test esi, esi
je 0x1400185b1
lea rsi, [rsp + 0x50]
test r9d, r9d
jne 0x14001850e
movzx eax, r15w
cmp eax, r15d
jne 0x140018596
lea r14, [rbx + 0x5740]
xor edx, edx
mov rcx, r14
cmp dword [rcx - 8], 0
je 0x140018528
mov rax, qword [rsi]
cmp qword [rcx], rax
je 0x140018596
inc edx
add rcx, 0x10
cmp edx, 0x14
jb 0x14001851a
mov eax, r9d
test r9d, r9d
je 0x1400186bc
sub eax, 1
je 0x1400186a6
sub eax, 1
je 0x140018697
sub eax, 1
je 0x14001868e
sub eax, 1
je 0x140018682
cmp eax, 1
je 0x1400185d0
xor r9d, r9d
lea rdx, str.C:UsersMaksim.MoisiukDocumentsPersonalconemu_srcConEmuConEmu.cpp
mov r8d, 0x26be
lea rcx, str.FALSE___Invalid_index_
call fcn.140026d78
mov r9d, dword [rsp + 0x3c]
mov r8d, dword [rsp + 0x38]
test edi, edi
jne 0x1400186d2
inc r8d
add rsi, 8
mov dword [rsp + 0x38], r8d
cmp r8d, dword [rsp + 0x30]
jb 0x1400184fc
mov esi, dword [rsp + 0x30]
inc r9d
mov dword [rsp + 0x3c], r9d
test edi, edi
je 0x1400184dd
mov r10d, dword [rsp + 0x34]
mov dword [rsp + 0x34], r10d
jmp 0x140018714
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 0x1400185f3
mov rax, qword [r9]
cmp qword [rcx], rax
je 0x140018602
inc rdx
add rcx, 0x10
cmp rdx, 0x14
jae 0x140018605
jmp 0x1400185e5
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 0x1400185dd
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 0x140018584
mov rcx, qword [rbx + 0x3e70]
test rcx, rcx
je 0x140018584
xor r9d, r9d
mov byte [rsp + 0x20], 1
mov r8b, 1
lea rdx, [rbp + 0x10]
call fcn.14011c0a8
jmp 0x140018584
mov al, byte [rsi]
mov edi, 0
xor al, r12b
jmp 0x14001869d
xor edi, edi
cmp word [rsi + 2], r12w
jmp 0x14001869d
xor edi, edi
cmp word [rsi], r12w
sete dil
jmp 0x14001858e
movzx eax, word [rsi]
cmp word [rsi + 2], ax
je 0x1400186b5
cmp ax, r12w
je 0x1400186cd
xor edi, edi
jmp 0x140018596
mov rax, r12
xor edi, edi
shl rax, 0x10
or rax, r12
cmp qword [rsi], rax
jmp 0x14001869d
mov edi, 1
mov eax, r8d
mov r12, qword [rsp + rax*8 + 0x50]
jmp 0x140018714
mov r8d, dword [rsp + 0x34]
mov edx, 1
mov rcx, qword [0x14022ab50]
mov dword [rsp + 0x34], r8d
call fcn.14007f158
test eax, eax
jne 0x140018731
jmp 0x140018714
mov eax, ecx
mov edi, 1
add rax, 0x574
mov r13d, r8d
add rax, rax
mov r12, qword [rbx + rax*8]
mov rcx, qword [0x14022ab50]
mov edx, 2
call fcn.14007f158
mov esi, dword [rsp + 0x30]
test eax, eax
je 0x140018852
lea rax, str.Succeeded
test edi, edi
lea r9, [0x14017ab10]
mov r8d, r15d
cmovne r9, rax
lea rdx, str.Keyboard_layout_lookup__0x_08X___s
lea rcx, [rbp + 0x10]
call fcn.14000c8e8
test rbx, rbx
je 0x14001877d
mov rcx, qword [rbx + 0x3e70]
test rcx, rcx
je 0x14001877d
xor r9d, r9d
mov byte [rsp + 0x20], 1
mov r8b, 1
lea rdx, [rbp + 0x10]
call fcn.14011c0a8
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.14000c8e8
test rbx, rbx
je 0x1400187e7
mov rcx, qword [rbx + 0x3e70]
test rcx, rcx
je 0x1400187e7
xor r9d, r9d
mov byte [rsp + 0x20], 0
xor r8d, r8d
lea rdx, [rbp + 0x10]
call fcn.14011c0a8
mov rcx, qword [rbx + 0x3e70]
test rcx, rcx
je 0x1400187e7
xor r9d, r9d
mov byte [rsp + 0x20], 0
xor r8d, r8d
lea rdx, str.__Installed_keyboard_layouts:_r_n
call fcn.14011c0a8
xor r14d, r14d
test esi, esi
je 0x140018852
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.14000c8e8
test rbx, rbx
je 0x140018840
mov rcx, qword [rbx + 0x3e70]
test rcx, rcx
je 0x140018840
xor r9d, r9d
mov byte [rsp + 0x20], 0
xor r8d, r8d
lea rdx, [rbp + 0x10]
call fcn.14011c0a8
add rsi, 8
cmp r14d, r15d
jb 0x1400187f8
mov r15d, dword [rsp + 0x40]
mov esi, dword [rsp + 0x30]
test edi, edi
jne 0x1400188b1
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.14000c8e8
lea r9, [rsp + 0x50]
mov dword [rsp + 0x20], esi
mov r8d, 0xff
lea rdx, [rbp + 0x10]
mov rcx, rbx
call fcn.14000e904
xor r9d, r9d
lea rdx, str.C:UsersMaksim.MoisiukDocumentsPersonalconemu_srcConEmuConEmu.cpp
mov r8d, 0x2715
lea rcx, [rbp + 0x10]
call fcn.140026d78
jmp 0x1400188c8
cmp r13d, 0xffffffff
je 0x1400188c8
mov r9, r12
mov r8d, r15d
mov edx, r13d
mov rcx, rbx
call fcn.1400227e4
mov rbx, qword [rsp + 0x48]
xor edx, edx
mov rcx, rbx
call fcn.14011304c
test al, al
je 0x1400188ee
mov rcx, rbx
call fcn.14010f780
mov rcx, rax
mov rdx, r12
call fcn.1400aacb0
xor eax, eax
mov rcx, qword [rbp + 0x210]
xor rcx, rsp
call fcn.14012bda0
mov rbx, qword [rsp + 0x378]
add rsp, 0x320
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret