Function at 0x411a70
Capabilities:
Get keyboard layout

Disassembly:
sub esp, 0x10
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x24]
mov ebp, ecx
mov byte [esp + 0x16], dl
mov byte [esp + 0x24], 0
lea eax, [edi + 0x12]
test edi, edi
jne 0x411a91
lea eax, [esp + 0x17]
mov dword [esp + 0x18], eax
test dl, dl
jne 0x411b16
mov ebx, ebp
test ebp, ebp
je 0x411b16
movzx eax, word [ebp]
test ax, ax
je 0x411b16
mov esi, eax
nop word [eax + eax]
mov eax, 0x4d4b64
mov edx, 0x20
nop word [eax + eax]
cmp si, dx
je 0x411ae3
movzx ecx, word [eax + 2]
add eax, 2
mov edx, ecx
test cx, cx
jne 0x411ac0
movzx eax, word [ebx + 2]
add ebx, 2
mov esi, eax
test ax, ax
jne 0x411ab0
jmp 0x411b16
mov eax, ebx
movzx ecx, word [eax]
cmp ecx, 0x20
je 0x411af2
cmp ecx, 9
jne 0x411af7
add eax, 2
jmp 0x411ae5
push 0x4d3f74
push eax
call fcn.0049f76e
add esp, 8
test eax, eax
jne 0x411b16
test edi, edi
je 0x411b11
mov byte [edi + 0x16], 1
xor eax, eax
mov word [ebx], ax
push 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
push ecx
push 1
lea edx, [esp + 0x30]
mov ecx, ebp
call fcn.00419330
mov bl, al
add esp, 0xc
test bl, bl
je 0x411bd6
cmp byte [esp + 0x16], 0
je 0x411b6d
lea ecx, [ebx + 0x64]
cmp cl, 3
ja 0x411b89
push 0
mov edx, ebp
mov ecx, str.Unsupported_prefix_key.
call fcn.00430e80
add esp, 4
test edi, edi
jne 0x411c31
lea eax, [edi + 4]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
test edi, edi
je 0x411b89
push 2
push 0x4d4b9c
push ebp
call fcn.0049f8ef
add esp, 0xc
test eax, eax
sete al
mov byte [edi + 0x17], al
mov al, bl
dec al
cmp al, 5
ja 0x411b96
cmp bl, 3
jne 0x411b9e
mov al, bl
add al, 0x66
cmp al, 5
ja 0x411ba2
mov dl, 1
jmp 0x411ba4
xor dl, dl
mov cl, byte [esp + 0x24]
mov byte [esp + 0x24], cl
test cl, 0x30
je 0x411bc0
mov al, bl
sub al, 0x41
cmp al, 0x19
ja 0x411bc0
and cl, 0xcf
mov byte [esp + 0x24], cl
xor eax, eax
test dl, dl
je 0x411c5b
mov edx, dword [esp + 0x18]
mov byte [edx], 2
jmp 0x411c5b
xor edx, edx
mov ecx, ebp
call fcn.00419240
movzx eax, ax
test ax, ax
jne 0x411c53
push 1
lea edx, [esp + 0x20]
mov ecx, ebp
call fcn.00457160
movzx eax, ax
add esp, 4
test ax, ax
jne 0x411c3b
cmp word [ebp + 2], ax
jne 0x411c1c
cmp byte [0x4eb7dc], al
jne 0x411c1c
test edi, edi
jne 0x411c31
lea eax, [edi + 3]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
test edi, edi
je 0x411c31
push 0
mov edx, ebp
mov ecx, str.Invalid_key_name.
call fcn.00430e80
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
mov edx, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
inc dword [0x4ea224]
mov byte [edx], 4
mov byte [ebx + 0x4ea20c], 1
mov cl, byte [esp + 0x24]
mov byte [esp + 0x24], cl
test edi, edi
je 0x411cc0
cmp byte [esp + 0x16], 0
je 0x411c7a
mov word [edi + 0xa], ax
mov eax, 1
mov byte [edi + 0x11], bl
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
mov word [edi + 8], ax
mov byte [edi + 0x10], bl
mov bl, cl
and bl, 0xd5
mov al, bl
and al, 0xc0
movzx ecx, al
neg ecx
sbb ecx, ecx
and ecx, 8
mov edx, ecx
or edx, 1
test bl, 0xc
cmove edx, ecx
mov ecx, edx
or ecx, 4
test bl, 0x30
cmove ecx, edx
mov eax, ecx
or eax, 2
test bl, 3
cmove eax, ecx
or dword [edi], eax
mov al, byte [esp + 0x24]
and al, 0x2a
or byte [edi + 0xe], al
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x10
ret