Function at 0x40b480
Capabilities:
Get keyboard layout

Disassembly:
sub esp, 0x21c
push ebx
mov ebx, dword [esp + 0x22c]
push ebp
mov ebp, dword [esp + 0x228]
push esi
push edi
mov dword [esp + 0x18], 0
mov byte [esp + 0x17], 0
test ebx, ebx
je 0x40b4b2
lea eax, [ebx + 0x14]
mov dword [esp + 0x1c], eax
jmp 0x40b4ba
lea ecx, [esp + 0x23]
mov dword [esp + 0x1c], ecx
cmp byte [esp + 0x234], 0
jne 0x40b502
mov edi, 0x493fd4
mov eax, ebp
call fcn.00408f10
mov esi, eax
test esi, esi
je 0x40b502
mov ecx, esi
mov al, byte [ecx]
cmp al, 0x20
je 0x40b4e2
cmp al, 9
jne 0x40b4e5
inc ecx
jmp 0x40b4d8
push 0x492ab0
push ecx
call fcn.0047f101
add esp, 8
test eax, eax
jne 0x40b502
test ebx, ebx
je 0x40b4ff
mov byte [ebx + 0x18], 1
mov byte [esi], 0
push 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov dl, byte [ebp]
test dl, dl
jne 0x40b57b
xor bl, bl
mov eax, ebp
call fcn.00411630
movzx eax, ax
mov dword [esp + 0x18], eax
test ax, ax
jne 0x40b789
push 1
lea ebx, [esp + 0x28]
mov eax, ebp
call fcn.0044a950
movzx eax, ax
add esp, 4
mov dword [esp + 0x18], eax
test ax, ax
jne 0x40b76d
cmp byte [esp + 0x23c], al
je 0x40b72d
mov edx, dword [0x4a33f4]
push 1
push 0
push 0xffffffffffffffff
push 0x494008
push edx
call fcn.0046f1f0
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x21c
ret
cmp byte [ebp + 1], 0
jne 0x40b5e3
mov ecx, eax
lea esi, [esp + 0x17]
mov al, dl
call fcn.00411790
mov bl, al
test bl, bl
je 0x40b513
cmp byte [esp + 0x234], 0
je 0x40b6c6
lea eax, [ebx + 0x64]
cmp al, 3
ja 0x40b6eb
cmp byte [esp + 0x23c], 0
je 0x40b65c
mov ecx, dword [0x4a33f4]
push 1
push 0
push 0xffffffffffffffff
push 0x493fd8
push ecx
call fcn.0046f1f0
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x21c
ret
movzx esi, dl
test esi, 0xffffff80
jne 0x40b600
push 2
push esi
call fcn.0048061e
add esp, 8
test eax, eax
je 0x40b600
and esi, 0xffffffdf
mov eax, esi
cmp al, 0x56
jne 0x40b627
mov al, byte [ebp + 1]
call fcn.00408ee0
cmp al, 0x4b
jne 0x40b627
push 0x10
lea edx, [ebp + 2]
push 0
push edx
call fcn.00480a64
add esp, 0xc
jmp 0x40b58e
xor esi, esi
lea esp, [esp]
mov eax, dword [esi*8 + 0x4a0158]
push ebp
push eax
call fcn.0047f101
add esp, 8
test eax, eax
je 0x40b650
inc esi
cmp esi, 0x6d
jl 0x40b630
jmp 0x40b511
mov bl, byte [esi*8 + 0x4a015c]
jmp 0x40b590
push ebp
push str.__s__is_not_allowed_as_a_prefix_key.
mov esi, 0x200
lea edi, [esp + 0x30]
call fcn.0046c770
add esp, 8
cmp byte [0x4a5214], 0
je 0x40b69b
push 0x49281e
mov edx, edi
push edx
mov ecx, 0x4a4c40
call fcn.0042cf80
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x21c
ret
fldz
push 0
sub esp, 8
fstp qword [esp]
push 0
lea eax, [esp + 0x38]
push 0x10000
push eax
call fcn.00470d60
add esp, 0x18
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x21c
ret
mov esi, dword [esp + 0x238]
test esi, esi
je 0x40b6f2
push 2
push 0x494004
push ebp
call fcn.0047fb6b
add esp, 0xc
test eax, eax
sete cl
mov byte [esi + 0x19], cl
jmp 0x40b6f2
mov esi, dword [esp + 0x238]
lea edx, [ebx - 1]
cmp dl, 5
ja 0x40b6ff
cmp bl, 3
jne 0x40b706
lea eax, [ebx + 0x66]
cmp al, 5
ja 0x40b70a
mov al, 1
jmp 0x40b70c
xor al, al
mov dl, byte [esp + 0x17]
test dl, 0x30
je 0x40b720
lea ecx, [ebx - 0x41]
cmp cl, 0x19
ja 0x40b720
and dl, 0xcf
test al, al
je 0x40b794
mov eax, dword [esp + 0x1c]
mov byte [eax], 2
jmp 0x40b794
cmp dword [esp + 0x238], 0
je 0x40b760
push ebp
push str.__s__is_not_a_valid_key_name.
mov esi, 0x200
lea edi, [esp + 0x30]
call fcn.0046c770
add esp, 8
push 0x49281e
mov eax, edi
push eax
mov ecx, 0x4a4c40
call fcn.0042cf80
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x21c
ret
mov ecx, dword [esp + 0x1c]
mov ebx, dword [esp + 0x24]
mov eax, 1
add dword [0x4a44ec], eax
mov byte [ecx], 4
mov byte [ebx + 0x4a44dc], al
mov esi, dword [esp + 0x238]
mov dl, byte [esp + 0x17]
cmp byte [esp + 0x234], 0
je 0x40b7be
test esi, esi
je 0x40b7fb
mov cx, word [esp + 0x18]
mov byte [esi + 0x13], bl
mov word [esi + 0xa], cx
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x21c
ret
test esi, esi
je 0x40b7fb
mov ax, word [esp + 0x18]
mov word [esi + 8], ax
mov al, dl
and al, 0xd5
xor ecx, ecx
mov byte [esi + 0x12], bl
test al, 0xc0
je 0x40b7dd
mov ecx, 8
test al, 0xc
je 0x40b7e4
or ecx, 1
test al, 0x30
je 0x40b7eb
or ecx, 4
test al, 3
je 0x40b7f2
or ecx, 2
or dword [esi + 0xc], ecx
and dl, 0x2a
or byte [esi + 0x10], dl
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x21c
ret