Function at 0x140034e40
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, 0x8568
call fcn.1400ad480
sub rsp, rax
lea rbp, [rsp + 0x40]
mov rax, qword [0x1400f4120]
mov qword [rbp + 0x18], rax
test rax, rax
jne 0x140034e96
cmp dword [0x1400f4330], 1
sete al
xor r15d, r15d
test al, al
mov dword [0x1400f4330], r15d
sete dl
call fcn.14002f160
jmp 0x140035799
mov rdi, qword [0x1400f41d8]
xor r15d, r15d
mov rsi, qword [0x1400f41e0]
mov eax, r15d
mov r13, qword [0x1400f41e8]
xor bl, bl
mov dword [rbp], eax
mov dword [0x1400f4330], r15d
mov dword [0x1400f4374], 1
mov word [0x1400f4378], r15w
mov dword [0x1400f438c], 0x3fff
movzx eax, word [rdi]
mov qword [rbp + 8], rsi
mov qword [rbp + 0x10], r13
mov byte [rbp + 0x8578], bl
test ax, ax
je 0x140034f60
lea r14, [rdi + 2]
lea r12, [0x140000000]
nop word [rax + rax]
movzx ebx, ax
test ebx, 0xffffff80
jne 0x140034f1e
mov edx, 2
mov ecx, ebx
call fcn.14009ad94
test eax, eax
je 0x140034f1e
and ebx, 0xffffffdf
movzx eax, bx
add eax, 0xffffffd6
cmp eax, 0x2c
ja case.0x140034f3f.51
cdqe
movzx eax, byte [r12 + rax + 0x357d8]
mov ecx, dword [r12 + rax*4 + 0x357b0]
add rcx, r12
jmp rcx
mov byte [0x1400f4374], r15b
movzx ebx, byte [rbp + 0x8578]
movzx eax, word [rdi + 2]
add rdi, 2
add r14, 2
test ax, ax
jne 0x140034f00
xor edx, edx
lea rcx, [rbp + 0x120]
mov r8d, 0x100
call fcn.140097200
xor edx, edx
lea rcx, [rbp + 0x320]
mov r8d, 0x200
call fcn.140097200
mov r12, r15
mov word [rbp + 0x858a], r15w
mov rdi, rsi
cmp word [rsi], r12w
je 0x1400351ba
xor r13d, r13d
lea esi, [r13 + 0x7d]
nop word [rax + rax]
mov word [rbp + 0x8588], r13w
movzx eax, word [rdi]
cmp eax, 0x7b
je 0x1400350ae
cmp eax, esi
je 0x14003519a
test bl, bl
je 0x140035070
inc r12
jmp 0x14003519a
mov byte [0x1400f4375], 1
jmp case.0x140034f3f.51
mov byte [0x1400f4376], 1
jmp case.0x140034f3f.51
mov byte [0x1400f4377], 1
jmp case.0x140034f3f.51
mov rcx, r14
call fcn.14009bdb8
movzx ebx, byte [rbp + 0x8578]
mov dword [0x1400f438c], eax
cmp eax, 0x3fff
jle 0x140034f4f
mov dword [0x1400f438c], 0x3fff
jmp 0x140034f4f
mov rcx, r14
call fcn.140014330
mulsd xmm0, qword [0x1400da1c0]
cvttsd2si eax, xmm0
mov dword [rbp], eax
jmp case.0x140034f3f.51
mov byte [0x1400f4378], 1
jmp case.0x140034f3f.51
mov byte [0x1400f4379], 1
jmp case.0x140034f3f.51
mov bl, 1
mov byte [rbp + 0x8578], bl
jmp 0x140034f4f
xor ecx, ecx
mov word [rbp + 0x8588], ax
mov byte [rbp + 0x8580], r13b
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
mov r9b, 1
lea rdx, [rbp + 0x8580]
lea rcx, [rbp + 0x8588]
mov qword [rsp + 0x20], rax
movzx r8d, r9b
call fcn.140013310
movzx r15d, al
jmp 0x140035158
mov edx, esi
lea rcx, [rdi + 2]
call fcn.1400963a8
mov rbx, rax
test rax, rax
je 0x14003519a
sub rax, rdi
sar rax, 1
sub rax, 1
jne 0x1400350e0
add rbx, 2
cmp word [rbx], si
jne 0x14003519a
jmp 0x1400350e6
cmp rax, 1
jne 0x140035102
cmp byte [rbp + 0x8578], r13b
je 0x1400350f7
inc r12
jmp 0x14003519a
movzx eax, word [rdi + 2]
mov word [rbp + 0x8588], ax
xor ecx, ecx
mov word [rbx], r13w
mov byte [rbp + 0x8580], r13b
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
mov r9b, 1
lea rdx, [rbp + 0x8580]
lea rcx, [rdi + 2]
mov qword [rsp + 0x20], rax
movzx r8d, r9b
call fcn.140013310
movzx r15d, al
test al, al
jne 0x140035152
lea rcx, [rdi + 2]
call fcn.140013220
test ax, ax
je 0x140035152
movzx eax, ax
mov byte [rbp + rax + 0x320], 1
mov word [rbx], si
mov rdi, rbx
test r15b, r15b
je 0x14003519a
movzx ecx, word [rbp + 0x8588]
movzx ebx, r15b
or byte [rbp + rbx + 0x120], 1
test cx, cx
je 0x14003519a
call qword [sym.imp.USER32.dll_IsCharAlphaW]
test eax, eax
jne 0x14003519a
test byte [rbp + 0x8580], 0x30
je 0x140035192
or byte [rbp + rbx + 0x120], 2
jmp 0x14003519a
or byte [rbp + rbx + 0x120], 4
movzx ebx, byte [rbp + 0x8578]
add rdi, 2
cmp word [rdi], r13w
jne 0x140034fb0
mov rsi, qword [rbp + 8]
xor r15d, r15d
mov r13, qword [rbp + 0x10]
lea r14, [0x1400bbf7c]
mov qword [0x1400f4348], r14
test r12, r12
je 0x14003527d
lea rax, [r12*2 + 2]
lea rcx, [rax + 0xf]
cmp rcx, rax
ja 0x1400351ec
movabs rcx, 0xffffffffffffff0
and rcx, 0xfffffffffffffff0
mov rax, rcx
call fcn.1400ad480
sub rsp, rcx
lea rbx, [rsp + 0x40]
mov qword [0x1400f4348], rbx
cmp word [rsi], 0
je 0x140035279
mov r14d, 0x7d
movzx eax, word [rsi]
cmp eax, 0x7b
je 0x140035229
cmp eax, r14d
je 0x140035268
mov word [rbx], ax
add rbx, 2
jmp 0x140035268
lea rdi, [rsi + 2]
mov edx, r14d
mov rcx, rdi
call fcn.1400963a8
mov rdx, rax
test rax, rax
je 0x140035268
cmp rax, rdi
jne 0x140035252
cmp word [rax + 2], r14w
lea rcx, [rax + 2]
cmove rdx, rcx
lea rax, [rsi + 4]
cmp rdx, rax
jne 0x140035265
movzx eax, word [rdi]
mov word [rbx], ax
add rbx, 2
mov rsi, rdx
add rsi, 2
cmp word [rsi], 0
jne 0x140035213
lea r14, [0x1400bbf7c]
mov word [rbx], r15w
mov dword [0x1400f4360], r15d
cmp word [r13], 0
je 0x140035469
cmp qword [0x1400f4358], 0
jne 0x1400352d8
mov ecx, 0x2000
call fcn.140098368
mov qword [0x1400f4358], rax
test rax, rax
jne 0x1400352ce
mov rcx, qword [rbp + 0x8570]
lea rdx, str.Out_of_memory.
mov r9, r14
xor r8d, r8d
call fcn.14002f3c0
jmp 0x140035799
mov dword [0x1400f4364], 0x400
mov rdi, qword [rbp + 0x8570]
mov edx, 3
mov rcx, rdi
call fcn.1400223c0
mov ecx, dword [0x1400f4370]
inc rax
cmp rax, rcx
jbe 0x14003535a
mov rcx, qword [0x1400f4368]
mov edx, 0x1000
cmp rax, rdx
cmova edx, eax
mov dword [0x1400f4370], edx
test rcx, rcx
je 0x140035322
call fcn.14009c290
mov edx, dword [0x1400f4370]
lea ecx, [rdx + rdx]
call fcn.140098368
mov qword [0x1400f4368], rax
mov rdx, rax
test rax, rax
jne 0x140035361
mov dword [0x1400f4370], r15d
mov r9, r14
lea rdx, str.Out_of_memory.
xor r8d, r8d
mov rcx, rdi
call fcn.14002f3c0
jmp 0x140035799
mov rdx, qword [0x1400f4368]
mov ecx, dword [0x1400f4360]
mov rax, qword [0x1400f4358]
mov qword [rax + rcx*8], rdx
cmp word [r13], 0
mov rbx, qword [0x1400f4368]
je 0x140035446
mov esi, 0x2c
nop word [rax + rax]
movzx eax, word [r13]
cmp ax, si
je 0x1400353a6
mov word [rbx], ax
add rbx, 2
jmp 0x140035436
cmp word [r13 + 2], si
jne 0x1400353ba
mov word [rbx], si
add rbx, 2
add r13, 2
jmp 0x140035436
mov word [rbx], r15w
mov ecx, dword [0x1400f4360]
mov r8, qword [0x1400f4358]
mov rax, qword [r8 + rcx*8]
cmp word [rax], 0
je 0x1400353f8
inc ecx
mov dword [0x1400f4360], ecx
add rbx, 2
mov eax, ecx
mov qword [r8 + rcx*8], rbx
mov word [rbx], r15w
mov ecx, dword [0x1400f4360]
mov r8, qword [0x1400f4358]
cmp word [r13 + 2], 0
je 0x140035436
mov eax, dword [0x1400f4364]
cmp ecx, eax
jb 0x140035436
lea edx, [rax + 0x400]
mov rcx, r8
shl rdx, 3
call fcn.14009c0c4
test rax, rax
je 0x140035340
add dword [0x1400f4364], 0x400
mov qword [0x1400f4358], rax
add r13, 2
cmp word [r13], 0
jne 0x140035390
mov word [rbx], r15w
mov edx, dword [0x1400f4360]
mov rax, qword [0x1400f4358]
mov rcx, qword [rax + rdx*8]
cmp word [rcx], 0
je 0x140035469
inc edx
mov dword [0x1400f4360], edx
cmp byte [0x1400efb50], 0
je 0x1400354b6
mov rcx, qword [0x1400efef8]
mov edx, reloc.OLEAUT32.dll_VariantTimeToDosDateTime
call qword [sym.imp.USER32.dll_KillTimer]
movzx ecx, byte [0x1400efb50]
test eax, eax
cmovne ecx, r15d
mov byte [0x1400efb50], cl
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
call qword [sym.imp.USER32.dll_GetQueueStatus]
shr eax, 0x10
test al, 0x10
je 0x1400354b6
mov edx, 1
or ecx, 0xffffffff
call fcn.140001800
xor edx, edx
lea rcx, [rbp + 0x520]
mov r8d, 0x8000
call fcn.140097200
or byte [0x1400f0cb6], 1
lea rax, [rbp + 0x520]
cmp qword [0x1400eff20], 0
mov qword [0x1400f4380], rax
lea rax, [rbp + 0x120]
mov qword [0x1400f4338], rax
lea rax, [rbp + 0x320]
mov qword [0x1400f4340], rax
mov dword [0x1400f4388], r15d
mov dword [0x1400f4330], 1
mov byte [0x1400eff0c], 1
jne 0x14003552c
mov rax, qword [0x1400ede48]
movzx edx, word [rax]
call fcn.140008ff0
mov eax, dword [rbp]
test eax, eax
jle 0x140035570
cmp byte [0x1400efb50], 0
jne 0x140035570
mov ecx, 0xa
lea r9, [0x140004110]
cmp eax, ecx
cmovl eax, ecx
lea edx, [rcx + 2]
mov r8d, eax
mov rcx, qword [0x1400efef8]
call qword [sym.imp.USER32.dll_SetTimer]
test rax, rax
setne byte [0x1400efb50]
nop word [rax + rax]
mov edx, 1
mov ecx, 0x8000012f
call fcn.140001800
mov ecx, dword [0x1400f4330]
cmp ecx, 1
je 0x140035570
sub ecx, 2
je 0x140035708
sub ecx, 1
je 0x1400356ff
sub ecx, 1
je 0x1400355d1
xor r9d, r9d
mov byte [rsp + 0x20], 1
or r8, 0xffffffffffffffff
cmp ecx, 1
mov rcx, qword [0x1400efed8]
je 0x1400355c5
lea rdx, str.NewInput
jmp 0x140035722
lea rdx, [0x1400d6e70]
jmp 0x140035722
movups xmm0, xmmword [str.EndKey:]
xor edx, edx
lea rcx, [rbp + 0x30]
mov r8d, 0xf0
movaps xmmword [rbp + 0x20], xmm0
call fcn.140097200
movzx eax, word [0x1400f4354]
test ax, ax
je 0x14003560b
mov word [rbp + 0x2e], ax
lea rdx, [rbp + 0x20]
mov word [rbp + 0x30], r15w
jmp 0x14003570f
cmp byte [0x1400f4357], 0
je 0x1400356b0
xor edx, edx
lea rcx, [rbp + 0x220]
mov r8d, 0x100
call fcn.140097200
or byte [rbp + 0x230], 0x80
call qword [sym.imp.USER32.dll_GetForegroundWindow]
test rax, rax
je 0x14003564b
xor edx, edx
mov rcx, rax
call qword [sym.imp.USER32.dll_GetWindowThreadProcessId]
jmp 0x14003564e
mov eax, r15d
mov ecx, eax
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
cmp dword [0x1400efb54], 0
mov edi, r15d
movzx ecx, byte [0x1400f4350]
mov rbx, rax
setne dil
xor edx, edx
call fcn.1400137e0
movzx ecx, byte [0x1400f4350]
lea r9, [rbp + 0x2e]
mov qword [rsp + 0x30], rbx
lea r8, [rbp + 0x220]
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 + 0x20]
mov word [rbp + rcx*2 + 0x2e], r15w
jmp 0x14003570f
cmp byte [0x1400f4356], 0
lea rdx, [rbp + 0x2e]
mov r9b, 1
mov r8d, 0x79
je 0x1400356d4
movzx ecx, word [0x1400f4352]
call fcn.140012f10
jmp 0x1400356e0
movzx ecx, byte [0x1400f4350]
call fcn.140012fc0
movzx ecx, word [rbp + 0x2e]
lea eax, [rcx - 0x61]
cmp ax, 0x19
ja 0x1400356f9
mov eax, 0xffe0
add cx, ax
mov word [rbp + 0x2e], cx
lea rdx, [rbp + 0x20]
jmp 0x14003570f
lea rdx, str.Match
jmp 0x14003570f
lea rdx, str.Timeout
mov rcx, qword [0x1400efed8]
xor r9d, r9d
or r8, 0xffffffffffffffff
mov byte [rsp + 0x20], 1
call fcn.14007c070
cmp byte [0x1400efb50], 0
mov dword [0x1400f4330], r15d
je 0x14003577d
mov rcx, qword [0x1400efef8]
mov edx, reloc.OLEAUT32.dll_VariantTimeToDosDateTime
call qword [sym.imp.USER32.dll_KillTimer]
movzx r8d, byte [0x1400efb50]
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
test eax, eax
cmovne r8d, r15d
mov byte [0x1400efb50], r8b
call qword [sym.imp.USER32.dll_GetQueueStatus]
shr eax, 0x10
test al, 0x10
je 0x14003577d
mov edx, 1
or ecx, 0xffffffff
call fcn.140001800
mov rcx, qword [rbp + 0x18]
lea rdx, [rbp + 0x520]
xor r9d, r9d
mov byte [rsp + 0x20], 1
or r8, 0xffffffffffffffff
call fcn.14007c070
lea rsp, [rbp + 0x8528]
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret