Function at 0x14001f9f0
Capabilities:
Get keyboard layout

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x258
xor r15d, r15d
xor ecx, ecx
call qword [sym.imp.user32.dll_GetKeyboardLayout]
mov rsi, rax
xchg qword [0x143b47550], rax
cmp rsi, rax
jne 0x14001fa2e
movzx eax, byte [0x143b47558]
test al, al
setne al
jmp 0x14001fcfb
xorps xmm0, xmm0
movaps xmmword [rsp + 0x60], xmm0
movaps xmmword [rsp + 0x140], xmm0
movaps xmmword [rsp + 0x130], xmm0
movaps xmmword [rsp + 0x120], xmm0
movaps xmmword [rsp + 0x110], xmm0
movaps xmmword [rsp + 0x100], xmm0
movaps xmmword [rsp + 0xf0], xmm0
movaps xmmword [rsp + 0xe0], xmm0
movaps xmmword [rsp + 0xd0], xmm0
movaps xmmword [rsp + 0xc0], xmm0
movaps xmmword [rsp + 0xb0], xmm0
movaps xmmword [rsp + 0xa0], xmm0
movaps xmmword [rsp + 0x90], xmm0
movaps xmmword [rsp + 0x80], xmm0
movaps xmmword [rsp + 0x70], xmm0
movaps xmmword [rsp + 0x50], xmm0
mov word [rsp + 0x61], 0x8080
movaps xmmword [rsp + 0x240], xmm0
movaps xmmword [rsp + 0x230], xmm0
movaps xmmword [rsp + 0x220], xmm0
movaps xmmword [rsp + 0x210], xmm0
movaps xmmword [rsp + 0x200], xmm0
movaps xmmword [rsp + 0x1f0], xmm0
movaps xmmword [rsp + 0x1e0], xmm0
movaps xmmword [rsp + 0x1d0], xmm0
movaps xmmword [rsp + 0x1c0], xmm0
movaps xmmword [rsp + 0x1b0], xmm0
movaps xmmword [rsp + 0x1a0], xmm0
movaps xmmword [rsp + 0x190], xmm0
movaps xmmword [rsp + 0x180], xmm0
movaps xmmword [rsp + 0x170], xmm0
movaps xmmword [rsp + 0x160], xmm0
movaps xmmword [rsp + 0x150], xmm0
lea rbx, [rsp + 0x40]
mov r13, qword [sym.imp.user32.dll_ToUnicodeEx]
xor r12d, r12d
nop
test r12b, 1
jne 0x14001fcf1
lea ebp, [r15 + 1]
cmp r15d, 0xff
setae r12b
mov eax, 0xff
cmovae ebp, eax
mov word [rsp + 0x48], 0
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 5
mov ecx, r15d
xor edx, edx
lea r8, [rsp + 0x150]
mov r9, rbx
call r13
mov edi, 0x110000
mov r14d, 0x110000
test eax, eax
jle 0x14001fc1a
movzx eax, word [rsp + 0x40]
mov ecx, eax
and ecx, 0xf800
cmp ecx, 0xd800
jne 0x14001fc10
mov r14d, 0x110000
cmp eax, 0xdbff
ja 0x14001fc1a
movzx ecx, word [rsp + 0x42]
lea edx, [rcx + 0x2000]
movzx edx, dx
mov r14d, 0x110000
cmp edx, 0xfc00
jb 0x14001fc1a
and eax, 0x3ff
and ecx, 0x3ff
shl rax, 0x1a
shl ecx, 0x10
movabs rdx, 0x100000000
add rax, rdx
or rax, rcx
jmp 0x14001fc13
shl eax, 0x10
mov r14, rax
shr r14, 0x10
mov word [rsp + 0x48], 0
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 5
mov ecx, r15d
xor edx, edx
lea r8, [rsp + 0x50]
mov r9, rbx
call r13
test eax, eax
jle 0x14001fcba
movzx eax, word [rsp + 0x40]
mov ecx, eax
and ecx, 0xf800
cmp ecx, 0xd800
jne 0x14001fcb0
cmp eax, 0xdbff
ja 0x14001fcba
movzx ecx, word [rsp + 0x42]
lea edx, [rcx + 0x2000]
movzx edx, dx
cmp edx, 0xfc00
jb 0x14001fcba
and eax, 0x3ff
and ecx, 0x3ff
shl rax, 0x1a
shl ecx, 0x10
movabs rdx, 0x100000000
add rax, rdx
or rax, rcx
jmp 0x14001fcb3
shl eax, 0x10
mov rdi, rax
shr rdi, 0x10
mov r15d, ebp
cmp r14d, edi
je 0x14001fb40
mov r15d, ebp
cmp r14d, 0x110000
je 0x14001fb40
mov r15d, ebp
cmp edi, 0x110000
je 0x14001fb40
mov al, 1
mov cl, 1
xchg byte [0x143b47558], cl
jmp 0x14001fcfb
xor eax, eax
xor ecx, ecx
xchg byte [0x143b47558], cl
add rsp, 0x258
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret