Function at 0x409f22
Capabilities:
Get keyboard layout

Disassembly:
push ebp
mov eax, 0x44a0
lea ebp, [esp - 0x78]
call fcn.004561f0
push ebx
xor ebx, ebx
cmp byte [0x466341], bl
mov dword [ebp + 0x68], ecx
je 0x409f47
xor eax, eax
inc eax
jmp 0x40a571
mov eax, dword [0x467ff0]
cmp eax, ebx
mov dword [ebp + 0x58], eax
jne 0x409f87
cmp dword [0x465c48], 1
mov dword [0x465c48], ebx
sete al
cmp al, bl
mov eax, 0x45871c
jne 0x409f71
mov eax, 0x459f14
mov ecx, dword [0x465b20]
push 1
push ebx
push 0xffffffffffffffff
push eax
call fcn.00401592
jmp 0x40a571
mov eax, dword [0x467fa4]
push esi
push edi
mov dword [ebp + 0x60], eax
mov eax, dword [0x467fac]
mov dword [ebp + 0x64], eax
mov esi, dword [0x467fa8]
push 0x3f
xor eax, eax
pop ecx
mov byte [ebp - 0x228], bl
lea edi, [ebp - 0x227]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x7f
mov byte [ebp - 0x428], bl
xor eax, eax
pop ecx
lea edi, [ebp - 0x427]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov dword [0x465c48], ebx
stosb byte es:[edi], al
mov byte [ebp + 0x6d], bl
jmp 0x40a0d0
mov byte [ebp + 0x6c], bl
mov al, byte [esi]
movsx ecx, al
sub ecx, 0x7b
je 0x40a018
dec ecx
dec ecx
je 0x40a0cf
push ebx
mov byte [ebp + 0x6c], al
mov byte [ebp + 0x77], bl
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
push 1
push 1
lea eax, [ebp + 0x77]
push eax
lea eax, [ebp + 0x6c]
push eax
call fcn.00413156
add esp, 0x14
mov byte [ebp + 0x76], al
jmp 0x40a09c
lea eax, [esi + 1]
push 0x7d
push eax
mov dword [ebp + 0x5c], eax
call fcn.00455d80
mov edi, eax
cmp edi, ebx
pop ecx
pop ecx
je 0x40a0cf
sub eax, esi
dec eax
mov dword [ebp + 0x70], eax
jne 0x40a04b
inc edi
cmp byte [edi], 0x7d
jne 0x40a0cf
mov dword [ebp + 0x70], 1
mov byte [edi], bl
push ebx
mov byte [ebp + 0x77], bl
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov esi, dword [ebp + 0x5c]
push eax
push 1
push 1
lea eax, [ebp + 0x77]
push eax
push esi
call fcn.00413156
add esp, 0x14
cmp al, bl
mov byte [ebp + 0x76], al
je 0x40a080
cmp dword [ebp + 0x70], 1
jne 0x40a097
mov al, byte [esi]
mov byte [ebp + 0x6c], al
jmp 0x40a097
push esi
call fcn.00412efe
cmp ax, bx
pop ecx
je 0x40a097
movzx eax, ax
mov byte [ebp + eax - 0x428], 1
mov byte [edi], 0x7d
mov esi, edi
cmp byte [ebp + 0x76], bl
je 0x40a0cf
movzx edi, byte [ebp + 0x76]
lea edi, [ebp + edi - 0x228]
or byte [edi], 1
cmp byte [ebp + 0x6c], bl
je 0x40a0cf
push dword [ebp + 0x6c]
call dword [sym.imp.USER32.dll_IsCharAlphaA]
test eax, eax
jne 0x40a0cf
test byte [ebp + 0x77], 0x30
je 0x40a0cc
or byte [edi], 2
jmp 0x40a0cf
or byte [edi], 4
inc esi
cmp byte [esi], bl
jne 0x409fd9
mov edi, dword [ebp + 0x64]
mov dword [0x465c60], ebx
cmp byte [edi], bl
je 0x40a23b
cmp dword [0x465c5c], ebx
mov esi, 0x1000
jne 0x40a110
push esi
call fcn.0043ea34
cmp eax, ebx
pop ecx
mov dword [0x465c5c], eax
je 0x40a15d
mov dword [0x465c64], 0x400
mov ecx, dword [ebp + 0x68]
push 4
call fcn.0041c5f5
inc eax
cmp eax, dword [0x465c6c]
jbe 0x40a175
cmp eax, esi
mov dword [0x465c6c], eax
ja 0x40a132
mov dword [0x465c6c], esi
mov eax, dword [0x465c68]
cmp eax, ebx
je 0x40a142
push eax
call fcn.0043dff1
pop ecx
push dword [0x465c6c]
call fcn.0043ea34
cmp eax, ebx
pop ecx
mov dword [0x465c68], eax
jne 0x40a17a
mov dword [0x465c6c], ebx
mov ecx, dword [ebp + 0x68]
push 0x4585d8
push ebx
push str.Out_of_memory.
call fcn.0044a60c
jmp 0x40a56f
mov eax, dword [0x465c68]
mov esi, dword [0x465c60]
mov ecx, dword [0x465c5c]
mov dword [ecx + esi*4], eax
mov esi, dword [0x465c68]
cmp byte [edi], bl
mov edx, edi
jmp 0x40a218
mov al, byte [edx]
cmp al, 0x2c
je 0x40a1a3
mov byte [esi], al
inc esi
jmp 0x40a212
inc edx
cmp byte [edx], 0x2c
jne 0x40a1b2
mov byte [esi], 0x2c
inc esi
mov dword [ebp + 0x70], edx
jmp 0x40a212
mov byte [esi], bl
mov ecx, dword [0x465c5c]
mov eax, dword [0x465c60]
mov edi, dword [ecx + eax*4]
cmp byte [edi], bl
je 0x40a1dd
inc eax
mov dword [0x465c60], eax
inc esi
mov dword [ecx + eax*4], esi
mov byte [esi], bl
mov ecx, dword [0x465c5c]
mov eax, dword [0x465c60]
cmp byte [edx], bl
je 0x40a212
mov edx, dword [0x465c64]
cmp eax, edx
jb 0x40a212
lea eax, [edx*4 + 0x1000]
push eax
push ecx
call fcn.004400c1
cmp eax, ebx
pop ecx
pop ecx
je 0x40a15d
add dword [0x465c64], 0x400
mov dword [0x465c5c], eax
mov edx, dword [ebp + 0x70]
inc edx
cmp byte [edx], bl
mov dword [ebp + 0x70], edx
jne 0x40a198
mov byte [esi], bl
mov eax, dword [0x465c5c]
mov ecx, dword [0x465c60]
mov eax, dword [eax + ecx*4]
cmp byte [eax], bl
je 0x40a23b
inc dword [0x465c60]
cmp byte [0x465353], bl
je 0x40a275
push 0xc
push dword [0x465208]
call dword [sym.imp.USER32.dll_KillTimer]
test eax, eax
je 0x40a25b
mov byte [0x465353], bl
push 0x10
call dword [sym.imp.USER32.dll_GetQueueStatus]
shr eax, 0x10
test al, 0x10
je 0x40a275
push 1
push 0xffffffffffffffff
call fcn.0040b5c4
pop ecx
pop ecx
xor eax, eax
mov byte [ebp - 0x4428], bl
mov ecx, 0xfff
lea edi, [ebp - 0x4427]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x4428]
mov dword [0x465c78], eax
mov eax, dword [ebp + 0x60]
mov esi, 0x3fff
mov byte [0x465c70], 1
mov byte [0x465c71], bl
mov byte [0x465c72], bl
mov byte [0x465c73], bl
mov byte [0x465c74], bl
mov byte [0x465c75], bl
mov dword [0x465c7c], ebx
mov dword [0x465c80], esi
cmp byte [eax], bl
mov dword [ebp + 0x70], ebx
mov edi, eax
je 0x40a380
movsx eax, byte [edi]
push eax
call fcn.00441c9f
cmp eax, 0x4c
pop ecx
jg 0x40a33f
je 0x40a324
sub eax, 0x2a
je 0x40a31b
sub eax, 0x18
je 0x40a313
dec eax
je 0x40a30a
sub eax, 6
jne 0x40a377
mov byte [0x465c72], 1
jmp 0x40a377
mov byte [0x465c71], 1
jmp 0x40a377
mov byte [0x465c70], bl
jmp 0x40a377
mov byte [0x465c75], 1
jmp 0x40a377
lea eax, [edi + 1]
push eax
call fcn.004019f5
cmp eax, esi
pop ecx
mov dword [0x465c80], eax
jle 0x40a377
mov dword [0x465c80], esi
jmp 0x40a377
sub eax, 0x4d
je 0x40a370
sub eax, 7
je 0x40a356
dec eax
dec eax
jne 0x40a377
mov byte [0x465c74], 1
jmp 0x40a377
lea eax, [edi + 1]
push eax
call fcn.00401220
fmul qword [0x45ae40]
pop ecx
call fcn.0045676c
mov dword [ebp + 0x70], eax
jmp 0x40a377
mov byte [0x465c73], 1
inc edi
cmp byte [edi], bl
jne 0x40a2de
lea eax, [ebp - 0x228]
mov dword [0x465c4c], eax
xor esi, esi
lea eax, [ebp - 0x428]
inc esi
mov dword [0x465c50], eax
mov dword [0x465c48], esi
mov byte [0x46534c], 1
call fcn.0040ec95
mov eax, dword [ebp + 0x70]
cmp eax, ebx
jle 0x40a3e0
cmp byte [0x465353], bl
jne 0x40a3e0
cmp eax, 0xa
jge 0x40a3c2
push 0xa
pop eax
push 0x409ef3
push eax
push 0xc
push dword [0x465208]
call dword [sym.imp.USER32.dll_SetTimer]
test eax, eax
setne al
mov byte [0x465353], al
push esi
push 0x8000012f
call fcn.0040b5c4
mov eax, dword [0x465c48]
cmp eax, esi
pop ecx
pop ecx
je 0x40a3e0
dec eax
dec eax
je 0x40a509
dec eax
je 0x40a4fe
dec eax
je 0x40a429
dec eax
mov ecx, dword [0x465b20]
push esi
push ebx
push 0xffffffffffffffff
je 0x40a41f
push str.NewInput
jmp 0x40a518
push 0x45c9c8
jmp 0x40a518
mov eax, dword [str.EndKey:]
mov dword [ebp - 0x28], eax
mov eax, dword [0x45c9c4]
mov dword [ebp - 0x24], eax
push 0x1e
xor eax, eax
cmp byte [0x465c59], bl
pop ecx
lea edi, [ebp - 0x20]
rep stosd dword es:[edi], eax
je 0x40a4c3
push 0x3f
mov byte [ebp - 0x128], bl
pop ecx
lea edi, [ebp - 0x127]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
or byte [ebp - 0x118], 0x80
call dword [sym.imp.USER32.dll_GetForegroundWindow]
cmp eax, ebx
je 0x40a47a
push ebx
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
jmp 0x40a47c
xor eax, eax
push eax
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
xor eax, eax
cmp dword [0x465370], ebx
setne al
push eax
lea eax, [ebp - 0x21]
push eax
lea eax, [ebp - 0x128]
push eax
xor eax, eax
mov al, byte [0x465c54]
push ebx
push eax
call fcn.0041166b
pop ecx
movzx eax, ax
pop ecx
push eax
movzx eax, byte [0x465c54]
push eax
call dword [sym.imp.USER32.dll_ToAsciiEx]
mov byte [ebp + eax - 0x21], bl
jmp 0x40a4f4
lea eax, [ebp - 0x21]
push 0x79
push eax
xor eax, eax
cmp byte [0x465c58], bl
mov ax, word [0x465c56]
push eax
je 0x40a4e4
call fcn.004117eb
add esp, 0xc
jmp 0x40a4f4
xor eax, eax
mov al, byte [0x465c54]
push eax
call fcn.0041344f
add esp, 0x10
push esi
push ebx
push 0xffffffffffffffff
lea eax, [ebp - 0x28]
push eax
jmp 0x40a512
push esi
push ebx
push 0xffffffffffffffff
push str.Match
jmp 0x40a512
push esi
push ebx
push 0xffffffffffffffff
push str.Timeout
mov ecx, dword [0x465b20]
call fcn.00401592
cmp byte [0x465353], bl
mov dword [0x465c48], ebx
je 0x40a55c
push 0xc
push dword [0x465208]
call dword [sym.imp.USER32.dll_KillTimer]
test eax, eax
je 0x40a543
mov byte [0x465353], bl
push 0x10
call dword [sym.imp.USER32.dll_GetQueueStatus]
shr eax, 0x10
test al, 0x10
je 0x40a55c
push esi
push 0xffffffffffffffff
call fcn.0040b5c4
pop ecx
pop ecx
mov ecx, dword [ebp + 0x58]
push esi
push ebx
push 0xffffffffffffffff
lea eax, [ebp - 0x4428]
push eax
call fcn.00401592
pop edi
pop esi
pop ebx
add ebp, 0x78
leave
ret