Function at 0x40b4d0
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 0x40b4fe
lea eax, [esi + 0x14]
mov dword [esp + 0x34], eax
jmp 0x40b506
lea ecx, [esp + 0x3b]
mov dword [esp + 0x34], ecx
cmp byte [ebp + 8], 0
jne 0x40b55b
mov ebx, 0x49e544
mov eax, edi
call fcn.00408f70
mov esi, eax
test esi, esi
je 0x40b558
mov ecx, esi
movzx eax, word [ecx]
cmp eax, 0x20
je 0x40b52d
cmp eax, 9
jne 0x40b532
add ecx, 2
jmp 0x40b520
push 0x49bd08
push ecx
call fcn.00488309
add esp, 8
test eax, eax
jne 0x40b558
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x40b54f
mov byte [eax + 0x18], 1
xor edx, edx
mov word [esi], dx
mov esi, eax
jmp 0x40b55b
mov esi, dword [ebp + 0xc]
push 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
movzx edx, word [edi]
test dx, dx
jne 0x40b572
xor bl, bl
jmp 0x40b637
cmp word [edi + 2], 0
jne 0x40b5cf
mov ecx, eax
lea esi, [esp + 0x2f]
mov eax, edx
call fcn.00411a50
mov bl, al
test bl, bl
je 0x40b634
cmp byte [ebp + 8], 0
je 0x40b704
lea edx, [ebx + 0x64]
cmp dl, 3
ja 0x40b723
cmp byte [ebp + 0x10], 0
je 0x40b6a2
mov ecx, dword [0x4c26a8]
push 1
push 0
push 0xffffffffffffffff
push 0x49e54c
call fcn.00471d60
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, edx
test esi, 0xffffff80
jne 0x40b5eb
push 2
push esi
call fcn.0048954e
add esp, 8
test eax, eax
je 0x40b5eb
and esi, 0xffffffdf
cmp si, 0x56
jne 0x40b615
mov ax, word [edi + 2]
call fcn.00408f40
cmp ax, 0x4b
jne 0x40b615
push 0x10
lea eax, [edi + 4]
push 0
push eax
call fcn.0048992b
add esp, 0xc
jmp 0x40b586
xor esi, esi
mov ecx, dword [esi*8 + 0x4bf230]
push edi
push ecx
call fcn.00488309
add esp, 8
test eax, eax
je 0x40b696
inc esi
cmp esi, 0x6d
jl 0x40b617
xor bl, bl
mov esi, dword [ebp + 0xc]
mov eax, edi
call fcn.004118f0
movzx eax, ax
mov dword [esp + 0x30], eax
test ax, ax
jne 0x40b7b3
push 1
lea ebx, [esp + 0x40]
mov eax, edi
call fcn.0044db80
movzx eax, ax
add esp, 4
mov dword [esp + 0x30], eax
test ax, ax
jne 0x40b797
cmp byte [ebp + 0x10], al
je 0x40b761
mov ecx, dword [0x4c26a8]
push 1
push 0
push 0xffffffffffffffff
push 0x49e5a4
call fcn.00471d60
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov bl, byte [esi*8 + 0x4bf234]
jmp 0x40b588
push edi
push 0x49e550
mov esi, 0x200
lea edi, [esp + 0x48]
call fcn.0046f260
add esp, 8
cmp byte [0x4c4a9c], 0
je 0x40b6dd
push 0x4a59a4
mov eax, edi
push eax
mov ecx, 0x4c4000
call fcn.0042f0c0
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
lea ecx, [esp + 0x50]
push 0x10000
push ecx
call fcn.00473830
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 0x40b723
push 2
push 0x49e59c
push edi
call fcn.00488b42
add esp, 0xc
test eax, eax
sete dl
mov byte [esi + 0x19], dl
lea eax, [ebx - 1]
cmp al, 5
ja 0x40b72f
cmp bl, 3
jne 0x40b737
lea ecx, [ebx + 0x66]
cmp cl, 5
ja 0x40b73b
mov al, 1
jmp 0x40b73d
xor al, al
mov dl, byte [esp + 0x2f]
test dl, 0x30
je 0x40b751
lea ecx, [ebx - 0x41]
cmp cl, 0x19
ja 0x40b751
and dl, 0xcf
mov esi, dword [ebp + 0xc]
test al, al
je 0x40b7b7
mov eax, dword [esp + 0x34]
mov byte [eax], 2
jmp 0x40b7b7
test esi, esi
je 0x40b78e
push edi
push 0x49e5a8
mov esi, 0x200
lea edi, [esp + 0x48]
call fcn.0046f260
add esp, 8
push 0x4a59a4
mov edx, edi
push edx
mov ecx, 0x4c4000
call fcn.0042f0c0
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 [0x4c38a8], eax
mov byte [ecx], 4
mov byte [ebx + 0x4c3898], al
mov dl, byte [esp + 0x2f]
cmp byte [ebp + 8], 0
je 0x40b7d9
test esi, esi
je 0x40b816
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 0x40b816
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 0x40b7f8
mov ecx, 8
test al, 0xc
je 0x40b7ff
or ecx, 1
test al, 0x30
je 0x40b806
or ecx, 4
test al, 3
je 0x40b80d
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