Function at 0x14003cfe0
Capabilities:
Get keyboard layout

Disassembly:
mov qword [rsp + 8], rcx
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x85c8
call fcn.1400bde80
sub rsp, rax
lea rbp, [rsp + 0x40]
mov rax, rcx
mov rcx, qword [0x1401061a0]
mov qword [rbp + 0x20], rcx
test rcx, rcx
jne 0x14003d03a
cmp dword [0x1401063c0], 1
mov rcx, rax
sete dl
xor r12d, r12d
xor dl, 1
mov dword [0x1401063c0], r12d
call fcn.1400365e0
jmp 0x14003daf7
mov rax, qword [0x140106268]
lea r14, [0x140000000]
mov rdi, qword [0x140106258]
xor r12d, r12d
mov r15, qword [0x140106260]
xor bl, bl
mov qword [rbp + 0x18], rax
mov eax, r12d
mov dword [rbp], eax
mov dword [0x1401063c0], r12d
mov dword [0x140106404], 1
mov word [0x140106408], r12w
mov dword [0x14010641c], 0x3fff
movzx eax, word [rdi]
mov qword [rbp + 0x10], r15
mov byte [rbp + 0x85d8], bl
test ax, ax
je 0x14003d100
lea rsi, [rdi + 2]
nop
movzx ebx, ax
test ebx, 0xffffff80
jne 0x14003d0be
mov edx, 2
mov ecx, ebx
call fcn.1400ab7a4
test eax, eax
je 0x14003d0be
and ebx, 0xffffffdf
movzx eax, bx
add eax, 0xffffffd6
cmp eax, 0x2c
ja case.0x14003d0df.51
cdqe
movzx eax, byte [r14 + rax + 0x3db34]
mov ecx, dword [r14 + rax*4 + 0x3db0c]
add rcx, r14
jmp rcx
mov byte [0x140106404], r12b
movzx ebx, byte [rbp + 0x85d8]
movzx eax, word [rdi + 2]
add rdi, 2
add rsi, 2
test ax, ax
jne 0x14003d0a0
xor edx, edx
lea rcx, [rbp + 0x180]
mov r8d, 0x100
call fcn.1400a7b90
xor edx, edx
lea rcx, [rbp + 0x380]
mov r8d, 0x200
call fcn.1400a7b90
mov word [rbp + 0x85ea], r12w
mov r13, r12
mov r14, r15
mov esi, 0x7d
cmp word [r15], r12w
je 0x14003d429
lea rsi, [0x1400fe210]
mov r15d, 0x7d
nop dword [rax]
nop word [rax + rax]
mov word [rbp + 0x85e8], r12w
movzx eax, word [r14]
cmp eax, 0x7b
je 0x14003d319
cmp eax, r15d
je 0x14003d404
test bl, bl
je 0x14003d222
inc r13
jmp 0x14003d404
mov byte [0x140106405], 1
jmp case.0x14003d0df.51
mov byte [0x140106406], 1
jmp case.0x14003d0df.51
mov byte [0x140106407], 1
jmp case.0x14003d0df.51
mov rcx, rsi
call fcn.1400ac7dc
movzx ebx, byte [rbp + 0x85d8]
mov dword [0x14010641c], eax
cmp eax, 0x3fff
jle 0x14003d0ef
mov dword [0x14010641c], 0x3fff
jmp 0x14003d0ef
mov rcx, rsi
call fcn.140016500
mulsd xmm0, qword [0x1400eb7d8]
cvttsd2si eax, xmm0
mov dword [rbp], eax
jmp case.0x14003d0df.51
mov byte [0x140106408], 1
jmp case.0x14003d0df.51
mov byte [0x140106409], 1
jmp case.0x14003d0df.51
mov bl, 1
mov byte [rbp + 0x85d8], bl
jmp 0x14003d0ef
xor ecx, ecx
mov word [rbp + 0x85e8], ax
mov byte [rbp + 0x85e0], r12b
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
movzx ecx, word [rbp + 0x85e8]
test cx, cx
je 0x14003d404
cmp word [rbp + 0x85ea], r12w
jne 0x14003d26c
mov r9b, 1
lea rdx, [rbp + 0x85e0]
mov r8, rax
call fcn.1400152f0
movzx edi, al
jmp 0x14003d3c2
movzx ebx, cx
test ebx, 0xffffff80
jne 0x14003d28a
mov edx, 2
mov ecx, ebx
call fcn.1400ab7a4
test eax, eax
je 0x14003d28a
and ebx, 0xffffffdf
cmp bx, 0x56
jne 0x14003d2ce
movzx ecx, word [rbp + 0x85ea]
call fcn.14000aa70
cmp ax, 0x4b
jne 0x14003d2ce
mov r8d, reloc.OLEAUT32.dll_SafeArrayGetDim
lea rdx, [rbp + 8]
lea rcx, [rbp + 0x85ec]
call fcn.1400acccc
movzx ecx, al
mov edi, r12d
mov rax, qword [rbp + 8]
cmp word [rax], r12w
cmove edi, ecx
jmp 0x14003d3c2
mov rdi, r12
lea rbx, str.Numpad0
nop dword [rax + rax]
mov rcx, qword [rbx]
lea rdx, [rbp + 0x85e8]
call fcn.1400a8c00
test eax, eax
je 0x14003d304
inc rdi
add rbx, 0x10
cmp rbx, rsi
invalid
jl 0x14003d2e0
jmp 0x14003d404
shl rdi, 4
lea rax, str.Numpad0
movzx edi, byte [rdi + rax + 8]
jmp 0x14003d3c2
mov edx, r15d
lea rcx, [r14 + 2]
call fcn.1400a7178
mov rbx, rax
test rax, rax
je 0x14003d404
sub rax, r14
sar rax, 1
sub rax, 1
jne 0x14003d34d
add rbx, 2
cmp word [rbx], r15w
jne 0x14003d404
jmp 0x14003d353
cmp rax, 1
jne 0x14003d370
cmp byte [rbp + 0x85d8], r12b
je 0x14003d364
inc r13
jmp 0x14003d404
movzx eax, word [r14 + 2]
mov word [rbp + 0x85e8], ax
xor ecx, ecx
mov word [rbx], r12w
mov byte [rbp + 0x85e0], r12b
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
mov r8b, 1
lea rdx, [rbp + 0x85e0]
lea rcx, [r14 + 2]
mov qword [rsp + 0x20], rax
call fcn.140015190
movzx edi, al
test al, al
jne 0x14003d3bb
lea rcx, [r14 + 2]
call fcn.140015090
test ax, ax
je 0x14003d3bb
movzx eax, ax
mov byte [rbp + rax + 0x380], 1
mov word [rbx], r15w
mov r14, rbx
test dil, dil
je 0x14003d404
movzx ecx, word [rbp + 0x85e8]
movzx ebx, dil
or byte [rbp + rbx + 0x180], 1
test cx, cx
je 0x14003d404
call qword [sym.imp.USER32.dll_IsCharAlphaW]
test eax, eax
jne 0x14003d404
test byte [rbp + 0x85e0], 0x30
je 0x14003d3fc
or byte [rbp + rbx + 0x180], 2
jmp 0x14003d404
or byte [rbp + rbx + 0x180], 4
movzx ebx, byte [rbp + 0x85d8]
lea rsi, [0x1400fe210]
add r14, 2
cmp word [r14], r12w
jne 0x14003d160
mov r15, qword [rbp + 0x10]
mov esi, 0x7d
lea rbx, [0x1400ccf5c]
mov qword [0x1401063d8], rbx
test r13, r13
je 0x14003d4ea
lea rax, [r13*2 + 2]
lea rcx, [rax + 0xf]
cmp rcx, rax
ja 0x14003d45b
movabs rcx, 0xffffffffffffff0
and rcx, 0xfffffffffffffff0
mov rax, rcx
call fcn.1400bde80
sub rsp, rcx
lea rbx, [rsp + 0x40]
mov qword [0x1401063d8], rbx
cmp word [r15], r12w
je 0x14003d4df
nop dword [rax]
movzx eax, word [r15]
cmp eax, 0x7b
je 0x14003d497
cmp eax, 0x7d
je 0x14003d4d5
mov word [rbx], ax
add rbx, 2
jmp 0x14003d4d5
lea rdi, [r15 + 2]
mov edx, esi
mov rcx, rdi
call fcn.1400a7178
mov rdx, rax
test rax, rax
je 0x14003d4d5
cmp rax, rdi
jne 0x14003d4bf
cmp word [rax + 2], 0x7d
lea rcx, [rax + 2]
cmove rdx, rcx
lea rax, [r15 + 4]
cmp rdx, rax
jne 0x14003d4d2
movzx eax, word [rdi]
mov word [rbx], ax
add rbx, 2
mov r15, rdx
add r15, 2
cmp word [r15], r12w
jne 0x14003d480
mov word [rbx], r12w
lea rbx, [0x1400ccf5c]
mov rdi, qword [rbp + 0x18]
mov dword [0x1401063f0], r12d
cmp word [rdi], r12w
je 0x14003d6cd
cmp qword [0x1401063e8], r12
jne 0x14003d546
mov ecx, 0x2000
call fcn.1400a8d78
mov qword [0x1401063e8], rax
test rax, rax
jne 0x14003d53c
mov rcx, qword [rbp + 0x85d0]
lea rdx, str.Out_of_memory.
mov r9, rbx
xor r8d, r8d
call fcn.1400367a0
jmp 0x14003daf7
mov dword [0x1401063f4], 0x400
mov rsi, qword [rbp + 0x85d0]
mov edx, 3
mov rcx, rsi
call fcn.1400263f0
mov ecx, dword [0x140106400]
inc rax
cmp rax, rcx
jbe 0x14003d5c8
mov rcx, qword [0x1401063f8]
mov edx, 0x1000
cmp rax, rdx
cmova edx, eax
mov dword [0x140106400], edx
test rcx, rcx
je 0x14003d590
call fcn.1400ac834
mov edx, dword [0x140106400]
lea ecx, [rdx + rdx]
call fcn.1400a8d78
mov qword [0x1401063f8], rax
mov rdx, rax
test rax, rax
jne 0x14003d5cf
mov dword [0x140106400], r12d
mov r9, rbx
xor r8d, r8d
lea rdx, str.Out_of_memory.
mov rcx, rsi
call fcn.1400367a0
jmp 0x14003daf7
mov rdx, qword [0x1401063f8]
mov ecx, dword [0x1401063f0]
mov rax, qword [0x1401063e8]
mov qword [rax + rcx*8], rdx
mov rbx, qword [0x1401063f8]
cmp word [rdi], r12w
je 0x14003d6aa
mov r14d, 0x2c
movzx eax, word [rdi]
cmp ax, r14w
je 0x14003d60c
mov word [rbx], ax
add rbx, 2
jmp 0x14003d69c
cmp word [rdi + 2], r14w
jne 0x14003d621
mov word [rbx], r14w
add rbx, 2
add rdi, 2
jmp 0x14003d69c
mov word [rbx], r12w
mov ecx, dword [0x1401063f0]
mov r8, qword [0x1401063e8]
mov rax, qword [r8 + rcx*8]
cmp word [rax], r12w
je 0x14003d65f
inc ecx
mov dword [0x1401063f0], ecx
add rbx, 2
mov eax, ecx
mov qword [r8 + rcx*8], rbx
mov word [rbx], r12w
mov ecx, dword [0x1401063f0]
mov r8, qword [0x1401063e8]
cmp word [rdi + 2], r12w
je 0x14003d69c
mov eax, dword [0x1401063f4]
cmp ecx, eax
jb 0x14003d69c
lea edx, [rax + 0x400]
mov rcx, r8
shl rdx, 3
call fcn.1400acaf0
test rax, rax
je 0x14003d815
add dword [0x1401063f4], 0x400
mov qword [0x1401063e8], rax
add rdi, 2
cmp word [rdi], r12w
jne 0x14003d5f7
mov word [rbx], r12w
mov edx, dword [0x1401063f0]
mov rax, qword [0x1401063e8]
mov rcx, qword [rax + rdx*8]
cmp word [rcx], r12w
je 0x14003d6cd
inc edx
mov dword [0x1401063f0], edx
cmp byte [0x140101bc0], r12b
je 0x14003d71a
mov rcx, qword [0x140101f68]
mov edx, reloc.OLEAUT32.dll_VariantTimeToDosDateTime
call qword [sym.imp.USER32.dll_KillTimer]
movzx ecx, byte [0x140101bc0]
test eax, eax
cmovne ecx, r12d
mov byte [0x140101bc0], cl
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
call qword [sym.imp.USER32.dll_GetQueueStatus]
shr eax, 0x10
test al, 0x10
je 0x14003d71a
mov edx, 1
or ecx, 0xffffffff
call fcn.140001710
or byte [0x140102e59], 1
lea rax, [rbp + 0x580]
cmp qword [0x140101f90], r12
mov qword [0x140106410], rax
lea rax, [rbp + 0x180]
mov qword [0x1401063c8], rax
lea rax, [rbp + 0x380]
mov qword [0x1401063d0], rax
mov word [rbp + 0x580], r12w
mov dword [0x140106418], r12d
mov dword [0x1401063c0], 1
mov byte [0x140101f7d], 1
jne 0x14003d780
movzx edx, word [0x140104e08]
call fcn.140009230
mov eax, dword [rbp]
test eax, eax
jle 0x14003d7c0
cmp byte [0x140101bc0], r12b
jne 0x14003d7c0
mov ecx, 0xa
lea r9, [0x140004220]
cmp eax, ecx
cmovl eax, ecx
lea edx, [rcx + 2]
mov r8d, eax
mov rcx, qword [0x140101f68]
call qword [sym.imp.USER32.dll_SetTimer]
test rax, rax
setne byte [0x140101bc0]
nop
mov edx, 1
mov ecx, 0x8000012f
call fcn.140001710
mov ecx, dword [0x1401063c0]
cmp ecx, 1
je 0x14003d7c0
sub ecx, 2
je 0x14003da66
sub ecx, 1
je 0x14003da5d
sub ecx, 1
je 0x14003d82d
xor r9d, r9d
mov byte [rsp + 0x20], 1
or r8, 0xffffffffffffffff
cmp ecx, 1
mov rcx, qword [0x140101f48]
je 0x14003d821
lea rdx, str.NewInput
jmp 0x14003da80
lea r9, [0x1400ccf5c]
jmp 0x14003d5b1
lea rdx, [0x1400e4660]
jmp 0x14003da80
movups xmm0, xmmword [str.EndKey:]
xor edx, edx
lea rcx, [rbp + 0x40]
mov r8d, 0xf0
movaps xmmword [rbp + 0x30], xmm0
call fcn.1400a7b90
movzx eax, word [0x1401063e4]
test ax, ax
je 0x14003d867
mov word [rbp + 0x3e], ax
lea rdx, [rbp + 0x30]
mov word [rbp + 0x40], r12w
jmp 0x14003da6d
cmp byte [0x1401063e7], r12b
je 0x14003d942
xor edx, edx
lea rcx, [rbp + 0x280]
mov r8d, 0x100
call fcn.1400a7b90
or byte [rbp + 0x290], 0x80
call qword [sym.imp.USER32.dll_GetForegroundWindow]
mov ebx, r12d
test rax, rax
je 0x14003d8dd
xor edx, edx
mov rcx, rax
call qword [sym.imp.USER32.dll_GetWindowThreadProcessId]
lea rdx, [rbp + 0x130]
mov dword [rbp + 0x130], 0x48
mov ecx, eax
mov ebx, eax
call qword [sym.imp.USER32.dll_GetGUIThreadInfo]
test eax, eax
je 0x14003d8dd
mov rcx, qword [rbp + 0x140]
test rcx, rcx
je 0x14003d8dd
xor edx, edx
call qword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov ebx, eax
mov ecx, ebx
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
cmp dword [0x140101bc4], r12d
mov edi, r12d
movzx ecx, byte [0x1401063e0]
mov rbx, rax
setne dil
xor edx, edx
call fcn.140015830
movzx ecx, byte [0x1401063e0]
lea r9, [rbp + 0x3e]
mov qword [rsp + 0x30], rbx
lea r8, [rbp + 0x280]
movzx edx, ax
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], 2
call qword [sym.imp.USER32.dll_ToUnicodeEx]
movsxd rcx, eax
lea rdx, [rbp + 0x30]
mov word [rbp + rcx*2 + 0x3e], r12w
jmp 0x14003da6d
cmp byte [0x1401063e6], r12b
mov ecx, r12d
je 0x14003d9a8
movzx edx, word [0x1401063e2]
lea rax, [0x1400fda78]
lea r8, [0x1400fdb48]
cmp word [rax], dx
je 0x14003d991
inc ecx
add rax, 0x10
cmp rax, r8
jl 0x14003d963
movzx r9d, dx
lea r8, str.sc_03X
mov edx, 0x79
lea rcx, [rbp + 0x3e]
call fcn.140088db0
jmp 0x14003da39
movsxd rdx, ecx
lea rax, [0x140000000]
add rdx, rdx
mov rdx, qword [rax + rdx*8 + 0xfda70]
jmp 0x14003da22
movzx ebx, byte [0x1401063e0]
lea rax, [0x1400fdb48]
lea rdx, [0x1400fe218]
nop dword [rax]
cmp byte [rax], bl
je 0x14003da11
inc ecx
add rax, 0x10
cmp rax, rdx
jl 0x14003d9c0
movzx ecx, bl
call fcn.140014ef0
mov word [rbp + 0x3e], ax
test ax, ax
je 0x14003d9e7
mov word [rbp + 0x40], r12w
jmp 0x14003da39
test bl, bl
je 0x14003da06
movzx r9d, bl
lea r8, str.vk_02X
mov edx, 0x79
lea rcx, [rbp + 0x3e]
call fcn.140088db0
jmp 0x14003da39
mov word [rbp + 0x3e], r12w
lea rdx, [rbp + 0x30]
jmp 0x14003da6d
movsxd rdx, ecx
lea rax, str.Numpad0
add rdx, rdx
mov rdx, qword [rax + rdx*8]
mov r8d, 0x78
lea rcx, [rbp + 0x3e]
call fcn.1400b1c24
mov word [rbp + 0x12e], r12w
movzx eax, word [rbp + 0x3e]
sub ax, 0x61
cmp ax, 0x19
ja 0x14003da57
cmp word [rbp + 0x40], r12w
jne 0x14003da57
mov eax, 0xffe0
add word [rbp + 0x3e], ax
lea rdx, [rbp + 0x30]
jmp 0x14003da6d
lea rdx, str.Match
jmp 0x14003da6d
lea rdx, str.Timeout
mov rcx, qword [0x140101f48]
xor r9d, r9d
or r8, 0xffffffffffffffff
mov byte [rsp + 0x20], 1
call fcn.14008c280
cmp byte [0x140101bc0], r12b
mov dword [0x1401063c0], r12d
je 0x14003dadb
mov rcx, qword [0x140101f68]
mov edx, reloc.OLEAUT32.dll_VariantTimeToDosDateTime
call qword [sym.imp.USER32.dll_KillTimer]
movzx r8d, byte [0x140101bc0]
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
test eax, eax
cmovne r8d, r12d
mov byte [0x140101bc0], r8b
call qword [sym.imp.USER32.dll_GetQueueStatus]
shr eax, 0x10
test al, 0x10
je 0x14003dadb
mov edx, 1
or ecx, 0xffffffff
call fcn.140001710
mov rcx, qword [rbp + 0x20]
lea rdx, [rbp + 0x580]
xor r9d, r9d
mov byte [rsp + 0x20], 1
or r8, 0xffffffffffffffff
call fcn.14008c280
lea rsp, [rbp + 0x8588]
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret