Function at 0x40b490
Capabilities:
Get keyboard layout

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
sub esp, 0x434
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, ecx
mov dword [esp + 0x30], 0
mov byte [esp + 0x2f], 0
test esi, esi
je 0x40b4be
lea eax, [esi + 0x14]
mov dword [esp + 0x34], eax
jmp 0x40b4c6
lea ecx, [esp + 0x3b]
mov dword [esp + 0x34], ecx
cmp byte [ebp + 8], 0
jne 0x40b51b
mov ebx, 0x49eed0
mov eax, edi
call fcn.00408fc0
mov esi, eax
test esi, esi
je 0x40b518
mov ecx, esi
movzx eax, word [ecx]
cmp eax, 0x20
je 0x40b4ed
cmp eax, 9
jne 0x40b4f2
add ecx, 2
jmp 0x40b4e0
push 0x49c518
push ecx
call fcn.00481dd9
add esp, 8
test eax, eax
jne 0x40b518
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x40b50f
mov byte [eax + 0x18], 1
xor edx, edx
mov word [esi], dx
mov esi, eax
jmp 0x40b51b
mov esi, dword [ebp + 0xc]
push 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
movzx edx, word [edi]
test dx, dx
jne 0x40b532
xor bl, bl
jmp 0x40b5f7
cmp word [edi + 2], 0
jne 0x40b58f
mov ecx, eax
lea esi, [esp + 0x2f]
mov eax, edx
call fcn.004117b0
mov bl, al
test bl, bl
je 0x40b5f4
cmp byte [ebp + 8], 0
je 0x40b6d1
lea edx, [ebx + 0x64]
cmp dl, 3
ja 0x40b6f0
cmp byte [ebp + 0x10], 0
je 0x40b662
mov ecx, dword [0x4c1688]
push 1
push 0
push 0xffffffffffffffff
push 0x49eed8
call fcn.004698a0
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, edx
test esi, 0xffffff80
jne 0x40b5ab
push 2
push esi
call fcn.00482fce
add esp, 8
test eax, eax
je 0x40b5ab
and esi, 0xffffffdf
cmp si, 0x56
jne 0x40b5d5
mov ax, word [edi + 2]
call fcn.00408f90
cmp ax, 0x4b
jne 0x40b5d5
push 0x10
lea eax, [edi + 4]
push 0
push eax
call fcn.004833ab
add esp, 0xc
jmp 0x40b546
xor esi, esi
mov ecx, dword [esi*8 + 0x4be208]
push edi
push ecx
call fcn.00481dd9
add esp, 8
test eax, eax
je 0x40b656
inc esi
cmp esi, 0x6d
jl 0x40b5d7
xor bl, bl
mov esi, dword [ebp + 0xc]
mov eax, edi
call fcn.00411650
movzx eax, ax
mov dword [esp + 0x30], eax
test ax, ax
jne 0x40b780
push 1
lea ebx, [esp + 0x40]
mov eax, edi
call fcn.00449000
movzx eax, ax
add esp, 4
mov dword [esp + 0x30], eax
test ax, ax
jne 0x40b764
cmp byte [ebp + 0x10], al
je 0x40b72e
mov ecx, dword [0x4c1688]
push 1
push 0
push 0xffffffffffffffff
push 0x49ef34
call fcn.004698a0
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov bl, byte [esi*8 + 0x4be20c]
jmp 0x40b548
push edi
push str.__s__is_not_allowed_as_a_prefix_key.
mov esi, 0x200
lea edi, [esp + 0x48]
call fcn.00466f40
add esp, 8
cmp byte [0x4c3894], 0
mov ecx, edi
je 0x40b6ae
push str.__The_current_thread_will_exit.
mov eax, esi
call fcn.00466f80
add esp, 4
push 0x4a5c64
mov eax, edi
push eax
mov ecx, 0x4c3000
call fcn.0042b900
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
fldz
push 0
sub esp, 8
fstp qword [esp]
push 0
push 0x10000
push ecx
call fcn.0046b2c0
add esp, 0x18
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 0xc]
test esi, esi
je 0x40b6f0
push 2
push 0x49ef2c
push edi
call fcn.00482612
add esp, 0xc
test eax, eax
sete dl
mov byte [esi + 0x19], dl
lea eax, [ebx - 1]
cmp al, 5
ja 0x40b6fc
cmp bl, 3
jne 0x40b704
lea ecx, [ebx + 0x66]
cmp cl, 5
ja 0x40b708
mov al, 1
jmp 0x40b70a
xor al, al
mov dl, byte [esp + 0x2f]
test dl, 0x30
je 0x40b71e
lea ecx, [ebx - 0x41]
cmp cl, 0x19
ja 0x40b71e
and dl, 0xcf
mov esi, dword [ebp + 0xc]
test al, al
je 0x40b784
mov eax, dword [esp + 0x34]
mov byte [eax], 2
jmp 0x40b784
test esi, esi
je 0x40b75b
push edi
push 0x49ef38
mov esi, 0x200
lea edi, [esp + 0x48]
call fcn.00466f40
add esp, 8
push 0x4a5c64
mov edx, edi
push edx
mov ecx, 0x4c3000
call fcn.0042b900
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x34]
mov ebx, dword [esp + 0x3c]
mov eax, 1
add dword [0x4c2888], eax
mov byte [ecx], 4
mov byte [ebx + 0x4c2878], al
mov dl, byte [esp + 0x2f]
cmp byte [ebp + 8], 0
je 0x40b7a6
test esi, esi
je 0x40b7e3
mov cx, word [esp + 0x30]
mov byte [esi + 0x13], bl
mov word [esi + 0xa], cx
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test esi, esi
je 0x40b7e3
mov ax, word [esp + 0x30]
mov word [esi + 8], ax
mov al, dl
and al, 0xd5
xor ecx, ecx
mov byte [esi + 0x12], bl
test al, 0xc0
je 0x40b7c5
mov ecx, 8
test al, 0xc
je 0x40b7cc
or ecx, 1
test al, 0x30
je 0x40b7d3
or ecx, 4
test al, 3
je 0x40b7da
or ecx, 2
or dword [esi + 0xc], ecx
and dl, 0x2a
or byte [esi + 0x10], dl
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret