Function at 0x4a0050
Capabilities:
Get keyboard layout

Disassembly:
sub esp, 0x42c
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x124]
push eax
call fcn.0051ec40
cmp dword [esp + 0x444], 0
mov ebx, dword [esp + 0x448]
je 0x4a00b3
mov eax, ebx
sar eax, 4
and eax, 0xf
sub eax, 1
je 0x4a00a6
sub eax, 1
je 0x4a0098
mov ecx, dword [0x581de4]
mov ebp, dword [ecx + 0x73c]
jmp 0x4a00b7
mov edx, dword [0x581de4]
mov ebp, dword [edx + 0x740]
jmp 0x4a00b7
mov eax, dword [0x581de4]
mov ebp, dword [eax + 0x744]
jmp 0x4a00b7
mov ebp, dword [esp + 0x10]
mov esi, dword [esp + 0x44c]
lea ecx, [esp + 0x124]
push ecx
call fcn.0049ff20
test eax, eax
jne 0x4a0133
push esi
push eax
call fcn.0049fbc0
test eax, eax
mov dword [esp + 0x124], eax
je 0x4a011d
add eax, 1
cmp eax, dword [esp + 0x128]
jle 0x4a00fb
push eax
lea edx, [esp + 0x128]
push edx
call fcn.0051ec60
mov eax, dword [esp + 0x12c]
push esi
push eax
call fcn.0049fbc0
mov ecx, dword [esp + 0x12c]
mov edx, dword [esp + 0x124]
mov byte [ecx + edx], 0
jmp 0x4a0133
push esi
lea eax, [esp + 0x128]
push str.0x_02X
push eax
call fcn.0051fa10
add esp, 0xc
mov edi, dword [esp + 0x440]
push edi
call fcn.0051f690
test bl, 8
je 0x4a01da
lea ecx, [esp + 0x14]
push ecx
call fcn.0051ec40
cmp byte [0x57e667], 0
mov esi, 0x56188c
je 0x4a01c1
mov eax, 0x5b
call fcn.0049fe30
test eax, eax
je 0x4a01c1
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
push 0
push 0x5b
call dword [0x58b030]
test eax, eax
je 0x4a01c1
push 0x104
shl eax, 0x10
lea edx, [esp + 0x238]
or eax, 0x2000000
push edx
push eax
call dword [0x58b000]
test eax, eax
je 0x4a01c1
lea eax, [esp + 0x234]
push eax
lea ecx, [esp + 0x18]
push ecx
call fcn.0051f5c0
mov esi, dword [esp + 0x1c]
push esi
push edi
call fcn.0051ede0
push 0x2b
push edi
call fcn.0051edc0
lea edx, [esp + 0x14]
push edx
call fcn.00522920
test bl, 1
je 0x4a0225
lea eax, [esp + 0x14]
push eax
call fcn.0051ec40
lea ecx, [esp + 0x14]
push ecx
mov esi, 0x11
mov ebx, str.Ctrl
call fcn.0049ff20
test eax, eax
je 0x4a0205
mov ebx, dword [esp + 0x1c]
push ebx
push edi
call fcn.0051ede0
push 0x2b
push edi
call fcn.0051edc0
lea edx, [esp + 0x14]
push edx
call fcn.00522920
mov ebx, dword [esp + 0x448]
test bl, 2
je 0x4a0270
lea eax, [esp + 0x14]
push eax
call fcn.0051ec40
lea ecx, [esp + 0x14]
push ecx
mov esi, 0x12
mov ebx, 0x561880
call fcn.0049ff20
test eax, eax
je 0x4a0250
mov ebx, dword [esp + 0x1c]
push ebx
push edi
call fcn.0051ede0
push 0x2b
push edi
call fcn.0051edc0
lea edx, [esp + 0x14]
push edx
call fcn.00522920
mov ebx, dword [esp + 0x448]
test bl, 4
je 0x4a02b4
lea eax, [esp + 0x14]
push eax
call fcn.0051ec40
lea ecx, [esp + 0x14]
push ecx
mov esi, 0x10
mov ebx, str.Shift
call fcn.0049ff20
test eax, eax
je 0x4a029b
mov ebx, dword [esp + 0x1c]
push ebx
push edi
call fcn.0051ede0
push 0x2b
push edi
call fcn.0051edc0
lea edx, [esp + 0x14]
push edx
call fcn.00522920
mov eax, dword [esp + 0x12c]
push eax
push edi
call fcn.0051ede0
cmp dword [esp + 0x444], 0
je 0x4a02e9
push 0x550744
push edi
call fcn.0051ede0
push ebp
push edi
call fcn.0051ede0
push 0x546f38
push edi
call fcn.0051ede0
lea ecx, [esp + 0x124]
push ecx
call fcn.00522920
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x42c
ret 0x10