Function at 0x40c8cc
Capabilities:
Get keyboard layout

Disassembly:
push ebp
mov eax, 0x44a0
lea ebp, [esp - 0x78]
call fcn.00458250
push ebx
xor ebx, ebx
cmp byte [0x468399], bl
mov dword [ebp + 0x64], ecx
je 0x40c8f1
xor eax, eax
inc eax
jmp 0x40cf1e
mov eax, dword [0x46a4f8]
cmp eax, ebx
mov dword [ebp + 0x5c], eax
jne 0x40c931
cmp dword [0x467ca0], 1
mov dword [0x467ca0], ebx
sete al
cmp al, bl
mov eax, 0x45a734
jne 0x40c91b
mov eax, 0x45bf4c
mov ecx, dword [0x467b78]
push 1
push ebx
push 0xffffffffffffffff
push eax
call fcn.0040184e
jmp 0x40cf1e
mov eax, dword [0x46a4ac]
push esi
push edi
mov dword [ebp + 0x58], eax
mov eax, dword [0x46a4b4]
mov dword [ebp + 0x68], eax
mov esi, dword [0x46a4b0]
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 [0x467ca0], ebx
stosb byte es:[edi], al
mov byte [ebp + 0x71], bl
jmp 0x40ca7a
mov byte [ebp + 0x70], bl
mov al, byte [esi]
movsx ecx, al
sub ecx, 0x7b
je 0x40c9c2
dec ecx
dec ecx
je 0x40ca79
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.00415b93
add esp, 0x14
mov byte [ebp + 0x76], al
jmp 0x40ca46
lea eax, [esi + 1]
push 0x7d
push eax
mov dword [ebp + 0x60], eax
call fcn.00457de0
mov edi, eax
cmp edi, ebx
pop ecx
pop ecx
je 0x40ca79
sub eax, esi
dec eax
mov dword [ebp + 0x6c], eax
jne 0x40c9f5
inc edi
cmp byte [edi], 0x7d
jne 0x40ca79
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.00415b93
add esp, 0x14
cmp al, bl
mov byte [ebp + 0x76], al
je 0x40ca2a
cmp dword [ebp + 0x6c], 1
jne 0x40ca41
mov al, byte [esi]
mov byte [ebp + 0x70], al
jmp 0x40ca41
push esi
call fcn.0041593b
cmp ax, bx
pop ecx
je 0x40ca41
movzx eax, ax
mov byte [ebp + eax - 0x428], 1
mov byte [edi], 0x7d
mov esi, edi
cmp byte [ebp + 0x76], bl
je 0x40ca79
movzx edi, byte [ebp + 0x76]
lea edi, [ebp + edi - 0x228]
or byte [edi], 1
cmp byte [ebp + 0x70], bl
je 0x40ca79
push dword [ebp + 0x70]
call dword [sym.imp.USER32.dll_IsCharAlphaA]
test eax, eax
jne 0x40ca79
test byte [ebp + 0x77], 0x30
je 0x40ca76
or byte [edi], 2
jmp 0x40ca79
or byte [edi], 4
inc esi
cmp byte [esi], bl
jne 0x40c983
mov eax, dword [ebp + 0x68]
mov dword [0x467cb8], ebx
cmp byte [eax], bl
je 0x40cbe8
cmp dword [0x467cb4], ebx
mov edi, 0x1000
jne 0x40caba
push edi
call fcn.0043f68a
cmp eax, ebx
pop ecx
mov dword [0x467cb4], eax
je 0x40cb07
mov dword [0x467cbc], 0x400
mov ecx, dword [ebp + 0x64]
push 3
call fcn.0040c597
inc eax
cmp eax, dword [0x467cc4]
jbe 0x40cb1f
cmp eax, edi
mov dword [0x467cc4], eax
ja 0x40cadc
mov dword [0x467cc4], edi
mov eax, dword [0x467cc0]
cmp eax, ebx
je 0x40caec
push eax
call fcn.0043ec47
pop ecx
push dword [0x467cc4]
call fcn.0043f68a
cmp eax, ebx
pop ecx
mov dword [0x467cc0], eax
jne 0x40cb24
mov dword [0x467cc4], ebx
mov ecx, dword [ebp + 0x64]
push 0x45a5d8
push ebx
push str.Out_of_memory.
call fcn.0044c1bc
jmp 0x40cf1c
mov eax, dword [0x467cc0]
mov edi, dword [0x467cb8]
mov ecx, dword [ebp + 0x68]
mov esi, dword [0x467cb4]
mov dword [esi + edi*4], eax
mov edi, dword [0x467cc0]
cmp byte [ecx], bl
mov edx, ecx
jmp 0x40cbc5
mov al, byte [edx]
cmp al, 0x2c
je 0x40cb50
mov byte [edi], al
inc edi
jmp 0x40cbbf
inc edx
cmp byte [edx], 0x2c
jne 0x40cb5f
mov byte [edi], 0x2c
inc edi
mov dword [ebp + 0x6c], edx
jmp 0x40cbbf
mov byte [edi], bl
mov ecx, dword [0x467cb4]
mov eax, dword [0x467cb8]
mov esi, dword [ecx + eax*4]
cmp byte [esi], bl
je 0x40cb8a
inc eax
mov dword [0x467cb8], eax
inc edi
mov dword [ecx + eax*4], edi
mov byte [edi], bl
mov ecx, dword [0x467cb4]
mov eax, dword [0x467cb8]
cmp byte [edx], bl
je 0x40cbbf
mov edx, dword [0x467cbc]
cmp eax, edx
jb 0x40cbbf
lea eax, [edx*4 + 0x1000]
push eax
push ecx
call fcn.00440d11
cmp eax, ebx
pop ecx
pop ecx
je 0x40cb07
add dword [0x467cbc], 0x400
mov dword [0x467cb4], eax
mov edx, dword [ebp + 0x6c]
inc edx
cmp byte [edx], bl
mov dword [ebp + 0x6c], edx
jne 0x40cb45
mov byte [edi], bl
mov eax, dword [0x467cb4]
mov ecx, dword [0x467cb8]
mov eax, dword [eax + ecx*4]
cmp byte [eax], bl
je 0x40cbe8
inc dword [0x467cb8]
cmp byte [0x4673a1], bl
je 0x40cc22
push 0xc
push dword [0x467254]
call dword [sym.imp.USER32.dll_KillTimer]
test eax, eax
je 0x40cc08
mov byte [0x4673a1], bl
push 0x10
call dword [sym.imp.USER32.dll_GetQueueStatus]
shr eax, 0x10
test al, 0x10
je 0x40cc22
push 1
push 0xffffffffffffffff
call fcn.0040de6e
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 [0x467cd0], eax
mov eax, dword [ebp + 0x58]
mov esi, 0x3fff
mov byte [0x467cc8], 1
mov byte [0x467cc9], bl
mov byte [0x467cca], bl
mov byte [0x467ccb], bl
mov byte [0x467ccc], bl
mov byte [0x467ccd], bl
mov dword [0x467cd4], ebx
mov dword [0x467cd8], esi
cmp byte [eax], bl
mov dword [ebp + 0x68], ebx
mov edi, eax
je 0x40cd2d
movsx eax, byte [edi]
push eax
call fcn.00442990
cmp eax, 0x4c
pop ecx
jg 0x40ccec
je 0x40ccd1
sub eax, 0x2a
je 0x40ccc8
sub eax, 0x18
je 0x40ccc0
dec eax
je 0x40ccb7
sub eax, 6
jne 0x40cd24
mov byte [0x467cca], 1
jmp 0x40cd24
mov byte [0x467cc9], 1
jmp 0x40cd24
mov byte [0x467cc8], bl
jmp 0x40cd24
mov byte [0x467ccd], 1
jmp 0x40cd24
lea eax, [edi + 1]
push eax
call fcn.00401378
cmp eax, esi
pop ecx
mov dword [0x467cd8], eax
jle 0x40cd24
mov dword [0x467cd8], esi
jmp 0x40cd24
sub eax, 0x4d
je 0x40cd1d
sub eax, 7
je 0x40cd03
dec eax
dec eax
jne 0x40cd24
mov byte [0x467ccc], 1
jmp 0x40cd24
lea eax, [edi + 1]
push eax
call fcn.00401225
fmul qword [0x45ce78]
pop ecx
call fcn.0045871c
mov dword [ebp + 0x68], eax
jmp 0x40cd24
mov byte [0x467ccb], 1
inc edi
cmp byte [edi], bl
jne 0x40cc8b
lea eax, [ebp - 0x228]
mov dword [0x467ca4], eax
xor esi, esi
lea eax, [ebp - 0x428]
inc esi
mov dword [0x467ca8], eax
mov dword [0x467ca0], esi
mov byte [0x46739c], 1
call fcn.004113f0
mov eax, dword [ebp + 0x68]
cmp eax, ebx
jle 0x40cd8d
cmp byte [0x4673a1], bl
jne 0x40cd8d
cmp eax, 0xa
jge 0x40cd6f
push 0xa
pop eax
push 0x40c89d
push eax
push 0xc
push dword [0x467254]
call dword [sym.imp.USER32.dll_SetTimer]
test eax, eax
setne al
mov byte [0x4673a1], al
push esi
push 0x8000012f
call fcn.0040de6e
mov eax, dword [0x467ca0]
cmp eax, esi
pop ecx
pop ecx
je 0x40cd8d
dec eax
dec eax
je 0x40ceb6
dec eax
je 0x40ceab
dec eax
je 0x40cdd6
dec eax
mov ecx, dword [0x467b78]
push esi
push ebx
push 0xffffffffffffffff
je 0x40cdcc
push str.NewInput
jmp 0x40cec5
push 0x45e64c
jmp 0x40cec5
mov eax, dword [str.EndKey:]
mov dword [ebp - 0x28], eax
mov eax, dword [0x45e648]
mov dword [ebp - 0x24], eax
push 0x1e
xor eax, eax
cmp byte [0x467cb1], bl
pop ecx
lea edi, [ebp - 0x20]
rep stosd dword es:[edi], eax
je 0x40ce70
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 0x40ce27
push ebx
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
jmp 0x40ce29
xor eax, eax
push eax
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
xor eax, eax
cmp dword [0x4673cc], ebx
setne al
push eax
lea eax, [ebp - 0x21]
push eax
lea eax, [ebp - 0x128]
push eax
xor eax, eax
mov al, byte [0x467cac]
push ebx
push eax
call fcn.00413e9c
pop ecx
movzx eax, ax
pop ecx
push eax
movzx eax, byte [0x467cac]
push eax
call dword [sym.imp.USER32.dll_ToAsciiEx]
mov byte [ebp + eax - 0x21], bl
jmp 0x40cea1
lea eax, [ebp - 0x21]
push 0x79
push eax
xor eax, eax
cmp byte [0x467cb0], bl
mov ax, word [0x467cae]
push eax
je 0x40ce91
call fcn.0041401c
add esp, 0xc
jmp 0x40cea1
xor eax, eax
mov al, byte [0x467cac]
push eax
call fcn.00415e8e
add esp, 0x10
push esi
push ebx
push 0xffffffffffffffff
lea eax, [ebp - 0x28]
push eax
jmp 0x40cebf
push esi
push ebx
push 0xffffffffffffffff
push str.Match
jmp 0x40cebf
push esi
push ebx
push 0xffffffffffffffff
push str.Timeout
mov ecx, dword [0x467b78]
call fcn.0040184e
cmp byte [0x4673a1], bl
mov dword [0x467ca0], ebx
je 0x40cf09
push 0xc
push dword [0x467254]
call dword [sym.imp.USER32.dll_KillTimer]
test eax, eax
je 0x40cef0
mov byte [0x4673a1], bl
push 0x10
call dword [sym.imp.USER32.dll_GetQueueStatus]
shr eax, 0x10
test al, 0x10
je 0x40cf09
push esi
push 0xffffffffffffffff
call fcn.0040de6e
pop ecx
pop ecx
mov ecx, dword [ebp + 0x5c]
push esi
push ebx
push 0xffffffffffffffff
lea eax, [ebp - 0x4428]
push eax
call fcn.0040184e
pop edi
pop esi
pop ebx
add ebp, 0x78
leave
ret