Function at 0x40c230
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 0x40c25d
lea eax, [ebp + 0x12]
mov dword [esp + 0x18], eax
jmp 0x40c265
lea ecx, [esp + 0x1f]
mov dword [esp + 0x18], ecx
cmp byte [esp + 0x22c], 0
jne 0x40c2ad
mov edi, 0x4d9558
mov eax, esi
call fcn.004099e0
mov edi, eax
test edi, edi
je 0x40c2ad
mov ecx, edi
mov al, byte [ecx]
cmp al, 0x20
je 0x40c28d
cmp al, 9
jne 0x40c290
inc ecx
jmp 0x40c283
push 0x4d955c
push ecx
call fcn.004ba135
add esp, 8
test eax, eax
jne 0x40c2ad
test ebp, ebp
je 0x40c2aa
mov byte [ebp + 0x16], 1
mov byte [edi], 0
push 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
push 1
lea ecx, [esp + 0x1b]
mov eax, esi
call fcn.00412c00
mov bl, al
add esp, 8
test bl, bl
je 0x40c3e9
cmp byte [esp + 0x22c], 0
je 0x40c362
lea edx, [ebx + 0x64]
cmp dl, 3
ja 0x40c37e
cmp byte [esp + 0x234], 0
je 0x40c317
mov eax, dword [0x4f13d8]
push 1
push 0
push 0xffffffffffffffff
push 0x4d9560
push eax
call fcn.004a5c20
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x214
ret
push esi
push str.rm_eh__e_68n__71_6c7_c1h_5_3_a2_7b
call fcn.0049be50
add esp, 4
push eax
mov esi, 0x200
lea edi, [esp + 0x2c]
call fcn.004a2f10
mov ecx, dword [esp + 0x230]
add esp, 8
push ecx
mov edx, edi
push edx
mov ecx, 0x4f1cd8
call fcn.00473b40
test ebp, ebp
jne 0x40c43c
pop edi
pop esi
lea eax, [ebp + 4]
pop ebp
pop ebx
add esp, 0x214
ret
test ebp, ebp
je 0x40c37e
push 2
push 0x4d9594
push esi
call fcn.004babb4
add esp, 0xc
test eax, eax
sete al
mov byte [ebp + 0x17], al
lea ecx, [ebx - 1]
cmp cl, 5
ja 0x40c38b
cmp bl, 3
jne 0x40c393
lea edx, [ebx + 0x66]
cmp dl, 5
ja 0x40c397
mov al, 1
jmp 0x40c399
xor al, al
mov dl, byte [esp + 0x13]
test dl, 0x30
je 0x40c3ad
lea ecx, [ebx - 0x41]
cmp cl, 0x19
ja 0x40c3ad
and dl, 0xcf
test al, al
je 0x40c3b8
mov eax, dword [esp + 0x18]
mov byte [eax], 2
mov edi, dword [esp + 0x14]
cmp byte [esp + 0x22c], 0
je 0x40c4e0
test ebp, ebp
je 0x40c518
mov word [ebp + 0xa], di
pop edi
pop esi
mov byte [ebp + 0x11], bl
pop ebp
mov eax, 1
pop ebx
add esp, 0x214
ret
mov eax, esi
call fcn.00412b50
movzx edi, ax
test di, di
jne 0x40c4d7
push 1
lea ebx, [esp + 0x24]
mov eax, esi
call fcn.0044d050
movzx eax, ax
add esp, 4
mov dword [esp + 0x14], eax
test ax, ax
jne 0x40c4b2
cmp byte [esp + 0x234], al
je 0x40c449
mov edx, dword [0x4f13d8]
push 1
push 0
push 0xffffffffffffffff
push 0x4d9598
push edx
call fcn.004a5c20
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x214
ret
cmp byte [esi + 1], 0
jne 0x40c46f
cmp byte [0x4f22ec], 0
jne 0x40c46f
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 0x40c4a5
push esi
push str.rm_eh__e_68n_f29_6c6:p0_
call fcn.0049be50
add esp, 4
push eax
mov esi, 0x200
lea edi, [esp + 0x2c]
call fcn.004a2f10
add esp, 8
push 0x4d6959
mov eax, edi
push eax
mov ecx, 0x4f1cd8
call fcn.00473b40
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 [0x4f153c], eax
mov byte [ecx], 4
mov byte [ebx + 0x4f152c], al
jmp 0x40c3b8
mov dl, byte [esp + 0x13]
jmp 0x40c3bc
test ebp, ebp
je 0x40c518
mov al, dl
and al, 0xd5
xor ecx, ecx
mov byte [ebp + 0x10], bl
mov word [ebp + 8], di
test al, 0xc0
je 0x40c4fa
mov ecx, 8
test al, 0xc
je 0x40c501
or ecx, 1
test al, 0x30
je 0x40c508
or ecx, 4
test al, 3
je 0x40c50f
or ecx, 2
or dword [ebp], ecx
and dl, 0x2a
or byte [ebp + 0xe], dl
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x214
ret