Function at 0x4c64a5
Capabilities:
Get keyboard layout

Disassembly:
mov eax, 0x556e84
call fcn.00538504
sub esp, 0x40
push esi
mov esi, ecx
mov dword [ebp - 0x1c], esi
lea ecx, [esi + 0x244]
call fcn.004e9b20
cmp eax, 1
ja 0x4c2f80
mov ecx, esi
call fcn.004efb39
mov ecx, dword [esi + 0x2ac]
push eax
mov dword [ebp - 0x14], eax
call fcn.004dfa3b
mov dword [ebp - 0x10], eax
cmp eax, 2
jl 0x4c2f80
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.004c02b0
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.004c1baf
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.004c62e2
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 0x4c2f40
mov ecx, esi
call fcn.004c5e36
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 0x4c2f37
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x1c]
add eax, edi
push eax
push edi
call fcn.004f9007
push esi
push dword [ebp - 0x18]
call sub.IMM32.dll_ImmReleaseContext
lea ecx, [ebp - 0x4c]
call fcn.004c7248
mov eax, dword [ebp - 0x20]
pop edi
cmp eax, 0x10
jb 0x4c2f80
mov ecx, dword [ebp - 0x34]
inc eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], ecx
cmp eax, 0x1000
jb 0x4c2f77
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.004c6fa3
mov eax, dword [ebp - 0x10]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x14]
push eax
push ecx
call fcn.00538215
pop ecx
pop ecx
mov ecx, dword [ebp - 0xc]
pop esi
mov dword fs:[0], ecx
leave
ret
mov eax, 0x557087
call fcn.00538504
sub esp, 0x54
push esi
push edi
mov edi, ecx
lea esi, [edi + 0x244]
mov ecx, esi
call fcn.004e9fb6
lea ecx, [ebp - 0x18]
push ecx
mov ecx, eax
call fcn.004c624d
mov ecx, esi
mov eax, dword [eax]
mov dword [ebp - 0x14], eax
call fcn.004e9fb6
mov ecx, eax
call fcn.004e9da1
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.004dd3eb
test eax, eax
jle 0x4c5e28
push 0
push dword [ebp - 0x10]
lea ecx, [ebp - 0x30]
call fcn.004c0aae
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.004c1baf
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.004c62e2
lea eax, [ebp - 0x48]
mov byte [ebp - 4], 1
push eax
call fcn.00504289
add esp, 0x14
test al, al
je 0x4c5e18
mov ecx, edi
call fcn.004c1baf
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.004c633e
add esp, 0x10
lea ecx, [ebp - 0x30]
push eax
call fcn.004c103e
lea ecx, [ebp - 0x60]
call fcn.004c7222
mov ecx, dword [edi + 0x2ac]
add ecx, esi
call fcn.004d1347
push 0
mov ecx, edi
call fcn.004ef386
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.004f2cd1
mov ecx, dword [edi + 0x2ac]
add ecx, esi
call fcn.004d178d
lea ecx, [ebp - 0x48]
call fcn.004c7248
lea ecx, [ebp - 0x30]
call fcn.004c7222
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.004e9b20
cmp eax, 1
ja 0x4c64d3
mov ecx, edi
call fcn.004e9b8a
mov ecx, esi
pop edi
pop esi
test al, al
jne 0x4c2e30
jmp 0x4c5cea
pop edi
pop esi
ret