Function at 0x14006b160
Capabilities:
Get keyboard layout

Disassembly:
mov qword [rsp + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x190
movsxd rax, dword [rcx]
movzx r12d, r9b
mov edi, r8d
mov r15, rdx
mov r14, rcx
cmp eax, 6
ja case.0x14006b19d.1
lea r9, [0x140000000]
mov eax, dword [r9 + rax*4 + 0x6b3fc]
add rax, r9
jmp rax
lea rax, str.Timeout
jmp 0x14006b1d0
lea rax, str.Match
jmp 0x14006b1d0
mov qword [rsp + 0x1c0], rsi
mov rsi, r15
test r15, r15
jne 0x14006b1e6
lea rax, str.EndKey
mov rsi, qword [rsp + 0x1c0]
mov rdi, qword [rsp + 0x1c8]
add rsp, 0x190
pop r15
pop r14
pop r12
ret
test r12b, r12b
je 0x14006b1fc
movups xmm0, xmmword [str.EndKey:]
lea rsi, [rdx + 0xe]
sub edi, 7
movups xmmword [rdx], xmm0
movzx eax, word [rcx + 0x6a]
mov qword [rsp + 0x1b8], rbp
test ax, ax
je 0x14006b21b
xor ebp, ebp
mov word [rsi], ax
mov word [rsi + 2], bp
jmp 0x14006b3ae
cmp byte [rcx + 0x6d], 0
mov qword [rsp + 0x1b0], rbx
je 0x14006b2eb
xor edx, edx
lea rcx, [rsp + 0x90]
mov r8d, 0x100
call sub.VCRUNTIME140.dll_memset
mov byte [rsp + 0xa0], 0x80
call qword [sym.imp.USER32.dll_GetForegroundWindow]
xor ebp, ebp
mov ebx, ebp
test rax, rax
je 0x14006b293
xor edx, edx
mov rcx, rax
call qword [sym.imp.USER32.dll_GetWindowThreadProcessId]
lea rdx, [rsp + 0x40]
mov dword [rsp + 0x40], 0x48
mov ecx, eax
mov ebx, eax
call qword [sym.imp.USER32.dll_GetGUIThreadInfo]
test eax, eax
je 0x14006b293
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x14006b293
xor edx, edx
call qword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov ebx, eax
mov ecx, ebx
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
movzx ecx, byte [r14 + 0x66]
mov ebx, ebp
cmp dword [0x140132a60], ebx
mov rdi, rax
setne bl
xor edx, edx
call fcn.140026220
movzx ecx, byte [r14 + 0x66]
lea r8, [rsp + 0x90]
mov qword [rsp + 0x30], rdi
mov r9, rsi
movzx edx, ax
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], 2
call qword [sym.imp.USER32.dll_ToUnicodeEx]
movsxd rcx, eax
mov word [rsi + rcx*2], bp
jmp 0x14006b3a6
xor ebp, ebp
mov word [rsi], bp
cmp byte [rcx + 0x6c], bpl
je 0x14006b34a
movzx edx, word [rcx + 0x68]
lea rax, [0x14012f268]
mov ecx, ebp
lea r8, [0x14012f338]
nop word [rax + rax]
cmp word [rax], dx
je 0x14006b322
inc ecx
add rax, 0x10
cmp rax, r8
jl 0x14006b310
jmp 0x14006b34a
movsxd rdx, ecx
mov rcx, rsi
add rdx, rdx
movsxd rbx, edi
mov rdx, qword [r9 + rdx*8 + 0x12f260]
lea r8, [rbx - 1]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy]
mov word [rsi + rbx*2 - 2], bp
cmp word [rsi], bp
jne 0x14006b388
test r12b, r12b
je 0x14006b355
cmp byte [r14 + 0x6c], bpl
jne 0x14006b36d
cmp byte [r14 + 0x6c], bpl
mov r8d, edi
movzx ecx, byte [r14 + 0x66]
mov rdx, rsi
sete r9b
call fcn.140024e50
cmp word [rsi], bp
jne 0x14006b388
movzx r9d, word [r14 + 0x68]
lea r8, str.sc_03X
mov edx, edi
mov rcx, rsi
call fcn.1400d6690
movzx ecx, word [rsi]
lea eax, [rcx - 0x61]
cmp ax, 0x19
ja 0x14006b3a6
cmp word [rsi + 2], bp
jne 0x14006b3a6
test r12b, r12b
je 0x14006b3a6
sub cx, 0x20
mov word [rsi], cx
mov rbx, qword [rsp + 0x1b0]
mov rbp, qword [rsp + 0x1b8]
lea rax, str.EndKey
test r12b, r12b
cmovne rax, r15
jmp 0x14006b1c8
lea rax, [0x140113348]
jmp 0x14006b1d0
lea rax, str.NewInput
jmp 0x14006b1d0
lea rax, str.Stopped
jmp 0x14006b1d0
lea rax, [0x1400f97e4]
jmp 0x14006b1d0