Function at 0x40b300
Capabilities:
Get keyboard layout

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
sub esp, 0x234
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
mov dword [esp + 0x30], 0
mov byte [esp + 0x2f], 0
test ebx, ebx
je 0x40b32c
lea eax, [ebx + 0x14]
mov dword [esp + 0x34], eax
jmp 0x40b334
lea ecx, [esp + 0x3b]
mov dword [esp + 0x34], ecx
cmp byte [ebp + 0xc], 0
mov esi, dword [ebp + 8]
jne 0x40b37b
mov edi, 0x49402c
mov eax, esi
call fcn.00408eb0
mov edi, eax
test edi, edi
je 0x40b37b
mov ecx, edi
mov al, byte [ecx]
cmp al, 0x20
je 0x40b35b
cmp al, 9
jne 0x40b35e
inc ecx
jmp 0x40b351
push 0x492ab0
push ecx
call fcn.0047edc1
add esp, 8
test eax, eax
jne 0x40b37b
test ebx, ebx
je 0x40b378
mov byte [ebx + 0x18], 1
mov byte [edi], 0
push 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov dl, byte [esi]
test dl, dl
jne 0x40b3ed
xor bl, bl
mov eax, esi
call fcn.00411480
movzx eax, ax
mov dword [esp + 0x30], eax
test ax, ax
jne 0x40b5cf
mov esi, dword [ebp + 8]
push 1
lea ebx, [esp + 0x40]
mov eax, esi
call fcn.0044aef0
movzx eax, ax
add esp, 4
mov dword [esp + 0x30], eax
test ax, ax
jne 0x40b5b3
cmp byte [ebp + 0x14], al
je 0x40b57b
mov ecx, dword [0x4a3434]
push 1
push 0
push 0xffffffffffffffff
push 0x494060
call fcn.0046f180
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [esi + 1], 0
jne 0x40b407
mov ecx, eax
lea esi, [esp + 0x2f]
mov al, dl
call fcn.004115e0
mov esi, dword [ebp + 8]
mov bl, al
jmp 0x40b477
movzx edi, dl
test edi, 0xffffff80
jne 0x40b424
push 2
push edi
call fcn.004802de
add esp, 8
test eax, eax
je 0x40b424
and edi, 0xffffffdf
mov eax, edi
cmp al, 0x56
jne 0x40b44a
mov al, byte [esi + 1]
call fcn.00408e80
cmp al, 0x4b
jne 0x40b44a
push 0x10
lea edx, [esi + 2]
push 0
push edx
call fcn.00480724
add esp, 0xc
mov bl, al
jmp 0x40b477
xor edi, edi
lea esp, [esp]
mov eax, dword [edi*8 + 0x4a01c8]
push esi
push eax
call fcn.0047edc1
add esp, 8
test eax, eax
je 0x40b470
inc edi
cmp edi, 0x6d
jl 0x40b450
jmp 0x40b389
mov bl, byte [edi*8 + 0x4a01cc]
test bl, bl
je 0x40b38b
cmp byte [ebp + 0xc], 0
je 0x40b51b
lea eax, [ebx + 0x64]
cmp al, 3
ja 0x40b53c
cmp byte [ebp + 0x14], 0
je 0x40b4b9
mov ecx, dword [0x4a3434]
push 1
push 0
push 0xffffffffffffffff
push 0x494030
call fcn.0046f180
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
push str.__s__is_not_allowed_as_a_prefix_key.
mov esi, 0x200
lea edi, [esp + 0x48]
call fcn.0046c720
add esp, 8
cmp byte [0x4a5254], 0
je 0x40b4f4
push 0x4927f1
mov ecx, edi
push ecx
mov ecx, 0x4a4c80
call fcn.0042d140
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 edx, [esp + 0x50]
push 0x10000
push edx
call fcn.00470ca0
add esp, 0x18
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 0x10]
test edi, edi
je 0x40b53f
push 2
push 0x49405c
push esi
call fcn.0047f82b
add esp, 0xc
test eax, eax
sete al
mov byte [edi + 0x19], al
jmp 0x40b53f
mov edi, dword [ebp + 0x10]
lea ecx, [ebx - 1]
cmp cl, 5
ja 0x40b54c
cmp bl, 3
jne 0x40b554
lea edx, [ebx + 0x66]
cmp dl, 5
ja 0x40b558
mov al, 1
jmp 0x40b55a
xor al, al
mov dl, byte [esp + 0x2f]
test dl, 0x30
je 0x40b56e
lea ecx, [ebx - 0x41]
cmp cl, 0x19
ja 0x40b56e
and dl, 0xcf
test al, al
je 0x40b5d6
mov eax, dword [esp + 0x34]
mov byte [eax], 2
jmp 0x40b5d6
cmp dword [ebp + 0x10], 0
je 0x40b5aa
push esi
push str.__s__is_not_a_valid_key_name.
mov esi, 0x200
lea edi, [esp + 0x48]
call fcn.0046c720
add esp, 8
push 0x4927f1
mov edx, edi
push edx
mov ecx, 0x4a4c80
call fcn.0042d140
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 [0x4a452c], eax
mov byte [ecx], 4
mov byte [ebx + 0x4a451c], al
mov edi, dword [ebp + 0x10]
mov dl, byte [esp + 0x2f]
cmp byte [ebp + 0xc], 0
je 0x40b5f8
test edi, edi
je 0x40b635
mov cx, word [esp + 0x30]
mov byte [edi + 0x13], bl
mov word [edi + 0xa], cx
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test edi, edi
je 0x40b635
mov ax, word [esp + 0x30]
mov word [edi + 8], ax
mov al, dl
and al, 0xd5
xor ecx, ecx
mov byte [edi + 0x12], bl
test al, 0xc0
je 0x40b617
mov ecx, 8
test al, 0xc
je 0x40b61e
or ecx, 1
test al, 0x30
je 0x40b625
or ecx, 4
test al, 3
je 0x40b62c
or ecx, 2
or dword [edi + 0xc], ecx
and dl, 0x2a
or byte [edi + 0x10], dl
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret