Function at 0x40bc20
Capabilities:
Get keyboard layout

Disassembly:
sub esp, 0x214
push ebx
push ebp
mov ebp, dword [esp + 0x228]
push esi
push edi
mov esi, ecx
mov dword [esp + 0x14], 0
mov byte [esp + 0x13], 0
test ebp, ebp
je 0x40bc4d
lea eax, [ebp + 0x14]
mov dword [esp + 0x18], eax
jmp 0x40bc55
lea ecx, [esp + 0x1f]
mov dword [esp + 0x18], ecx
cmp byte [esp + 0x22c], 0
jne 0x40bc9d
mov edi, 0x49b100
mov eax, esi
call fcn.00409490
mov edi, eax
test edi, edi
je 0x40bc9d
mov ecx, edi
mov al, byte [ecx]
cmp al, 0x20
je 0x40bc7d
cmp al, 9
jne 0x40bc80
inc ecx
jmp 0x40bc73
push 0x499b28
push ecx
call fcn.00485381
add esp, 8
test eax, eax
jne 0x40bc9d
test ebp, ebp
je 0x40bc9a
mov byte [ebp + 0x18], 1
mov byte [edi], 0
push 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
lea edx, [esp + 0x17]
push 1
push edx
mov eax, esi
call fcn.00411e20
mov bl, al
add esp, 0xc
test bl, bl
je 0x40bdcc
cmp byte [esp + 0x22c], 0
je 0x40bd46
lea eax, [ebx + 0x64]
cmp al, 3
ja 0x40bd62
cmp byte [esp + 0x234], 0
je 0x40bd04
mov ecx, dword [0x4aba2c]
push 1
push 0
push 0xffffffffffffffff
push 0x49b104
push ecx
call fcn.00475240
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x214
ret
push esi
push str.__s__is_not_allowed_as_a_prefix_key.
mov esi, 0x200
lea edi, [esp + 0x2c]
call fcn.00472490
mov edx, dword [esp + 0x230]
add esp, 8
push edx
mov eax, edi
push eax
mov ecx, 0x4ad290
call fcn.0042d940
test ebp, ebp
jne 0x40be1f
pop edi
pop esi
lea eax, [ebp + 4]
pop ebp
pop ebx
add esp, 0x214
ret
test ebp, ebp
je 0x40bd62
push 2
push 0x49b130
push esi
call fcn.00485e00
add esp, 0xc
test eax, eax
sete cl
mov byte [ebp + 0x19], cl
lea edx, [ebx - 1]
cmp dl, 5
ja 0x40bd6f
cmp bl, 3
jne 0x40bd76
lea eax, [ebx + 0x66]
cmp al, 5
ja 0x40bd7a
mov al, 1
jmp 0x40bd7c
xor al, al
mov dl, byte [esp + 0x13]
test dl, 0x30
je 0x40bd90
lea ecx, [ebx - 0x41]
cmp cl, 0x19
ja 0x40bd90
and dl, 0xcf
test al, al
je 0x40bd9b
mov eax, dword [esp + 0x18]
mov byte [eax], 2
mov edi, dword [esp + 0x14]
cmp byte [esp + 0x22c], 0
je 0x40beba
test ebp, ebp
je 0x40bef2
mov word [ebp + 0xa], di
pop edi
pop esi
mov byte [ebp + 0x13], bl
pop ebp
mov eax, 1
pop ebx
add esp, 0x214
ret
mov eax, esi
call fcn.00411d70
movzx edi, ax
test di, di
jne 0x40beb1
push 1
lea ebx, [esp + 0x24]
mov eax, esi
call fcn.0044d6d0
movzx eax, ax
add esp, 4
mov dword [esp + 0x14], eax
test ax, ax
jne 0x40be8c
cmp byte [esp + 0x234], al
je 0x40be2c
mov edx, dword [0x4aba2c]
push 1
push 0
push 0xffffffffffffffff
push 0x49b134
push edx
call fcn.00475240
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x214
ret
cmp byte [esi + 1], 0
jne 0x40be52
cmp byte [0x4ad894], 0
jne 0x40be52
mov eax, ebp
neg eax
pop edi
sbb eax, eax
pop esi
and eax, 0xfffffffd
pop ebp
add eax, 3
pop ebx
add esp, 0x214
ret
test ebp, ebp
je 0x40be7f
push esi
push str.__s__is_not_a_valid_key_name.
mov esi, 0x200
lea edi, [esp + 0x2c]
call fcn.00472490
add esp, 8
push 0x499869
mov eax, edi
push eax
mov ecx, 0x4ad290
call fcn.0042d940
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x214
ret
mov ecx, dword [esp + 0x18]
mov ebx, dword [esp + 0x20]
mov dl, byte [esp + 0x13]
mov eax, 1
add dword [0x4acb24], eax
mov byte [ecx], 4
mov byte [ebx + 0x4acb14], al
jmp 0x40bd9b
mov dl, byte [esp + 0x13]
jmp 0x40bd9f
test ebp, ebp
je 0x40bef2
mov al, dl
and al, 0xd5
xor ecx, ecx
mov byte [ebp + 0x12], bl
mov word [ebp + 8], di
test al, 0xc0
je 0x40bed4
mov ecx, 8
test al, 0xc
je 0x40bedb
or ecx, 1
test al, 0x30
je 0x40bee2
or ecx, 4
test al, 3
je 0x40bee9
or ecx, 2
or dword [ebp + 0xc], ecx
and dl, 0x2a
or byte [ebp + 0x10], dl
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x214
ret