Function at 0x49008f
Capabilities:
Get keyboard layout

Disassembly:
mov eax, 0x5425d1
call fcn.004f12f4
sub esp, 0x40
push esi
mov esi, ecx
mov dword [ebp - 0x1c], esi
lea ecx, [esi + 0x244]
call fcn.004bc5ae
cmp eax, 1
ja 0x48c981
mov ecx, esi
call fcn.004a80c6
mov ecx, dword [esi + 0x2ac]
push eax
mov dword [ebp - 0x14], eax
call fcn.004c65f8
mov dword [ebp - 0x10], eax
cmp eax, 2
jl 0x48c981
push edi
xor eax, eax
lea edi, [ebp - 0x34]
stosd dword es:[edi], eax
lea ecx, [ebp - 0x34]
push 5
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor edi, edi
push edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x20], edi
call fcn.00489a1e
mov edx, dword [esi + 0x2ac]
push dword [ebp - 0x10]
add edx, 4
mov dword [ebp - 4], edi
cmp dword [ebp - 0x20], 0x10
mov edi, dword [ebp - 0x14]
push edi
mov eax, dword [edx]
mov ecx, dword [eax + 0xc]
lea eax, [ebp - 0x34]
cmovae eax, dword [ebp - 0x34]
push eax
push edx
call ecx
mov ecx, esi
call fcn.0048b5a8
cmp dword [ebp - 0x20], 0x10
lea ecx, [ebp - 0x34]
push eax
push dword [ebp - 0x24]
cmovae ecx, dword [ebp - 0x34]
lea eax, [ebp - 0x4c]
push ecx
push eax
call fcn.0048fea6
add esp, 0x10
mov eax, dword [esi + 0x2b8]
push eax
mov dword [ebp - 0x18], eax
call sub.IMM32.dll_ImmGetContext
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 2
test eax, eax
je 0x48c941
mov ecx, esi
call fcn.0048f9bc
cmp dword [ebp - 0x38], 8
lea esi, [ebp - 0x4c]
push 0
cmovae esi, dword [ebp - 0x4c]
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push esi
mov esi, dword [ebp - 0x14]
push 0x1008
push esi
push eax
call sub.IMM32.dll_ImmEscapeW
test eax, eax
je 0x48c938
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x1c]
add eax, edi
push eax
push edi
call fcn.004b1755
push esi
push dword [ebp - 0x18]
call sub.IMM32.dll_ImmReleaseContext
lea ecx, [ebp - 0x4c]
call fcn.00490f37
mov eax, dword [ebp - 0x20]
pop edi
cmp eax, 0x10
jb 0x48c981
mov ecx, dword [ebp - 0x34]
inc eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], ecx
cmp eax, 0x1000
jb 0x48c978
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.00490c03
mov eax, dword [ebp - 0x10]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x14]
push eax
push ecx
call fcn.004f0ff5
pop ecx
pop ecx
mov ecx, dword [ebp - 0xc]
pop esi
mov dword fs:[0], ecx
leave
ret
mov eax, 0x5427ed
call fcn.004f12f4
sub esp, 0x54
push esi
push edi
mov edi, ecx
lea esi, [edi + 0x244]
mov ecx, esi
call fcn.004bca54
lea ecx, [ebp - 0x18]
push ecx
mov ecx, eax
call fcn.0048fe11
mov ecx, esi
mov eax, dword [eax]
mov dword [ebp - 0x14], eax
call fcn.004bca54
mov ecx, eax
call fcn.004bc82f
mov esi, dword [ebp - 0x14]
mov dword [ebp - 0x10], eax
lea ecx, [eax + esi]
push ecx
mov ecx, dword [edi + 0x2ac]
push esi
call fcn.004c3fdf
test eax, eax
jle 0x48f9ae
push 0
push dword [ebp - 0x10]
lea ecx, [ebp - 0x30]
call fcn.0048a2d8
mov edx, dword [edi + 0x2ac]
push dword [ebp - 0x10]
and dword [ebp - 4], 0
add edx, 4
cmp dword [ebp - 0x1c], 0x10
push esi
mov eax, dword [edx]
mov ecx, dword [eax + 0xc]
lea eax, [ebp - 0x30]
cmovae eax, dword [ebp - 0x30]
push eax
push edx
call ecx
mov ecx, edi
call fcn.0048b5a8
push 0x10
pop esi
cmp dword [ebp - 0x1c], esi
lea ecx, [ebp - 0x30]
push eax
push dword [ebp - 0x20]
cmovae ecx, dword [ebp - 0x30]
lea eax, [ebp - 0x48]
push ecx
push eax
call fcn.0048fea6
lea eax, [ebp - 0x48]
mov byte [ebp - 4], 1
push eax
call fcn.004d064b
add esp, 0x14
test al, al
je 0x48f99e
mov ecx, edi
call fcn.0048b5a8
cmp dword [ebp - 0x34], 8
lea ecx, [ebp - 0x48]
push eax
push dword [ebp - 0x38]
cmovae ecx, dword [ebp - 0x48]
lea eax, [ebp - 0x60]
push ecx
push eax
call fcn.0048ff02
add esp, 0x10
lea ecx, [ebp - 0x30]
push eax
call fcn.0048a981
lea ecx, [ebp - 0x60]
call fcn.00490f11
mov ecx, dword [edi + 0x2ac]
add ecx, esi
call fcn.0049e82c
push 0
mov ecx, edi
call fcn.004a78ae
cmp dword [ebp - 0x1c], esi
lea eax, [ebp - 0x30]
push dword [ebp - 0x20]
cmovae eax, dword [ebp - 0x30]
mov ecx, edi
push eax
call fcn.004ab35c
mov ecx, dword [edi + 0x2ac]
add ecx, esi
call fcn.0049ec72
lea ecx, [ebp - 0x48]
call fcn.00490f37
lea ecx, [ebp - 0x30]
call fcn.00490f11
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
leave
ret
push esi
mov esi, ecx
push edi
lea edi, [esi + 0x244]
mov ecx, edi
call fcn.004bc5ae
cmp eax, 1
ja 0x4900bd
mov ecx, edi
call fcn.004bc618
mov ecx, esi
pop edi
pop esi
test al, al
jne 0x48c831
jmp 0x48f870
pop edi
pop esi
ret