Function at 0x40e1e0
Capabilities:
Get keyboard layout

Disassembly:
sub esp, 0x210
push ebx
push ebp
push esi
mov esi, dword [esp + 0x224]
mov ebp, ecx
mov byte [esp + 0xf], 0
push edi
mov edi, edx
mov dword [esp + 0x14], edi
lea eax, [esi + 0x12]
test esi, esi
jne 0x40e209
lea eax, [esp + 0x1b]
cmp byte [esp + 0x224], 0
mov dword [esp + 0x1c], eax
jne 0x40e24f
mov edi, ebp
test ebp, ebp
je 0x40e2f6
mov dl, byte [ebp]
test dl, dl
je 0x40e24b
nop dword [eax + eax]
mov ecx, 0x4bb7f4
mov al, 0x20
cmp dl, al
je 0x40e2ba
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x40e237
mov dl, byte [edi + 1]
inc edi
test dl, dl
jne 0x40e230
mov edi, dword [esp + 0x14]
push 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
push ecx
push 1
lea edx, [esp + 0x1f]
mov ecx, ebp
call fcn.00415d30
mov bl, al
add esp, 0xc
test bl, bl
je 0x40e3a5
cmp byte [esp + 0x224], 0
je 0x40e33b
lea ecx, [ebx + 0x64]
cmp cl, 3
ja 0x40e358
cmp byte [esp + 0x22c], 0
je 0x40e2fd
mov ecx, dword [0x4ca738]
push 1
push 0
push 0xffffffffffffffff
push 0x4bb7f8
call fcn.004a2db0
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x210
ret
mov eax, edi
nop dword [eax]
mov cl, byte [eax]
cmp cl, 0x20
je 0x40e2cc
cmp cl, 9
jne 0x40e2cf
inc eax
jmp 0x40e2c0
push 0x4b7eec
push eax
call dword [sym.imp.api_ms_win_crt_multibyte_l1_1_0.dll__mbsicmp]
add esp, 8
test eax, eax
jne 0x40e24b
test esi, esi
je 0x40e2ee
mov byte [esi + 0x16], 1
mov byte [edi], 0
jmp 0x40e24b
mov edi, edx
jmp 0x40e24f
push ebp
push str.__s__is_not_allowed_as_a_prefix_key.
lea eax, [esp + 0x28]
push 0x200
push eax
call fcn.0049e760
add esp, 0x10
lea eax, [esp + 0x20]
mov ecx, 0x4cc848
push edi
push eax
call fcn.0043ee10
test esi, esi
jne 0x40e453
lea eax, [esi + 4]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x210
ret
test esi, esi
je 0x40e358
push 2
push 0x4bb824
push ebp
call dword [sym.imp.api_ms_win_crt_multibyte_l1_1_0.dll__mbsnbicmp]
add esp, 0xc
test eax, eax
sete al
mov byte [esi + 0x17], al
mov al, bl
dec al
cmp al, 5
ja 0x40e365
cmp bl, 3
jne 0x40e36d
mov al, bl
add al, 0x66
cmp al, 5
ja 0x40e371
mov dl, 1
jmp 0x40e373
xor dl, dl
mov cl, byte [esp + 0x13]
mov byte [esp + 0x13], cl
test cl, 0x30
je 0x40e38f
mov al, bl
sub al, 0x41
cmp al, 0x19
ja 0x40e38f
and cl, 0xcf
mov byte [esp + 0x13], cl
xor eax, eax
test dl, dl
je 0x40e480
mov edx, dword [esp + 0x1c]
mov byte [edx], 2
jmp 0x40e480
xor edx, edx
mov ecx, ebp
call fcn.00415c40
movzx eax, ax
test ax, ax
jne 0x40e478
push 1
lea edx, [esp + 0x18]
mov ecx, ebp
call fcn.00468e20
movzx eax, ax
add esp, 4
test ax, ax
jne 0x40e460
cmp byte [esp + 0x22c], al
je 0x40e402
mov ecx, dword [0x4ca738]
push 1
push 0
push 0xffffffffffffffff
push 0x4bb828
call fcn.004a2db0
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x210
ret
cmp byte [ebp + 1], 0
jne 0x40e423
cmp byte [0x4cce78], 0
jne 0x40e423
test esi, esi
jne 0x40e453
lea eax, [esi + 3]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x210
ret
test esi, esi
je 0x40e453
push ebp
push str.__s__is_not_a_valid_key_name.
lea eax, [esp + 0x28]
push 0x200
push eax
call fcn.0049e760
add esp, 0x10
lea eax, [esp + 0x20]
mov ecx, 0x4cc848
push 0x4b6ba9
push eax
call fcn.0043ee10
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x210
ret
mov edx, dword [esp + 0x1c]
mov ebx, dword [esp + 0x14]
inc dword [0x4cb204]
mov byte [edx], 4
mov byte [ebx + 0x4cb1ec], 1
mov cl, byte [esp + 0x13]
mov byte [esp + 0x13], cl
test esi, esi
je 0x40e4ed
cmp byte [esp + 0x224], 0
je 0x40e4a5
mov word [esi + 0xa], ax
mov eax, 1
mov byte [esi + 0x11], bl
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x210
ret
mov word [esi + 8], ax
mov byte [esi + 0x10], bl
mov bl, cl
and bl, 0xd5
mov al, bl
and al, 0xc0
movzx ecx, al
mov al, bl
neg ecx
sbb ecx, ecx
and ecx, 8
mov edx, ecx
or edx, 1
and al, 0xc
mov al, bl
cmove edx, ecx
mov ecx, edx
or ecx, 4
and al, 0x30
cmove ecx, edx
mov eax, ecx
or eax, 2
and bl, 3
cmove eax, ecx
or dword [esi], eax
mov al, byte [esp + 0x13]
and al, 0x2a
or byte [esi + 0xe], al
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x210
ret