Function at 0x1400f49d0
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 ebp, ebp
xor ecx, ecx
call sub.USER32.dll_GetKeyboardLayout
mov rsi, rax
xchg qword [0x14031f590], rax
cmp rsi, rax
je 0x1400f4d15
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 rdi, [rsp + 0x40]
mov r13d, 0x110000
xor ebx, ebx
nop dword [rax]
test bl, bl
jne 0x1400f4d22
cmp ebp, 0xff
ja 0x1400f4d22
cmp ebp, 0xfe
seta bl
cmp ebp, 0xff
mov r15d, ebp
adc r15d, 0
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, ebp
xor edx, edx
lea r8, [rsp + 0x150]
mov r9, rdi
call sub.USER32.dll_ToUnicodeEx
mov r14d, 0x110000
mov r12d, 0x110000
test eax, eax
jle 0x1400f4c12
movzx ecx, word [rsp + 0x40]
movzx edx, cx
mov eax, ecx
and eax, 0xf800
cmp eax, 0xd800
jne 0x1400f4bf0
mov eax, 1
cmp edx, 0xdbff
ja 0x1400f4bf7
movzx edi, word [rsp + 0x42]
mov edx, edi
and edx, 0xfc00
cmp edx, 0xdc00
jne 0x1400f4bf7
lea eax, [rcx + 0x2800]
movzx ecx, ax
add edi, 0x2400
movzx eax, di
shl rcx, 0x2a
shl rax, 0x20
or rax, rcx
movabs rcx, 0x1000000000000
add rax, rcx
jmp 0x1400f4bf7
shl rdx, 0x20
mov rax, rdx
mov r12, rax
shr r12, 0x20
test ax, ax
cmovne r12d, r13d
cmp ax, 2
cmove r12d, r13d
lea rdi, [rsp + 0x40]
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, ebp
xor edx, edx
lea r8, [rsp + 0x50]
mov r9, rdi
call sub.USER32.dll_ToUnicodeEx
test eax, eax
jle 0x1400f4cdd
movzx ecx, word [rsp + 0x40]
movzx edx, cx
mov eax, ecx
and eax, 0xf800
cmp eax, 0xd800
jne 0x1400f4cc0
mov eax, 1
cmp edx, 0xdbff
ja 0x1400f4cc7
movzx ebp, word [rsp + 0x42]
mov edx, ebp
and edx, 0xfc00
cmp edx, 0xdc00
jne 0x1400f4cc7
lea eax, [rcx + 0x2800]
movzx ecx, ax
add ebp, 0x2400
movzx eax, bp
shl rcx, 0x2a
shl rax, 0x20
or rax, rcx
movabs rcx, 0x1000000000000
add rax, rcx
jmp 0x1400f4cc7
shl rdx, 0x20
mov rax, rdx
mov r14, rax
shr r14, 0x20
test ax, ax
cmovne r14d, r13d
cmp ax, 2
cmove r14d, r13d
mov ebp, r15d
cmp r12d, r14d
je 0x1400f4b10
mov ebp, r15d
cmp r12d, 0x110000
je 0x1400f4b10
mov ebp, r15d
cmp r14d, 0x110000
je 0x1400f4b10
mov al, 1
mov cl, 1
xchg byte [0x14031f598], cl
jmp 0x1400f4d2c
mov al, byte [0x14031f598]
test al, al
setne al
jmp 0x1400f4d2c
xor eax, eax
xor ecx, ecx
xchg byte [0x14031f598], cl
add rsp, 0x258
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret