Function at 0x453220
Capabilities:
Get keyboard layout

Disassembly:
sub esp, 0x138
push ebx
mov ebx, ecx
push ebp
push esi
push edi
mov eax, dword [ebx]
cmp eax, 6
ja case.0x453237.1
jmp dword [eax*4 + 0x4534a4]
mov eax, str.Timeout
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x138
ret 0xc
mov eax, str.Match
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x138
ret 0xc
mov ebp, dword [esp + 0x14c]
mov edi, ebp
test ebp, ebp
jne 0x453281
mov eax, str.EndKey
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x138
ret 0xc
cmp byte [esp + 0x154], 0
mov edx, dword [esp + 0x150]
je 0x4532a6
mov dword [ebp], 0x4b646e45
lea edi, [ebp + 7]
mov dword [ebp + 4], 0x3a7965
sub edx, 7
mov al, byte [ebx + 0x4a]
mov dword [esp + 0x14], edx
test al, al
je 0x4532d4
cmp byte [esp + 0x154], 0
mov byte [edi], al
mov eax, str.EndKey
mov byte [edi + 1], 0
cmovne eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x138
ret 0xc
cmp byte [ebx + 0x4c], 0
je 0x45338c
push 0x100
lea eax, [esp + 0x4c]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov byte [esp + 0x58], 0x80
call dword [sym.imp.USER32.dll_GetForegroundWindow]
xor esi, esi
test eax, eax
je 0x453338
push esi
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov esi, eax
mov dword [esp + 0x18], 0x30
lea eax, [esp + 0x18]
push eax
push esi
call dword [sym.imp.USER32.dll_GetGUIThreadInfo]
test eax, eax
je 0x453338
mov eax, dword [esp + 0x24]
test eax, eax
je 0x453338
push 0
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov esi, eax
push esi
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov cl, byte [ebx + 0x46]
push eax
xor eax, eax
cmp dword [0x4d9948], eax
setne al
xor dl, dl
push eax
lea eax, [esp + 0x50]
push edi
push eax
call fcn.0041df10
movzx eax, ax
push eax
movzx eax, byte [ebx + 0x46]
push eax
call dword [sym.imp.USER32.dll_ToAsciiEx]
cmp byte [esp + 0x154], 0
mov byte [eax + edi], 0
mov eax, str.EndKey
cmovne eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x138
ret 0xc
xor cl, cl
mov byte [edi], 0
cmp byte [ebx + 0x4b], cl
je 0x4533cd
movzx ecx, word [ebx + 0x48]
xor eax, eax
nop dword [eax]
cmp word [eax*8 + 0x4d710c], cx
je 0x4533b2
inc eax
cmp eax, 0xd
jl 0x4533a0
jmp 0x4533d1
lea esi, [edx - 1]
push esi
push dword [eax*8 + 0x4d7108]
push edi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
mov byte [esi + edi], 0
add esp, 0xc
mov cl, byte [edi]
test cl, cl
jne 0x453403
cmp byte [esp + 0x154], 0
je 0x4533e2
xor cl, cl
cmp byte [ebx + 0x4b], cl
jne 0x453403
cmp byte [ebx + 0x4b], 0
mov edx, edi
mov esi, dword [esp + 0x14]
mov cl, byte [ebx + 0x46]
sete al
movzx eax, al
push eax
push esi
call fcn.0041d6c0
mov cl, byte [edi]
add esp, 8
jmp 0x453407
mov esi, dword [esp + 0x14]
test cl, cl
jne 0x453421
movzx eax, word [ebx + 0x48]
push eax
push str.sc_03X
push esi
push edi
call fcn.004abdd0
mov cl, byte [edi]
add esp, 0x10
lea eax, [ecx - 0x61]
cmp al, 0x19
ja 0x45343d
cmp byte [edi + 1], 0
jne 0x45343d
cmp byte [esp + 0x154], 0
je 0x45343d
sub cl, 0x20
mov byte [edi], cl
cmp byte [esp + 0x154], 0
mov eax, str.EndKey
cmovne eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x138
ret 0xc
mov eax, 0x4caeb4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x138
ret 0xc
mov eax, str.NewInput
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x138
ret 0xc
mov eax, str.Stopped
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x138
ret 0xc
pop edi
pop esi
pop ebp
mov eax, 0x4c3c29
pop ebx
add esp, 0x138
ret 0xc