Function at 0x40c450
Capabilities:
Get keyboard layout

Disassembly:
push ebp
mov eax, 0x449c
lea ebp, [esp - 0x74]
call fcn.0044ff40
push ebx
xor ebx, ebx
cmp byte [0x460211], bl
je 0x40c472
xor eax, eax
inc eax
jmp 0x40caa3
mov eax, dword [0x45d970]
cmp eax, ebx
mov dword [ebp + 0x5c], eax
jne 0x40c4b2
cmp dword [0x45fb1c], 1
mov dword [0x45fb1c], ebx
sete al
cmp al, bl
mov eax, 0x452954
jne 0x40c49c
mov eax, 0x454094
mov ecx, dword [0x45e2f0]
push 1
push ebx
push 0xffffffffffffffff
push eax
call fcn.0040161c
jmp 0x40caa3
mov eax, dword [0x45d924]
push esi
push edi
mov dword [ebp + 0x60], eax
mov eax, dword [0x45d92c]
mov dword [ebp + 0x64], eax
mov esi, dword [0x45d928]
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 [0x45fb1c], ebx
stosb byte es:[edi], al
mov byte [ebp + 0x6d], bl
jmp 0x40c5fc
mov byte [ebp + 0x6c], bl
mov al, byte [esi]
movsx ecx, al
sub ecx, 0x7b
je 0x40c542
dec ecx
dec ecx
je 0x40c5fb
push ebx
mov byte [ebp + 0x6c], al
mov byte [ebp + 0x73], bl
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
push 1
lea eax, [ebp + 0x73]
push 1
push eax
lea eax, [ebp + 0x6c]
call fcn.00415537
add esp, 0x10
mov byte [ebp + 0x72], al
jmp 0x40c5c8
lea eax, [esi + 1]
push 0x7d
push eax
mov dword [ebp + 0x58], eax
call dword [sym.imp.MSVCR71.dll_strchr]
mov edi, eax
cmp edi, ebx
pop ecx
pop ecx
je 0x40c5fb
sub eax, esi
dec eax
mov dword [ebp + 0x68], eax
jne 0x40c576
inc edi
cmp byte [edi], 0x7d
jne 0x40c5fb
mov dword [ebp + 0x68], 1
push ebx
mov byte [edi], bl
mov byte [ebp + 0x73], bl
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov esi, dword [ebp + 0x58]
push eax
push 1
lea eax, [ebp + 0x73]
push 1
push eax
mov eax, esi
call fcn.00415537
add esp, 0x10
cmp al, bl
mov byte [ebp + 0x72], al
je 0x40c5ac
cmp dword [ebp + 0x68], 1
jne 0x40c5c3
mov al, byte [esi]
mov byte [ebp + 0x6c], al
jmp 0x40c5c3
mov eax, esi
call fcn.004152e9
cmp ax, bx
je 0x40c5c3
movzx eax, ax
mov byte [ebp + eax - 0x428], 1
mov byte [edi], 0x7d
mov esi, edi
cmp byte [ebp + 0x72], bl
je 0x40c5fb
movzx edi, byte [ebp + 0x72]
lea edi, [ebp + edi - 0x228]
or byte [edi], 1
cmp byte [ebp + 0x6c], bl
je 0x40c5fb
push dword [ebp + 0x6c]
call dword [sym.imp.USER32.dll_IsCharAlphaA]
test eax, eax
jne 0x40c5fb
test byte [ebp + 0x73], 0x30
je 0x40c5f8
or byte [edi], 2
jmp 0x40c5fb
or byte [edi], 4
inc esi
cmp byte [esi], bl
jne 0x40c504
mov eax, dword [ebp + 0x64]
mov dword [0x45fb34], ebx
cmp byte [eax], bl
je 0x40c76d
cmp dword [0x45fb30], ebx
mov edi, dword [sym.imp.MSVCR71.dll_malloc]
mov esi, 0x1000
jne 0x40c63f
push esi
call edi
cmp eax, ebx
pop ecx
mov dword [0x45fb30], eax
je 0x40c68b
mov dword [0x45fb38], 0x400
mov ecx, dword [ebp + 0x7c]
push 3
pop eax
call fcn.0040c186
inc eax
cmp eax, dword [0x45fb40]
jbe 0x40c6a3
cmp eax, esi
mov dword [0x45fb40], eax
ja 0x40c662
mov dword [0x45fb40], esi
mov eax, dword [0x45fb3c]
cmp eax, ebx
je 0x40c673
push eax
call dword [sym.imp.MSVCR71.dll_free]
pop ecx
push dword [0x45fb40]
call edi
cmp eax, ebx
pop ecx
mov dword [0x45fb3c], eax
jne 0x40c6a8
mov dword [0x45fb40], ebx
mov ecx, dword [ebp + 0x7c]
push 0x45282f
push ebx
push str.Out_of_memory.
call fcn.00444eab
jmp 0x40caa1
mov eax, dword [0x45fb3c]
mov esi, dword [0x45fb30]
mov ecx, dword [ebp + 0x64]
mov edi, dword [0x45fb34]
mov dword [esi + edi*4], eax
mov esi, dword [0x45fb3c]
cmp byte [ecx], bl
mov edx, ecx
jmp 0x40c74a
mov al, byte [edx]
cmp al, 0x2c
je 0x40c6d4
mov byte [esi], al
inc esi
jmp 0x40c744
inc edx
cmp byte [edx], 0x2c
jne 0x40c6e3
mov byte [esi], 0x2c
inc esi
mov dword [ebp + 0x68], edx
jmp 0x40c744
mov byte [esi], bl
mov ecx, dword [0x45fb30]
mov eax, dword [0x45fb34]
mov edi, dword [ecx + eax*4]
cmp byte [edi], bl
je 0x40c70e
inc eax
mov dword [0x45fb34], eax
inc esi
mov dword [ecx + eax*4], esi
mov byte [esi], bl
mov ecx, dword [0x45fb30]
mov eax, dword [0x45fb34]
cmp byte [edx], bl
je 0x40c744
mov edx, dword [0x45fb38]
cmp eax, edx
jb 0x40c744
lea eax, [edx*4 + 0x1000]
push eax
push ecx
call dword [sym.imp.MSVCR71.dll_realloc]
cmp eax, ebx
pop ecx
pop ecx
je 0x40c68b
add dword [0x45fb38], 0x400
mov dword [0x45fb30], eax
mov edx, dword [ebp + 0x68]
inc edx
cmp byte [edx], bl
mov dword [ebp + 0x68], edx
jne 0x40c6c9
mov byte [esi], bl
mov eax, dword [0x45fb30]
mov ecx, dword [0x45fb34]
mov eax, dword [eax + ecx*4]
cmp byte [eax], bl
je 0x40c76d
inc dword [0x45fb34]
cmp byte [0x45db19], bl
je 0x40c7a7
push 0xc
push dword [0x45d9cc]
call dword [sym.imp.USER32.dll_KillTimer]
test eax, eax
je 0x40c78d
mov byte [0x45db19], bl
push 0x10
call dword [sym.imp.USER32.dll_GetQueueStatus]
shr eax, 0x10
test al, 0x10
je 0x40c7a7
push 1
push 0xffffffffffffffff
call fcn.0040d9dd
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
mov edi, dword [ebp + 0x60]
lea eax, [ebp - 0x4428]
mov esi, 0x3fff
mov byte [0x45fb44], 1
mov byte [0x45fb45], bl
mov byte [0x45fb46], bl
mov byte [0x45fb47], bl
mov byte [0x45fb48], bl
mov byte [0x45fb49], bl
mov dword [ebp + 0x7c], ebx
mov dword [0x45fb4c], eax
mov dword [0x45fb50], ebx
mov dword [0x45fb54], esi
jmp 0x40c8a7
movsx eax, byte [edi]
push eax
call dword [sym.imp.MSVCR71.dll_toupper]
cmp eax, 0x4c
pop ecx
jg 0x40c86e
je 0x40c852
sub eax, 0x2a
je 0x40c849
sub eax, 0x18
je 0x40c841
dec eax
je 0x40c838
sub eax, 6
jne 0x40c8a6
mov byte [0x45fb46], 1
jmp 0x40c8a6
mov byte [0x45fb45], 1
jmp 0x40c8a6
mov byte [0x45fb44], bl
jmp 0x40c8a6
mov byte [0x45fb49], 1
jmp 0x40c8a6
lea eax, [edi + 1]
push eax
call dword [sym.imp.MSVCR71.dll_atoi]
cmp eax, esi
pop ecx
mov dword [0x45fb54], eax
jle 0x40c8a6
mov dword [0x45fb54], esi
jmp 0x40c8a6
sub eax, 0x4d
je 0x40c89f
sub eax, 7
je 0x40c885
dec eax
dec eax
jne 0x40c8a6
mov byte [0x45fb48], 1
jmp 0x40c8a6
lea eax, [edi + 1]
push eax
call fcn.0040105e
fmul qword [0x458a68]
pop ecx
call fcn.0044ffe0
mov dword [ebp + 0x7c], eax
jmp 0x40c8a6
mov byte [0x45fb47], 1
inc edi
cmp byte [edi], bl
jne 0x40c80b
lea eax, [ebp - 0x228]
mov dword [0x45fb20], eax
xor esi, esi
lea eax, [ebp - 0x428]
inc esi
mov dword [0x45fb24], eax
mov dword [0x45fb1c], esi
mov byte [0x45db14], 1
call fcn.00410eed
mov eax, dword [ebp + 0x7c]
cmp eax, ebx
jle 0x40c90f
cmp byte [0x45db19], bl
jne 0x40c90f
cmp eax, 0xa
jge 0x40c8f1
push 0xa
pop eax
push 0x40c421
push eax
push 0xc
push dword [0x45d9cc]
call dword [sym.imp.USER32.dll_SetTimer]
test eax, eax
setne al
mov byte [0x45db19], al
push esi
push 0x8000012f
call fcn.0040d9dd
mov eax, dword [0x45fb1c]
cmp eax, esi
pop ecx
pop ecx
je 0x40c90f
dec eax
dec eax
je 0x40ca3b
dec eax
je 0x40ca30
dec eax
je 0x40c958
dec eax
mov ecx, dword [0x45e2f0]
push esi
push ebx
push 0xffffffffffffffff
je 0x40c94e
push str.NewInput
jmp 0x40ca4a
push 0x457124
jmp 0x40ca4a
mov eax, dword [str.EndKey:]
mov dword [ebp - 0x28], eax
mov eax, dword [0x45712c]
mov dword [ebp - 0x24], eax
push 0x1e
xor eax, eax
cmp byte [0x45fb2d], bl
pop ecx
lea edi, [ebp - 0x20]
rep stosd dword es:[edi], eax
je 0x40c9f2
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 0x40c9a9
push ebx
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
jmp 0x40c9ab
xor eax, eax
push eax
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
xor eax, eax
cmp dword [0x45db44], ebx
setne al
push eax
lea eax, [ebp - 0x21]
push eax
lea eax, [ebp - 0x128]
push eax
xor eax, eax
mov al, byte [0x45fb28]
push eax
xor al, al
call fcn.00413875
movzx eax, ax
pop ecx
push eax
movzx eax, byte [0x45fb28]
push eax
call dword [sym.imp.USER32.dll_ToAsciiEx]
mov byte [ebp + eax - 0x21], bl
jmp 0x40ca26
cmp byte [0x45fb2c], bl
push 0x79
je 0x40ca0d
mov edx, dword [0x45fb2a]
pop eax
lea ecx, [ebp - 0x21]
call fcn.004139f0
jmp 0x40ca26
mov dl, byte [0x45fb28]
xor eax, eax
mov ax, word [0x45fb2a]
push eax
lea eax, [ebp - 0x21]
call fcn.0041580a
pop ecx
pop ecx
push esi
push ebx
push 0xffffffffffffffff
lea eax, [ebp - 0x28]
push eax
jmp 0x40ca44
push esi
push ebx
push 0xffffffffffffffff
push str.Match
jmp 0x40ca44
push esi
push ebx
push 0xffffffffffffffff
push str.Timeout
mov ecx, dword [0x45e2f0]
call fcn.0040161c
cmp byte [0x45db19], bl
mov dword [0x45fb1c], ebx
je 0x40ca8e
push 0xc
push dword [0x45d9cc]
call dword [sym.imp.USER32.dll_KillTimer]
test eax, eax
je 0x40ca75
mov byte [0x45db19], bl
push 0x10
call dword [sym.imp.USER32.dll_GetQueueStatus]
shr eax, 0x10
test al, 0x10
je 0x40ca8e
push esi
push 0xffffffffffffffff
call fcn.0040d9dd
pop ecx
pop ecx
mov ecx, dword [ebp + 0x5c]
push esi
push ebx
push 0xffffffffffffffff
lea eax, [ebp - 0x4428]
push eax
call fcn.0040161c
pop edi
pop esi
pop ebx
add ebp, 0x74
leave
ret 4