Function at 0x401ab0
Capabilities:
Get keyboard layout

Disassembly:
push ecx
mov al, byte [0x474de8]
push esi
push edi
mov edi, ecx
test al, 1
jne 0x401ad6
mov cl, al
push 0
or cl, 1
mov byte [0x474de8], cl
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov dword [0x474eec], eax
mov esi, dword [esp + 0x10]
xor ecx, ecx
mov byte [0x474ef0], 0
or eax, 0xffffffff
cmp esi, eax
je 0x401b02
inc ecx
dec eax
cmp eax, 0xffffffdf
jg 0x401ae6
mov al, byte [edi + 1]
test al, al
jne 0x401b21
push str._Joystick_
jmp 0x401f89
inc ecx
push ecx
push str.Button__d
push 0x474ef0
call fcn.00426959
add esp, 0xc
mov eax, 0x474ef0
pop edi
pop esi
pop ecx
ret 4
cmp esi, 0xc8
jne 0x401b40
push str.Cursor_Up
push 0x474ef0
call fcn.00426959
add esp, 8
jmp 0x401f02
cmp esi, 0xd0
jne 0x401b5f
push str.Cursor_Down
push 0x474ef0
call fcn.00426959
add esp, 8
jmp 0x401f02
cmp esi, 0xcb
jne 0x401b7e
push str.Cursor_Left
push 0x474ef0
call fcn.00426959
add esp, 8
jmp 0x401f02
cmp esi, 0xcd
jne 0x401b9d
push str.Cursor_Right
push 0x474ef0
call fcn.00426959
add esp, 8
jmp 0x401f02
cmp esi, 0x39
jne 0x401bb9
push str.Space
push 0x474ef0
call fcn.00426959
add esp, 8
jmp 0x401f02
cmp esi, 0x1c
jne 0x401bd5
push str.Return
push 0x474ef0
call fcn.00426959
add esp, 8
jmp 0x401f02
cmp esi, 0xe
jne 0x401bf1
push str.Backspace
push 0x474ef0
call fcn.00426959
add esp, 8
jmp 0x401f02
cmp esi, 0xf
jne 0x401c0d
push 0x4692c8
push 0x474ef0
call fcn.00426959
add esp, 8
jmp 0x401f02
cmp esi, 0xd2
jne 0x401c2c
push str.Insert
push 0x474ef0
call fcn.00426959
add esp, 8
jmp 0x401f02
cmp esi, 0xc7
jne 0x401c4b
push str.Home
push 0x474ef0
call fcn.00426959
add esp, 8
jmp 0x401f02
cmp esi, 0xc9
jne 0x401c6a
push str.PgUp
push 0x474ef0
call fcn.00426959
add esp, 8
jmp 0x401f02
cmp esi, 0xd3
jne 0x401c89
push str.Delete
push 0x474ef0
call fcn.00426959
add esp, 8
jmp 0x401f02
cmp esi, 0xcf
jne 0x401ca8
push 0x4692a4
push 0x474ef0
call fcn.00426959
add esp, 8
jmp 0x401f02
cmp esi, 0xd1
jne 0x401cc7
push str.PgDn
push 0x474ef0
call fcn.00426959
add esp, 8
jmp 0x401f02
cmp esi, 0x52
jne 0x401ce3
push str.NumPad_0
push 0x474ef0
call fcn.00426959
add esp, 8
jmp 0x401f02
cmp esi, 0x4f
jne 0x401cff
push str.NumPad_1
push 0x474ef0
call fcn.00426959
add esp, 8
jmp 0x401f02
cmp esi, 0x50
jne 0x401d1b
push str.NumPad_2
push 0x474ef0
call fcn.00426959
add esp, 8
jmp 0x401f02
cmp esi, 0x51
jne 0x401d37
push str.NumPad_3
push 0x474ef0
call fcn.00426959
add esp, 8
jmp 0x401f02
cmp esi, 0x4b
jne 0x401d53
push str.NumPad_4
push 0x474ef0
call fcn.00426959
add esp, 8
jmp 0x401f02
cmp esi, 0x4c
jne 0x401d6f
push str.NumPad_5
push 0x474ef0
call fcn.00426959
add esp, 8
jmp 0x401f02
cmp esi, 0x4d
jne 0x401d8b
push str.NumPad_6
push 0x474ef0
call fcn.00426959
add esp, 8
jmp 0x401f02
cmp esi, 0x47
jne 0x401da7
push str.NumPad_7
push 0x474ef0
call fcn.00426959
add esp, 8
jmp 0x401f02
cmp esi, 0x48
jne 0x401dc3
push str.NumPad_8
push 0x474ef0
call fcn.00426959
add esp, 8
jmp 0x401f02
cmp esi, 0x49
jne 0x401ddf
push str.NumPad_9
push 0x474ef0
call fcn.00426959
add esp, 8
jmp 0x401f02
cmp esi, 0x8d
jne 0x401dfe
push str.NumPad_
push 0x474ef0
call fcn.00426959
add esp, 8
jmp 0x401f02
cmp esi, 0xb3
jne 0x401e1d
push str.NumPad__
push 0x474ef0
call fcn.00426959
add esp, 8
jmp 0x401f02
cmp esi, 0x37
jne 0x401e39
push 0x469200
push 0x474ef0
call fcn.00426959
add esp, 8
jmp 0x401f02
cmp esi, 0x4a
jne 0x401e55
push 0x4691f4
push 0x474ef0
call fcn.00426959
add esp, 8
jmp 0x401f02
cmp esi, 0x4e
jne 0x401e71
push 0x4691e8
push 0x474ef0
call fcn.00426959
add esp, 8
jmp 0x401f02
cmp esi, 0x53
jne 0x401e8a
push str.NumPad_.
push 0x474ef0
call fcn.00426959
add esp, 8
jmp 0x401f02
cmp esi, 0xb5
jne 0x401ea6
push 0x4691d0
push 0x474ef0
call fcn.00426959
add esp, 8
jmp 0x401f02
cmp esi, 0x9c
jne 0x401ec2
push str.NumPad_Enter
push 0x474ef0
call fcn.00426959
add esp, 8
jmp 0x401f02
cmp esi, 0x3b
jl 0x401ee2
cmp esi, 0x44
jg 0x401ee2
lea eax, [esi - 0x3a]
push eax
push 0x4691bc
push 0x474ef0
call fcn.00426959
add esp, 0xc
cmp esi, 0x57
jl 0x401f02
cmp esi, 0x66
jg 0x401f02
lea ecx, [esi - 0x4c]
push ecx
push 0x4691bc
push 0x474ef0
call fcn.00426959
add esp, 0xc
mov al, byte [0x474ef0]
test al, al
jne 0x401f96
mov edx, dword [0x474eec]
mov ecx, 0x40
xor eax, eax
mov edi, 0x474dec
push edx
push 1
rep stosd dword es:[edi], eax
push esi
call dword [sym.imp.USER32.dll_MapVirtualKeyExA]
mov ecx, dword [0x474eec]
lea edx, [esp + 0xa]
push ecx
push 0
push edx
push 0x474dec
push esi
push eax
call dword [sym.imp.USER32.dll_ToAsciiEx]
cmp eax, 1
jne 0x401f84
mov al, byte [esp + 0xa]
cmp al, 0x61
jl 0x401f5b
cmp al, 0x7a
jg 0x401f5b
sub al, 0x20
cmp al, 0x20
jl 0x401f84
cmp al, 0x7f
jg 0x401f84
movsx eax, al
push eax
push 0x4691b8
push 0x474ef0
call fcn.00426959
add esp, 0xc
mov eax, 0x474ef0
pop edi
pop esi
pop ecx
ret 4
push str._Undefined_
push 0x474ef0
call fcn.00426959
add esp, 8
pop edi
mov eax, 0x474ef0
pop esi
pop ecx
ret 4