Function at 0x40b590
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 0x40b5be
lea eax, [esi + 0x14]
mov dword [esp + 0x34], eax
jmp 0x40b5c6
lea ecx, [esp + 0x3b]
mov dword [esp + 0x34], ecx
cmp byte [ebp + 8], 0
jne 0x40b61b
mov ebx, 0x49e6d0
mov eax, edi
call fcn.00409070
mov esi, eax
test esi, esi
je 0x40b618
mov ecx, esi
movzx eax, word [ecx]
cmp eax, 0x20
je 0x40b5ed
cmp eax, 9
jne 0x40b5f2
add ecx, 2
jmp 0x40b5e0
push 0x49bd18
push ecx
call fcn.00486339
add esp, 8
test eax, eax
jne 0x40b618
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x40b60f
mov byte [eax + 0x18], 1
xor edx, edx
mov word [esi], dx
mov esi, eax
jmp 0x40b61b
mov esi, dword [ebp + 0xc]
push 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
movzx edx, word [edi]
test dx, dx
jne 0x40b632
xor bl, bl
jmp 0x40b6f7
cmp word [edi + 2], 0
jne 0x40b68f
mov ecx, eax
lea esi, [esp + 0x2f]
mov eax, edx
call fcn.004118e0
mov bl, al
test bl, bl
je 0x40b6f4
cmp byte [ebp + 8], 0
je 0x40b7d1
lea edx, [ebx + 0x64]
cmp dl, 3
ja 0x40b7f0
cmp byte [ebp + 0x10], 0
je 0x40b762
mov ecx, dword [0x4c17f0]
push 1
push 0
push 0xffffffffffffffff
push 0x49e6d8
call fcn.0046dd60
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, edx
test esi, 0xffffff80
jne 0x40b6ab
push 2
push esi
call fcn.0048757e
add esp, 8
test eax, eax
je 0x40b6ab
and esi, 0xffffffdf
cmp si, 0x56
jne 0x40b6d5
mov ax, word [edi + 2]
call fcn.00409040
cmp ax, 0x4b
jne 0x40b6d5
push 0x10
lea eax, [edi + 4]
push 0
push eax
call fcn.0048795b
add esp, 0xc
jmp 0x40b646
xor esi, esi
mov ecx, dword [esi*8 + 0x4be228]
push edi
push ecx
call fcn.00486339
add esp, 8
test eax, eax
je 0x40b756
inc esi
cmp esi, 0x6d
jl 0x40b6d7
xor bl, bl
mov esi, dword [ebp + 0xc]
mov eax, edi
call fcn.00411780
movzx eax, ax
mov dword [esp + 0x30], eax
test ax, ax
jne 0x40b880
push 1
lea ebx, [esp + 0x40]
mov eax, edi
call fcn.0044b350
movzx eax, ax
add esp, 4
mov dword [esp + 0x30], eax
test ax, ax
jne 0x40b864
cmp byte [ebp + 0x10], al
je 0x40b82e
mov ecx, dword [0x4c17f0]
push 1
push 0
push 0xffffffffffffffff
push 0x49e734
call fcn.0046dd60
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov bl, byte [esi*8 + 0x4be22c]
jmp 0x40b648
push edi
push str.__s__is_not_allowed_as_a_prefix_key.
mov esi, 0x200
lea edi, [esp + 0x48]
call fcn.0046b300
add esp, 8
cmp byte [0x4c3c0c], 0
mov ecx, edi
je 0x40b7ae
push str.__The_current_thread_will_exit.
mov eax, esi
call fcn.0046b340
add esp, 4
push 0x4a596c
mov eax, edi
push eax
mov ecx, 0x4c3168
call fcn.0042d6d0
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.0046f820
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 0x40b7f0
push 2
push 0x49e72c
push edi
call fcn.00486b72
add esp, 0xc
test eax, eax
sete dl
mov byte [esi + 0x19], dl
lea eax, [ebx - 1]
cmp al, 5
ja 0x40b7fc
cmp bl, 3
jne 0x40b804
lea ecx, [ebx + 0x66]
cmp cl, 5
ja 0x40b808
mov al, 1
jmp 0x40b80a
xor al, al
mov dl, byte [esp + 0x2f]
test dl, 0x30
je 0x40b81e
lea ecx, [ebx - 0x41]
cmp cl, 0x19
ja 0x40b81e
and dl, 0xcf
mov esi, dword [ebp + 0xc]
test al, al
je 0x40b884
mov eax, dword [esp + 0x34]
mov byte [eax], 2
jmp 0x40b884
test esi, esi
je 0x40b85b
push edi
push 0x49e738
mov esi, 0x200
lea edi, [esp + 0x48]
call fcn.0046b300
add esp, 8
push 0x4a596c
mov edx, edi
push edx
mov ecx, 0x4c3168
call fcn.0042d6d0
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 [0x4c29f0], eax
mov byte [ecx], 4
mov byte [ebx + 0x4c29e0], al
mov dl, byte [esp + 0x2f]
cmp byte [ebp + 8], 0
je 0x40b8a6
test esi, esi
je 0x40b8e3
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 0x40b8e3
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 0x40b8c5
mov ecx, 8
test al, 0xc
je 0x40b8cc
or ecx, 1
test al, 0x30
je 0x40b8d3
or ecx, 4
test al, 3
je 0x40b8da
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