Function at 0x1400a32e0
Capabilities:
Get keyboard layout

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x1e8
lea rbp, [rsp + 0x80]
movaps xmmword [rbp + 0x150], xmm6
mov qword [rbp + 0x148], 0xfffffffffffffffe
mov r15d, r8d
mov r13d, edx
mov rbx, rcx
call sub.USER32.dll_GetForegroundWindow
mov rcx, rax
xor edx, edx
call sub.USER32.dll_GetWindowThreadProcessId
xorps xmm6, xmm6
movaps xmmword [rbp + 0x130], xmm6
movaps xmmword [rbp + 0x120], xmm6
movaps xmmword [rbp + 0x110], xmm6
movaps xmmword [rbp + 0x100], xmm6
mov ecx, eax
call sub.USER32.dll_GetKeyboardLayout
mov r14, rax
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 7
lea r8, [0x140221134]
lea rsi, [rbp + 0x100]
mov ecx, r13d
mov edx, r15d
mov r9, rsi
call sub.USER32.dll_ToUnicodeEx
cmp eax, 0xffffffff
je 0x1400a349f
test eax, eax
je 0x1400a3599
jle 0x1400a3599
mov qword [rbp + 0x140], rbx
mov r12d, eax
cmp eax, 0x21
jae 0x1400a364d
mov rcx, qword [0x140221370]
test rcx, rcx
jne 0x1400a33ce
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
test rax, rax
je 0x1400a363e
mov rcx, rax
mov qword [0x140221370], rax
xor edx, edx
mov r8, r12
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
test rax, rax
je 0x1400a363e
mov qword [rbp], r12
mov qword [rbp + 8], rax
mov qword [rbp + 0x10], 0
lea rdi, [r12*2 + 0x100]
add rdi, rbp
mov r12, rbp
jmp 0x1400a3423
shl rdx, 0x10
mov rsi, rcx
shr rdx, 0x10
mov rcx, r12
call fcn.1400141f0
cmp rsi, rdi
je 0x1400a3553
lea rcx, [rsi + 2]
movzx eax, word [rsi]
movzx edx, ax
mov ebx, eax
and ebx, 0xf800
cmp ebx, 0xd800
jne 0x1400a3410
cmp edx, 0xdbff
ja 0x1400a3578
cmp rcx, rdi
je 0x1400a3578
movzx edx, word [rcx]
lea ecx, [rdx + 0x2000]
movzx ecx, cx
cmp ecx, 0xfc00
jb 0x1400a3578
add rsi, 4
and eax, 0x3ff
and edx, 0x3ff
shl rax, 0x1a
shl rdx, 0x10
or rdx, rax
movabs rax, 0x100000000
add rdx, rax
jmp 0x1400a3417
movaps xmmword [rbp - 0x10], xmm6
movaps xmmword [rbp - 0x20], xmm6
movaps xmmword [rbp - 0x30], xmm6
movaps xmmword [rbp - 0x40], xmm6
movaps xmmword [rbp + 0xf0], xmm6
movaps xmmword [rbp + 0xe0], xmm6
movaps xmmword [rbp + 0xd0], xmm6
movaps xmmword [rbp + 0xc0], xmm6
movaps xmmword [rbp + 0xb0], xmm6
movaps xmmword [rbp + 0xa0], xmm6
movaps xmmword [rbp + 0x90], xmm6
movaps xmmword [rbp + 0x80], xmm6
movaps xmmword [rbp + 0x70], xmm6
movaps xmmword [rbp + 0x60], xmm6
movaps xmmword [rbp + 0x50], xmm6
movaps xmmword [rbp + 0x40], xmm6
movaps xmmword [rbp + 0x30], xmm6
movaps xmmword [rbp + 0x20], xmm6
movaps xmmword [rbp + 0x10], xmm6
movaps xmmword [rbp], xmm6
mov rsi, rbp
lea rdi, [rbp - 0x40]
nop
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0x20
mov ecx, r13d
mov edx, r15d
mov r8, rsi
mov r9, rdi
call sub.USER32.dll_ToUnicodeEx
test eax, eax
js 0x1400a3510
mov qword [rbx + 8], 0
mov al, 1
mov ecx, dword [0x140221234]
test ecx, ecx
jne 0x1400a35ad
jmp 0x1400a360f
mov rax, qword [rbp + 8]
test rax, rax
mov rbx, qword [rbp + 0x140]
je 0x1400a3599
mov rcx, qword [rbp]
mov rdx, qword [rbp + 0x10]
mov qword [rbx], rcx
mov qword [rbx + 8], rax
mov qword [rbx + 0x10], rdx
jmp 0x1400a35a1
cmp qword [rbp], 0
je 0x1400a3592
mov r8, qword [rbp + 8]
mov rcx, qword [0x140221370]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rbx, qword [rbp + 0x140]
mov qword [rbx + 8], 0
xor eax, eax
mov ecx, dword [0x140221234]
test ecx, ecx
je 0x1400a360f
cmp byte [0x14022123c], 0
je 0x1400a360f
xorps xmm0, xmm0
movaps xmmword [rbp + 0x130], xmm0
movaps xmmword [rbp + 0x120], xmm0
movaps xmmword [rbp + 0x110], xmm0
movaps xmmword [rbp + 0x100], xmm0
mov edx, dword [0x140221238]
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0x20
lea r8, [0x140221134]
lea r9, [rbp + 0x100]
call sub.USER32.dll_ToUnicodeEx
mov dword [0x140221234], 0
jmp 0x1400a3623
mov dword [0x140221234], r13d
mov dword [0x140221238], r15d
mov byte [0x14022123c], al
movaps xmm6, xmmword [rbp + 0x150]
add rsp, 0x1e8
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov edx, 1
mov rcx, r12
call fcn.14016c090
ud2
lea r8, str.C:UsersUser.cargo_registry_srcgithub.com_1ecc6299db9ec823_rdev_0.5.3_srcwindowskeyboard.rs
mov edx, 0x20
mov rcx, r12
call fcn.14016f3c0
ud2