Function at 0x40aca6
Capabilities:
Get keyboard layout

Disassembly:
push ebp
mov eax, 0x44a0
lea ebp, [esp - 0x78]
call fcn.00454e20
push ebx
xor ebx, ebx
cmp byte [0x4654b9], bl
mov dword [ebp + 0x68], ecx
je 0x40accb
xor eax, eax
inc eax
jmp 0x40b2f5
mov eax, dword [0x467168]
cmp eax, ebx
mov dword [ebp + 0x58], eax
jne 0x40ad0b
cmp dword [0x464dc0], 1
mov dword [0x464dc0], ebx
sete al
cmp al, bl
mov eax, 0x45771c
jne 0x40acf5
mov eax, 0x458f24
mov ecx, dword [0x464c98]
push 1
push ebx
push 0xffffffffffffffff
push eax
call fcn.0040152b
jmp 0x40b2f5
mov eax, dword [0x46711c]
push esi
push edi
mov dword [ebp + 0x60], eax
mov eax, dword [0x467124]
mov dword [ebp + 0x64], eax
mov esi, dword [0x467120]
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 [0x464dc0], ebx
stosb byte es:[edi], al
mov byte [ebp + 0x6d], bl
jmp 0x40ae54
mov byte [ebp + 0x6c], bl
mov al, byte [esi]
movsx ecx, al
sub ecx, 0x7b
je 0x40ad9c
dec ecx
dec ecx
je 0x40ae53
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.00413c75
add esp, 0x14
mov byte [ebp + 0x76], al
jmp 0x40ae20
lea eax, [esi + 1]
push 0x7d
push eax
mov dword [ebp + 0x5c], eax
call fcn.004549b0
mov edi, eax
cmp edi, ebx
pop ecx
pop ecx
je 0x40ae53
sub eax, esi
dec eax
mov dword [ebp + 0x70], eax
jne 0x40adcf
inc edi
cmp byte [edi], 0x7d
jne 0x40ae53
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.00413c75
add esp, 0x14
cmp al, bl
mov byte [ebp + 0x76], al
je 0x40ae04
cmp dword [ebp + 0x70], 1
jne 0x40ae1b
mov al, byte [esi]
mov byte [ebp + 0x6c], al
jmp 0x40ae1b
push esi
call fcn.00413a1d
cmp ax, bx
pop ecx
je 0x40ae1b
movzx eax, ax
mov byte [ebp + eax - 0x428], 1
mov byte [edi], 0x7d
mov esi, edi
cmp byte [ebp + 0x76], bl
je 0x40ae53
movzx edi, byte [ebp + 0x76]
lea edi, [ebp + edi - 0x228]
or byte [edi], 1
cmp byte [ebp + 0x6c], bl
je 0x40ae53
push dword [ebp + 0x6c]
call dword [sym.imp.USER32.dll_IsCharAlphaA]
test eax, eax
jne 0x40ae53
test byte [ebp + 0x77], 0x30
je 0x40ae50
or byte [edi], 2
jmp 0x40ae53
or byte [edi], 4
inc esi
cmp byte [esi], bl
jne 0x40ad5d
mov edi, dword [ebp + 0x64]
mov dword [0x464dd8], ebx
cmp byte [edi], bl
je 0x40afbf
cmp dword [0x464dd4], ebx
mov esi, 0x1000
jne 0x40ae94
push esi
call fcn.0043e5d0
cmp eax, ebx
pop ecx
mov dword [0x464dd4], eax
je 0x40aee1
mov dword [0x464ddc], 0x400
mov ecx, dword [ebp + 0x68]
push 4
call fcn.0041cfa7
inc eax
cmp eax, dword [0x464de4]
jbe 0x40aef9
cmp eax, esi
mov dword [0x464de4], eax
ja 0x40aeb6
mov dword [0x464de4], esi
mov eax, dword [0x464de0]
cmp eax, ebx
je 0x40aec6
push eax
call fcn.0043db8d
pop ecx
push dword [0x464de4]
call fcn.0043e5d0
cmp eax, ebx
pop ecx
mov dword [0x464de0], eax
jne 0x40aefe
mov dword [0x464de4], ebx
mov ecx, dword [ebp + 0x68]
push 0x4575d8
push ebx
push str.Out_of_memory.
call fcn.0044a1c5
jmp 0x40b2f3
mov eax, dword [0x464de0]
mov esi, dword [0x464dd8]
mov ecx, dword [0x464dd4]
mov dword [ecx + esi*4], eax
mov esi, dword [0x464de0]
cmp byte [edi], bl
mov edx, edi
jmp 0x40af9c
mov al, byte [edx]
cmp al, 0x2c
je 0x40af27
mov byte [esi], al
inc esi
jmp 0x40af96
inc edx
cmp byte [edx], 0x2c
jne 0x40af36
mov byte [esi], 0x2c
inc esi
mov dword [ebp + 0x70], edx
jmp 0x40af96
mov byte [esi], bl
mov ecx, dword [0x464dd4]
mov eax, dword [0x464dd8]
mov edi, dword [ecx + eax*4]
cmp byte [edi], bl
je 0x40af61
inc eax
mov dword [0x464dd8], eax
inc esi
mov dword [ecx + eax*4], esi
mov byte [esi], bl
mov ecx, dword [0x464dd4]
mov eax, dword [0x464dd8]
cmp byte [edx], bl
je 0x40af96
mov edx, dword [0x464ddc]
cmp eax, edx
jb 0x40af96
lea eax, [edx*4 + 0x1000]
push eax
push ecx
call fcn.0043fc91
cmp eax, ebx
pop ecx
pop ecx
je 0x40aee1
add dword [0x464ddc], 0x400
mov dword [0x464dd4], eax
mov edx, dword [ebp + 0x70]
inc edx
cmp byte [edx], bl
mov dword [ebp + 0x70], edx
jne 0x40af1c
mov byte [esi], bl
mov eax, dword [0x464dd4]
mov ecx, dword [0x464dd8]
mov eax, dword [eax + ecx*4]
cmp byte [eax], bl
je 0x40afbf
inc dword [0x464dd8]
cmp byte [0x4644cb], bl
je 0x40aff9
push 0xc
push dword [0x464380]
call dword [sym.imp.USER32.dll_KillTimer]
test eax, eax
je 0x40afdf
mov byte [0x4644cb], bl
push 0x10
call dword [sym.imp.USER32.dll_GetQueueStatus]
shr eax, 0x10
test al, 0x10
je 0x40aff9
push 1
push 0xffffffffffffffff
call fcn.0040be3b
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 [0x464df0], eax
mov eax, dword [ebp + 0x60]
mov esi, 0x3fff
mov byte [0x464de8], 1
mov byte [0x464de9], bl
mov byte [0x464dea], bl
mov byte [0x464deb], bl
mov byte [0x464dec], bl
mov byte [0x464ded], bl
mov dword [0x464df4], ebx
mov dword [0x464df8], esi
cmp byte [eax], bl
mov dword [ebp + 0x70], ebx
mov edi, eax
je 0x40b104
movsx eax, byte [edi]
push eax
call fcn.004418c7
cmp eax, 0x4c
pop ecx
jg 0x40b0c3
je 0x40b0a8
sub eax, 0x2a
je 0x40b09f
sub eax, 0x18
je 0x40b097
dec eax
je 0x40b08e
sub eax, 6
jne 0x40b0fb
mov byte [0x464dea], 1
jmp 0x40b0fb
mov byte [0x464de9], 1
jmp 0x40b0fb
mov byte [0x464de8], bl
jmp 0x40b0fb
mov byte [0x464ded], 1
jmp 0x40b0fb
lea eax, [edi + 1]
push eax
call fcn.0040198e
cmp eax, esi
pop ecx
mov dword [0x464df8], eax
jle 0x40b0fb
mov dword [0x464df8], esi
jmp 0x40b0fb
sub eax, 0x4d
je 0x40b0f4
sub eax, 7
je 0x40b0da
dec eax
dec eax
jne 0x40b0fb
mov byte [0x464dec], 1
jmp 0x40b0fb
lea eax, [edi + 1]
push eax
call fcn.00401220
fmul qword [0x45a1d0]
pop ecx
call fcn.0045540c
mov dword [ebp + 0x70], eax
jmp 0x40b0fb
mov byte [0x464deb], 1
inc edi
cmp byte [edi], bl
jne 0x40b062
lea eax, [ebp - 0x228]
mov dword [0x464dc4], eax
xor esi, esi
lea eax, [ebp - 0x428]
inc esi
mov dword [0x464dc8], eax
mov dword [0x464dc0], esi
mov byte [0x4644c4], 1
call fcn.0040f7aa
mov eax, dword [ebp + 0x70]
cmp eax, ebx
jle 0x40b164
cmp byte [0x4644cb], bl
jne 0x40b164
cmp eax, 0xa
jge 0x40b146
push 0xa
pop eax
push 0x40ac77
push eax
push 0xc
push dword [0x464380]
call dword [sym.imp.USER32.dll_SetTimer]
test eax, eax
setne al
mov byte [0x4644cb], al
push esi
push 0x8000012f
call fcn.0040be3b
mov eax, dword [0x464dc0]
cmp eax, esi
pop ecx
pop ecx
je 0x40b164
dec eax
dec eax
je 0x40b28d
dec eax
je 0x40b282
dec eax
je 0x40b1ad
dec eax
mov ecx, dword [0x464c98]
push esi
push ebx
push 0xffffffffffffffff
je 0x40b1a3
push str.NewInput
jmp 0x40b29c
push 0x45bcf8
jmp 0x40b29c
mov eax, dword [str.EndKey:]
mov dword [ebp - 0x28], eax
mov eax, dword [0x45bcf4]
mov dword [ebp - 0x24], eax
push 0x1e
xor eax, eax
cmp byte [0x464dd1], bl
pop ecx
lea edi, [ebp - 0x20]
rep stosd dword es:[edi], eax
je 0x40b247
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 0x40b1fe
push ebx
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
jmp 0x40b200
xor eax, eax
push eax
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
xor eax, eax
cmp dword [0x4644e8], ebx
setne al
push eax
lea eax, [ebp - 0x21]
push eax
lea eax, [ebp - 0x128]
push eax
xor eax, eax
mov al, byte [0x464dcc]
push ebx
push eax
call fcn.0041218a
pop ecx
movzx eax, ax
pop ecx
push eax
movzx eax, byte [0x464dcc]
push eax
call dword [sym.imp.USER32.dll_ToAsciiEx]
mov byte [ebp + eax - 0x21], bl
jmp 0x40b278
lea eax, [ebp - 0x21]
push 0x79
push eax
xor eax, eax
cmp byte [0x464dd0], bl
mov ax, word [0x464dce]
push eax
je 0x40b268
call fcn.0041230a
add esp, 0xc
jmp 0x40b278
xor eax, eax
mov al, byte [0x464dcc]
push eax
call fcn.00413f6e
add esp, 0x10
push esi
push ebx
push 0xffffffffffffffff
lea eax, [ebp - 0x28]
push eax
jmp 0x40b296
push esi
push ebx
push 0xffffffffffffffff
push str.Match
jmp 0x40b296
push esi
push ebx
push 0xffffffffffffffff
push str.Timeout
mov ecx, dword [0x464c98]
call fcn.0040152b
cmp byte [0x4644cb], bl
mov dword [0x464dc0], ebx
je 0x40b2e0
push 0xc
push dword [0x464380]
call dword [sym.imp.USER32.dll_KillTimer]
test eax, eax
je 0x40b2c7
mov byte [0x4644cb], bl
push 0x10
call dword [sym.imp.USER32.dll_GetQueueStatus]
shr eax, 0x10
test al, 0x10
je 0x40b2e0
push esi
push 0xffffffffffffffff
call fcn.0040be3b
pop ecx
pop ecx
mov ecx, dword [ebp + 0x58]
push esi
push ebx
push 0xffffffffffffffff
lea eax, [ebp - 0x4428]
push eax
call fcn.0040152b
pop edi
pop esi
pop ebx
add ebp, 0x78
leave
ret