Function at 0x49dc80
Capabilities:
Get keyboard layout

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x577e30
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x48
mov eax, dword [0x5d3070]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x4c], esi
mov edi, dword [ebx + 0x14]
push edx
mov dword [ebp - 0x50], edi
call fcn.005093a0
xor eax, eax
xorps xmm0, xmm0
mov word [ebp - 0x28], ax
lea eax, [ebp - 0x28]
push eax
movups xmmword [ebp - 0x26], xmm0
call dword [sym.imp.USER32.dll_GetKeyboardLayoutNameW]
test eax, eax
je 0x49dd09
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x2c], 0
push eax
lea eax, [ebp - 0x28]
push 0x5af260
push eax
call fcn.00497b50
mov eax, dword [ebp - 0x2c]
add esp, 0xc
xorps xmm0, xmm0
mov dword [ebp - 0x48], eax
movups xmmword [ebp - 0x28], xmm0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x28], vtable.RT::CGuidList.0
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 0
push ecx
push edi
mov edx, eax
mov ecx, esi
call fcn.0049e410
mov ecx, dword [ebp - 0x20]
mov eax, 0x2aaaaaab
mov esi, dword [ebp - 0x24]
add esp, 8
sub ecx, esi
xor edi, edi
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x54], eax
je 0x49ddd8
push edi
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0x28]
call fcn.00508880
push dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x50]
lea eax, [ebp - 0x44]
push eax
mov byte [ebp - 4], 1
call fcn.0046a720
mov esi, eax
test esi, esi
je 0x49ddb4
mov edx, dword [ebp - 0x4c]
push ecx
push dword [ebp - 0x48]
mov ecx, esi
call fcn.0049dea0
mov edx, dword [ebp - 0x48]
lea ecx, [ebp - 0x44]
push esi
push dword [ebx + 0x10]
call fcn.0049dfd0
add esp, 0x10
mov dword [ebp - 0x2c], eax
test eax, eax
jne 0x49de15
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x30]
cmp eax, 8
jb 0x49ddcf
push 2
inc eax
push eax
push dword [ebp - 0x44]
call fcn.00403190
add esp, 0xc
inc edi
cmp edi, dword [ebp - 0x54]
jne 0x49dd67
mov esi, dword [ebp - 0x24]
xor eax, eax
mov dword [ebp - 0x2c], eax
test esi, esi
je 0x49de7d
mov edx, dword [ebp - 0x20]
push ecx
mov ecx, esi
call fcn.00404570
mov ecx, dword [ebp - 0x1c]
mov eax, 0x2aaaaaab
sub ecx, esi
add esp, 4
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 0xaaaaaaa
jbe 0x49de36
call fcn.0054a911
mov ecx, dword [ebp - 0x30]
cmp ecx, 8
jb 0x49de31
push 2
lea eax, [ecx + 1]
push eax
push dword [ebp - 0x44]
call fcn.00403190
mov eax, dword [ebp - 0x2c]
add esp, 0xc
mov esi, dword [ebp - 0x24]
jmp 0x49dddd
lea eax, [eax + eax*2]
shl eax, 3
cmp eax, 0x1000
jb 0x49de71
mov eax, dword [ebp - 0x24]
test al, 0x1f
je 0x49de4f
call fcn.0054a911
mov esi, dword [eax - 4]
cmp esi, eax
jb 0x49de5b
call fcn.0054a911
sub eax, esi
cmp eax, 4
jae 0x49de67
call fcn.0054a911
cmp eax, 0x23
jbe 0x49de71
call fcn.0054a911
push esi
call fcn.0053f797
mov eax, dword [ebp - 0x2c]
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0053f778
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret