Function at 0x14017fcb0
Capabilities:
Get keyboard layout

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x180
mov rdi, rcx
movzx esi, word [rcx + 6]
movzx ebx, word [rcx + 8]
xorps xmm0, xmm0
movaps xmmword [rsp + 0x170], xmm0
movaps xmmword [rsp + 0x160], xmm0
movaps xmmword [rsp + 0x150], 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
mov dword [rsp + 0x3c], 0x100000
call sub.USER32.dll_GetForegroundWindow
mov rcx, rax
xor edx, edx
call sub.USER32.dll_GetWindowThreadProcessId
mov ecx, eax
call sub.USER32.dll_GetKeyboardLayout
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 4
mov dword [rsp + 0x20], 2
lea r8, [rsp + 0x80]
lea r9, [rsp + 0x3c]
mov ecx, esi
mov edx, ebx
call sub.USER32.dll_ToUnicodeEx
test eax, eax
jle 0x14017fecf
mov esi, dword [rsp + 0x3c]
mov ecx, eax
lea rdx, [rcx - 1]
mov eax, esi
and eax, 0xf800
cmp eax, 0xd800
jne 0x14017fe14
movzx r8d, si
cmp r8d, 0xdbff
ja 0x14017fecf
test rdx, rdx
je 0x14017fecf
mov edx, esi
shr edx, 0x10
lea r8d, [rdx + 0x2000]
movzx r8d, r8w
cmp r8d, 0xfc00
jb 0x14017fecf
add rcx, 0xfffffffffffffffe
and esi, 0x3ff
and edx, 0x3ff
shl rsi, 0x1a
shl edx, 0x10
or rdx, rsi
movabs rsi, 0x100000000
add rsi, rdx
mov rdx, rcx
jmp 0x14017fe17
shl esi, 0x10
movzx eax, ax
cmp eax, 0xd800
sete al
shr rsi, 0x10
test rdx, rdx
sete cl
cmp rsi, 0x110000
je 0x14017fecf
or cl, al
je 0x14017fecf
mov eax, dword [rdi]
mov ecx, eax
and ecx, 0x10
shr ecx, 4
test al, al
sets al
xor al, cl
je 0x14017fee1
lea eax, [rsi - 0x61]
cmp eax, 0x1a
jae 0x14017ff5c
lea rcx, [rsp + 0x70]
mov edx, esi
call fcn.1401ea950
mov eax, dword [rsp + 0x78]
cmp dword [rsp + 0x74], 1
mov ecx, 2
sbb rcx, 0
test eax, eax
mov edx, 3
cmove rdx, rcx
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x48], rdx
mov rcx, qword [rsp + 0x70]
mov qword [rsp + 0x50], rcx
mov dword [rsp + 0x58], eax
lea rcx, [rsp + 0x40]
call fcn.1401e8e30
cmp eax, 0x110000
je 0x14017ff9c
mov edi, eax
lea rcx, [rsp + 0x40]
call fcn.1401e8e30
jmp 0x14017ff4f
mov esi, 0x110000
mov eax, esi
add rsp, 0x180
pop rbx
pop rdi
pop rsi
ret
lea eax, [rsi - 0x41]
cmp eax, 0x1a
jae 0x14017ff7c
lea rcx, [rsp + 0x60]
mov edx, esi
call fcn.1401ea8a0
mov eax, dword [rsp + 0x68]
cmp dword [rsp + 0x64], 1
mov ecx, 2
sbb rcx, 0
test eax, eax
mov edx, 3
cmove rdx, rcx
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x48], rdx
mov rcx, qword [rsp + 0x60]
mov qword [rsp + 0x50], rcx
mov dword [rsp + 0x58], eax
lea rcx, [rsp + 0x40]
call fcn.1401e8e30
cmp eax, 0x110000
je 0x14017ffa8
mov edi, eax
lea rcx, [rsp + 0x40]
call fcn.1401e8e30
cmp eax, 0x110000
cmove esi, edi
jmp 0x14017fed4
cmp esi, 0x80
jb 0x14017fed4
mov ecx, esi
call fcn.1401ea6c0
test al, al
jne 0x14017fe64
jmp 0x14017fed4
cmp esi, 0x80
jb 0x14017fed4
mov ecx, esi
call fcn.1401ea7b0
test al, al
je 0x14017fed4
jmp 0x14017feed
lea rcx, [0x140283910]
call fcn.1401f7230
lea rcx, [0x1402838f8]
call fcn.1401f7230
int3