Function at 0x40c6ff
Capabilities:
Get keyboard layout

Disassembly:
push ebp
mov eax, 0x44a0
lea ebp, [esp - 0x78]
call fcn.00457ac0
push ebx
xor ebx, ebx
cmp byte [0x467399], bl
mov dword [ebp + 0x64], ecx
je 0x40c724
xor eax, eax
inc eax
jmp 0x40cd51
mov eax, dword [0x4694f8]
cmp eax, ebx
mov dword [ebp + 0x5c], eax
jne 0x40c764
cmp dword [0x466ca0], 1
mov dword [0x466ca0], ebx
sete al
cmp al, bl
mov eax, 0x459724
jne 0x40c74e
mov eax, 0x45af3c
mov ecx, dword [0x466b78]
push 1
push ebx
push 0xffffffffffffffff
push eax
call fcn.0040187e
jmp 0x40cd51
mov eax, dword [0x4694ac]
push esi
push edi
mov dword [ebp + 0x58], eax
mov eax, dword [0x4694b4]
mov dword [ebp + 0x68], eax
mov esi, dword [0x4694b0]
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 [0x466ca0], ebx
stosb byte es:[edi], al
mov byte [ebp + 0x71], bl
jmp 0x40c8ad
mov byte [ebp + 0x70], bl
mov al, byte [esi]
movsx ecx, al
sub ecx, 0x7b
je 0x40c7f5
dec ecx
dec ecx
je 0x40c8ac
push ebx
mov byte [ebp + 0x70], 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 + 0x70]
push eax
call fcn.00415869
add esp, 0x14
mov byte [ebp + 0x76], al
jmp 0x40c879
lea eax, [esi + 1]
push 0x7d
push eax
mov dword [ebp + 0x60], eax
call fcn.00457650
mov edi, eax
cmp edi, ebx
pop ecx
pop ecx
je 0x40c8ac
sub eax, esi
dec eax
mov dword [ebp + 0x6c], eax
jne 0x40c828
inc edi
cmp byte [edi], 0x7d
jne 0x40c8ac
mov dword [ebp + 0x6c], 1
mov byte [edi], bl
push ebx
mov byte [ebp + 0x77], bl
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov esi, dword [ebp + 0x60]
push eax
push 1
push 1
lea eax, [ebp + 0x77]
push eax
push esi
call fcn.00415869
add esp, 0x14
cmp al, bl
mov byte [ebp + 0x76], al
je 0x40c85d
cmp dword [ebp + 0x6c], 1
jne 0x40c874
mov al, byte [esi]
mov byte [ebp + 0x70], al
jmp 0x40c874
push esi
call fcn.00415611
cmp ax, bx
pop ecx
je 0x40c874
movzx eax, ax
mov byte [ebp + eax - 0x428], 1
mov byte [edi], 0x7d
mov esi, edi
cmp byte [ebp + 0x76], bl
je 0x40c8ac
movzx edi, byte [ebp + 0x76]
lea edi, [ebp + edi - 0x228]
or byte [edi], 1
cmp byte [ebp + 0x70], bl
je 0x40c8ac
push dword [ebp + 0x70]
call dword [sym.imp.USER32.dll_IsCharAlphaA]
test eax, eax
jne 0x40c8ac
test byte [ebp + 0x77], 0x30
je 0x40c8a9
or byte [edi], 2
jmp 0x40c8ac
or byte [edi], 4
inc esi
cmp byte [esi], bl
jne 0x40c7b6
mov eax, dword [ebp + 0x68]
mov dword [0x466cb8], ebx
cmp byte [eax], bl
je 0x40ca1b
cmp dword [0x466cb4], ebx
mov edi, 0x1000
jne 0x40c8ed
push edi
call fcn.0043f0e8
cmp eax, ebx
pop ecx
mov dword [0x466cb4], eax
je 0x40c93a
mov dword [0x466cbc], 0x400
mov ecx, dword [ebp + 0x64]
push 3
call fcn.0040c3ca
inc eax
cmp eax, dword [0x466cc4]
jbe 0x40c952
cmp eax, edi
mov dword [0x466cc4], eax
ja 0x40c90f
mov dword [0x466cc4], edi
mov eax, dword [0x466cc0]
cmp eax, ebx
je 0x40c91f
push eax
call fcn.0043e6a5
pop ecx
push dword [0x466cc4]
call fcn.0043f0e8
cmp eax, ebx
pop ecx
mov dword [0x466cc0], eax
jne 0x40c957
mov dword [0x466cc4], ebx
mov ecx, dword [ebp + 0x64]
push 0x4595d8
push ebx
push str.Out_of_memory.
call fcn.0044ba99
jmp 0x40cd4f
mov eax, dword [0x466cc0]
mov edi, dword [0x466cb8]
mov ecx, dword [ebp + 0x68]
mov esi, dword [0x466cb4]
mov dword [esi + edi*4], eax
mov edi, dword [0x466cc0]
cmp byte [ecx], bl
mov edx, ecx
jmp 0x40c9f8
mov al, byte [edx]
cmp al, 0x2c
je 0x40c983
mov byte [edi], al
inc edi
jmp 0x40c9f2
inc edx
cmp byte [edx], 0x2c
jne 0x40c992
mov byte [edi], 0x2c
inc edi
mov dword [ebp + 0x6c], edx
jmp 0x40c9f2
mov byte [edi], bl
mov ecx, dword [0x466cb4]
mov eax, dword [0x466cb8]
mov esi, dword [ecx + eax*4]
cmp byte [esi], bl
je 0x40c9bd
inc eax
mov dword [0x466cb8], eax
inc edi
mov dword [ecx + eax*4], edi
mov byte [edi], bl
mov ecx, dword [0x466cb4]
mov eax, dword [0x466cb8]
cmp byte [edx], bl
je 0x40c9f2
mov edx, dword [0x466cbc]
cmp eax, edx
jb 0x40c9f2
lea eax, [edx*4 + 0x1000]
push eax
push ecx
call fcn.00440771
cmp eax, ebx
pop ecx
pop ecx
je 0x40c93a
add dword [0x466cbc], 0x400
mov dword [0x466cb4], eax
mov edx, dword [ebp + 0x6c]
inc edx
cmp byte [edx], bl
mov dword [ebp + 0x6c], edx
jne 0x40c978
mov byte [edi], bl
mov eax, dword [0x466cb4]
mov ecx, dword [0x466cb8]
mov eax, dword [eax + ecx*4]
cmp byte [eax], bl
je 0x40ca1b
inc dword [0x466cb8]
cmp byte [0x4663a1], bl
je 0x40ca55
push 0xc
push dword [0x466254]
call dword [sym.imp.USER32.dll_KillTimer]
test eax, eax
je 0x40ca3b
mov byte [0x4663a1], bl
push 0x10
call dword [sym.imp.USER32.dll_GetQueueStatus]
shr eax, 0x10
test al, 0x10
je 0x40ca55
push 1
push 0xffffffffffffffff
call fcn.0040dca7
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 [0x466cd0], eax
mov eax, dword [ebp + 0x58]
mov esi, 0x3fff
mov byte [0x466cc8], 1
mov byte [0x466cc9], bl
mov byte [0x466cca], bl
mov byte [0x466ccb], bl
mov byte [0x466ccc], bl
mov byte [0x466ccd], bl
mov dword [0x466cd4], ebx
mov dword [0x466cd8], esi
cmp byte [eax], bl
mov dword [ebp + 0x68], ebx
mov edi, eax
je 0x40cb60
movsx eax, byte [edi]
push eax
call fcn.0044234f
cmp eax, 0x4c
pop ecx
jg 0x40cb1f
je 0x40cb04
sub eax, 0x2a
je 0x40cafb
sub eax, 0x18
je 0x40caf3
dec eax
je 0x40caea
sub eax, 6
jne 0x40cb57
mov byte [0x466cca], 1
jmp 0x40cb57
mov byte [0x466cc9], 1
jmp 0x40cb57
mov byte [0x466cc8], bl
jmp 0x40cb57
mov byte [0x466ccd], 1
jmp 0x40cb57
lea eax, [edi + 1]
push eax
call fcn.00401378
cmp eax, esi
pop ecx
mov dword [0x466cd8], eax
jle 0x40cb57
mov dword [0x466cd8], esi
jmp 0x40cb57
sub eax, 0x4d
je 0x40cb50
sub eax, 7
je 0x40cb36
dec eax
dec eax
jne 0x40cb57
mov byte [0x466ccc], 1
jmp 0x40cb57
lea eax, [edi + 1]
push eax
call fcn.00401225
fmul qword [0x45be58]
pop ecx
call fcn.00457f8c
mov dword [ebp + 0x68], eax
jmp 0x40cb57
mov byte [0x466ccb], 1
inc edi
cmp byte [edi], bl
jne 0x40cabe
lea eax, [ebp - 0x228]
mov dword [0x466ca4], eax
xor esi, esi
lea eax, [ebp - 0x428]
inc esi
mov dword [0x466ca8], eax
mov dword [0x466ca0], esi
mov byte [0x46639c], 1
call fcn.0041124d
mov eax, dword [ebp + 0x68]
cmp eax, ebx
jle 0x40cbc0
cmp byte [0x4663a1], bl
jne 0x40cbc0
cmp eax, 0xa
jge 0x40cba2
push 0xa
pop eax
push 0x40c6d0
push eax
push 0xc
push dword [0x466254]
call dword [sym.imp.USER32.dll_SetTimer]
test eax, eax
setne al
mov byte [0x4663a1], al
push esi
push 0x8000012f
call fcn.0040dca7
mov eax, dword [0x466ca0]
cmp eax, esi
pop ecx
pop ecx
je 0x40cbc0
dec eax
dec eax
je 0x40cce9
dec eax
je 0x40ccde
dec eax
je 0x40cc09
dec eax
mov ecx, dword [0x466b78]
push esi
push ebx
push 0xffffffffffffffff
je 0x40cbff
push str.NewInput
jmp 0x40ccf8
push 0x45d62c
jmp 0x40ccf8
mov eax, dword [str.EndKey:]
mov dword [ebp - 0x28], eax
mov eax, dword [0x45d628]
mov dword [ebp - 0x24], eax
push 0x1e
xor eax, eax
cmp byte [0x466cb1], bl
pop ecx
lea edi, [ebp - 0x20]
rep stosd dword es:[edi], eax
je 0x40cca3
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 0x40cc5a
push ebx
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
jmp 0x40cc5c
xor eax, eax
push eax
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
xor eax, eax
cmp dword [0x4663cc], ebx
setne al
push eax
lea eax, [ebp - 0x21]
push eax
lea eax, [ebp - 0x128]
push eax
xor eax, eax
mov al, byte [0x466cac]
push ebx
push eax
call fcn.00413cfd
pop ecx
movzx eax, ax
pop ecx
push eax
movzx eax, byte [0x466cac]
push eax
call dword [sym.imp.USER32.dll_ToAsciiEx]
mov byte [ebp + eax - 0x21], bl
jmp 0x40ccd4
lea eax, [ebp - 0x21]
push 0x79
push eax
xor eax, eax
cmp byte [0x466cb0], bl
mov ax, word [0x466cae]
push eax
je 0x40ccc4
call fcn.00413e7d
add esp, 0xc
jmp 0x40ccd4
xor eax, eax
mov al, byte [0x466cac]
push eax
call fcn.00415b64
add esp, 0x10
push esi
push ebx
push 0xffffffffffffffff
lea eax, [ebp - 0x28]
push eax
jmp 0x40ccf2
push esi
push ebx
push 0xffffffffffffffff
push str.Match
jmp 0x40ccf2
push esi
push ebx
push 0xffffffffffffffff
push str.Timeout
mov ecx, dword [0x466b78]
call fcn.0040187e
cmp byte [0x4663a1], bl
mov dword [0x466ca0], ebx
je 0x40cd3c
push 0xc
push dword [0x466254]
call dword [sym.imp.USER32.dll_KillTimer]
test eax, eax
je 0x40cd23
mov byte [0x4663a1], bl
push 0x10
call dword [sym.imp.USER32.dll_GetQueueStatus]
shr eax, 0x10
test al, 0x10
je 0x40cd3c
push esi
push 0xffffffffffffffff
call fcn.0040dca7
pop ecx
pop ecx
mov ecx, dword [ebp + 0x5c]
push esi
push ebx
push 0xffffffffffffffff
lea eax, [ebp - 0x4428]
push eax
call fcn.0040187e
pop edi
pop esi
pop ebx
add ebp, 0x78
leave
ret