Function at 0x5a8a37
Capabilities:
Get keyboard layout

Disassembly:
mov eax, 0x6968c4
call fcn.006783e4
sub esp, 0x40
push esi
mov esi, ecx
mov dword [ebp - 0x1c], esi
lea ecx, [esi + 0x244]
call fcn.005cc0aa
cmp eax, 1
ja 0x5a5540
mov ecx, esi
call fcn.005d20c0
mov ecx, dword [esi + 0x2ac]
push eax
mov dword [ebp - 0x14], eax
call fcn.005c1fc7
mov dword [ebp - 0x10], eax
cmp eax, 2
jl 0x5a5540
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.005a2870
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.005a416f
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.005a8874
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 0x5a5500
mov ecx, esi
call fcn.005a83c8
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 0x5a54f7
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x1c]
add eax, edi
push eax
push edi
call fcn.005db58b
push esi
push dword [ebp - 0x18]
call sub.IMM32.dll_ImmReleaseContext
lea ecx, [ebp - 0x4c]
call fcn.005a97da
mov eax, dword [ebp - 0x20]
pop edi
cmp eax, 0x10
jb 0x5a5540
mov ecx, dword [ebp - 0x34]
inc eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], ecx
cmp eax, 0x1000
jb 0x5a5537
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.005a9535
mov eax, dword [ebp - 0x10]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x14]
push eax
push ecx
call fcn.00678175
pop ecx
pop ecx
mov ecx, dword [ebp - 0xc]
pop esi
mov dword fs:[0], ecx
leave
ret
mov eax, 0x696ac7
call fcn.006783e4
sub esp, 0x54
push esi
push edi
mov edi, ecx
lea esi, [edi + 0x244]
mov ecx, esi
call fcn.005cc540
lea ecx, [ebp - 0x18]
push ecx
mov ecx, eax
call fcn.005a87df
mov ecx, esi
mov eax, dword [eax]
mov dword [ebp - 0x14], eax
call fcn.005cc540
mov ecx, eax
call fcn.005cc32b
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.005bf974
test eax, eax
jle 0x5a83ba
push 0
push dword [ebp - 0x10]
lea ecx, [ebp - 0x30]
call fcn.005a306e
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.005a416f
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.005a8874
lea eax, [ebp - 0x48]
mov byte [ebp - 4], 1
push eax
call fcn.005e680d
add esp, 0x14
test al, al
je 0x5a83aa
mov ecx, edi
call fcn.005a416f
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.005a88d0
add esp, 0x10
lea ecx, [ebp - 0x30]
push eax
call fcn.005a35fe
lea ecx, [ebp - 0x60]
call fcn.005a97b4
mov ecx, dword [edi + 0x2ac]
add ecx, esi
call fcn.005b38d3
push 0
mov ecx, edi
call fcn.005d190d
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.005d5255
mov ecx, dword [edi + 0x2ac]
add ecx, esi
call fcn.005b3d19
lea ecx, [ebp - 0x48]
call fcn.005a97da
lea ecx, [ebp - 0x30]
call fcn.005a97b4
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.005cc0aa
cmp eax, 1
ja 0x5a8a65
mov ecx, edi
call fcn.005cc114
mov ecx, esi
pop edi
pop esi
test al, al
jne 0x5a53f0
jmp 0x5a827c
pop edi
pop esi
ret