Function at 0x40e120
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 0x40e149
lea eax, [esp + 0x1b]
cmp byte [esp + 0x224], 0
mov dword [esp + 0x1c], eax
jne 0x40e18f
mov edi, ebp
test ebp, ebp
je 0x40e235
mov dl, byte [ebp]
test dl, dl
je 0x40e18b
nop dword [eax + eax]
mov ecx, 0x4d9e7c
mov al, 0x20
cmp dl, al
je 0x40e1fa
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x40e177
mov dl, byte [edi + 1]
inc edi
test dl, dl
jne 0x40e170
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.00415c70
mov bl, al
add esp, 0xc
test bl, bl
je 0x40e2e3
cmp byte [esp + 0x224], 0
je 0x40e27a
lea ecx, [ebx + 0x64]
cmp cl, 3
ja 0x40e296
cmp byte [esp + 0x22c], 0
je 0x40e23c
mov ecx, dword [0x4eb720]
push 1
push 0
push 0xffffffffffffffff
push 0x4d9e80
call fcn.004a2730
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 0x40e20c
cmp cl, 9
jne 0x40e20f
inc eax
jmp 0x40e200
push 0x4d6574
push eax
call fcn.004b626e
add esp, 8
test eax, eax
jne 0x40e18b
test esi, esi
je 0x40e22d
mov byte [esi + 0x16], 1
mov byte [edi], 0
jmp 0x40e18b
mov edi, edx
jmp 0x40e18f
push ebp
push str.__s__is_not_allowed_as_a_prefix_key.
lea eax, [esp + 0x28]
push 0x200
push eax
call fcn.0049e100
add esp, 0x10
lea eax, [esp + 0x20]
mov ecx, 0x4ed830
push edi
push eax
call fcn.0043ed90
test esi, esi
jne 0x40e391
lea eax, [esi + 4]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x210
ret
test esi, esi
je 0x40e296
push 2
push 0x4d9eac
push ebp
call fcn.004b653e
add esp, 0xc
test eax, eax
sete al
mov byte [esi + 0x17], al
mov al, bl
dec al
cmp al, 5
ja 0x40e2a3
cmp bl, 3
jne 0x40e2ab
mov al, bl
add al, 0x66
cmp al, 5
ja 0x40e2af
mov dl, 1
jmp 0x40e2b1
xor dl, dl
mov cl, byte [esp + 0x13]
mov byte [esp + 0x13], cl
test cl, 0x30
je 0x40e2cd
mov al, bl
sub al, 0x41
cmp al, 0x19
ja 0x40e2cd
and cl, 0xcf
mov byte [esp + 0x13], cl
xor eax, eax
test dl, dl
je 0x40e3be
mov edx, dword [esp + 0x1c]
mov byte [edx], 2
jmp 0x40e3be
xor edx, edx
mov ecx, ebp
call fcn.00415b80
movzx eax, ax
test ax, ax
jne 0x40e3b6
push 1
lea edx, [esp + 0x18]
mov ecx, ebp
call fcn.00468b30
movzx eax, ax
add esp, 4
test ax, ax
jne 0x40e39e
cmp byte [esp + 0x22c], al
je 0x40e340
mov ecx, dword [0x4eb720]
push 1
push 0
push 0xffffffffffffffff
push 0x4d9eb0
call fcn.004a2730
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x210
ret
cmp byte [ebp + 1], 0
jne 0x40e361
cmp byte [0x4ede60], 0
jne 0x40e361
test esi, esi
jne 0x40e391
lea eax, [esi + 3]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x210
ret
test esi, esi
je 0x40e391
push ebp
push str.__s__is_not_a_valid_key_name.
lea eax, [esp + 0x28]
push 0x200
push eax
call fcn.0049e100
add esp, 0x10
lea eax, [esp + 0x20]
mov ecx, 0x4ed830
push 0x4d5231
push eax
call fcn.0043ed90
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 [0x4ec1ec]
mov byte [edx], 4
mov byte [ebx + 0x4ec1d4], 1
mov cl, byte [esp + 0x13]
mov byte [esp + 0x13], cl
test esi, esi
je 0x40e42b
cmp byte [esp + 0x224], 0
je 0x40e3e3
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