Function at 0x1001686b
Capabilities:
Get keyboard layout

Disassembly:
push 0x128
mov eax, 0x100239df
call fcn.10021d5d
mov ebx, ecx
mov dword [ebp - 0x130], ebx
cmp byte [0x1006055d], 0
jne 0x1001698a
push 0x30
pop esi
push esi
xor edi, edi
lea eax, [ebp - 0x108]
push edi
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [ebp - 0x108], esi
lea eax, [ebp - 0x108]
push eax
push edi
call dword [sym.imp.USER32.dll_GetGUIThreadInfo]
cmp dword [ebp - 0xfc], edi
je 0x1001698a
push edi
push dword [ebp - 0xfc]
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov esi, eax
call dword [sym.imp.api_ms_win_core_processthreads_l1_1_2.dll_GetCurrentThreadId]
cmp eax, esi
jne 0x1001698a
test ebx, ebx
je 0x10016990
xor ebx, ebx
push 0x48
lea eax, [ebp - 0xd8]
push ebx
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [ebp - 0x128], ebx
xor eax, eax
lea ecx, [ebp - 0xd8]
mov word [ebp - 0x124], ax
mov edi, ebx
call fcn.10016b6a
test eax, eax
js 0x10016945
xor eax, eax
mov dword [ebp - 0x128], ebx
mov edx, 0x10007fa0
mov word [ebp - 0x124], ax
lea ecx, [ebp - 0xd0]
call fcn.100169a4
test eax, eax
je 0x10027294
mov edx, dword [ebp - 0x130]
lea eax, [ebp - 0xd8]
push edi
push dword [ebp - 0x124]
lea ecx, [ebp - 0x90]
push dword [ebp - 0x128]
push eax
call fcn.100169ba
push ebx
push 0x80
lea eax, [ebp - 0x90]
push eax
push ebx
push dword [0x10008f14]
push dword [0x10008f10]
call dword [sym.imp.ntdll.dll_RtlPublishWnfStateData]
call fcn.10021d0c
ret
xor ebx, ebx
push ebx
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov dword [ebp - 0x130], eax
jmp 0x100168ec
mov dword [ebp - 0x10c], ebx
lea eax, [ebp - 0x10c]
mov dword [ebp - 4], ebx
push eax
push 0x10008ba8
push 1
push ebx
push 0x10008ca8
call dword [sym.imp.api_ms_win_core_com_l1_1_1.dll_CoCreateInstance]
test eax, eax
js 0x10027500
mov eax, dword [ebp - 0x10c]
lea edx, [ebp - 0x134]
push edx
push eax
mov ecx, dword [eax]
mov esi, dword [ecx + 0xc]
mov ecx, esi
call dword [0x100614f4]
call esi
test eax, eax
js 0x10027500
lea ecx, [ebp - 0xd8]
call fcn.1002ed8a
xor ecx, ecx
test al, al
setne cl
and dword [ebp - 0x118], 0
movzx ebx, cx
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x118]
mov eax, dword [ebp - 0x10c]
push ecx
lea ecx, [ebp - 0xd0]
push ecx
mov esi, dword [eax]
push eax
mov ecx, dword [esi + 0x2c]
call dword [0x100614f4]
call dword [esi + 0x2c]
mov edi, ebx
test eax, eax
js 0x100274cb
and dword [ebp - 0x120], 0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x120]
mov eax, dword [ebp - 0x118]
push ecx
push 0x100088dc
push 0x10007f04
mov esi, dword [eax]
push eax
mov ecx, dword [esi + 0x14]
call dword [0x100614f4]
call dword [esi + 0x14]
test eax, eax
js 0x10027403
mov eax, dword [ebp - 0x120]
test eax, eax
jne 0x10027379
jmp 0x10027403
and dword [ebp - 0x110], 0
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x110]
mov esi, dword [eax]
push ecx
push 0x100088dc
push eax
mov ecx, dword [esi]
call dword [0x100614f4]
call dword [esi]
mov edi, ebx
test eax, eax
js 0x100273e5
mov eax, dword [ebp - 0x110]
test eax, eax
jne 0x100273af
jmp 0x100273eb
and dword [ebp - 0x12c], 0
lea ecx, [ebp - 0x12c]
mov esi, dword [eax]
push ecx
lea ecx, [ebp - 0xd8]
push ecx
mov ecx, dword [esi + 0x2c]
push eax
call dword [0x100614f4]
call dword [esi + 0x2c]
mov edi, ebx
test eax, eax
js 0x100273e5
cmp dword [ebp - 0x12c], 0
je 0x100273e5
xor edi, edi
inc edi
mov eax, dword [ebp - 0x110]
mov byte [ebp - 4], 2
test eax, eax
je 0x10027403
mov ecx, dword [eax]
push eax
mov esi, dword [ecx + 8]
mov ecx, esi
call dword [0x100614f4]
call esi
xor ebx, ebx
mov dword [ebp - 0x11c], ebx
mov dword [ebp - 0x114], ebx
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x114]
mov eax, dword [ebp - 0x118]
push ecx
push 0x100088cc
push 0x10007f04
mov esi, dword [eax]
push eax
mov ecx, dword [esi + 0x14]
call dword [0x100614f4]
call dword [esi + 0x14]
test eax, eax
js 0x10027491
mov eax, dword [ebp - 0x114]
test eax, eax
je 0x10027491
mov esi, dword [eax]
lea ecx, [ebp - 0x11c]
push ecx
push 0x100088cc
push eax
mov ecx, dword [esi]
call dword [0x100614f4]
call dword [esi]
test eax, eax
js 0x10027491
cmp dword [ebp - 0x114], ebx
je 0x10027491
mov eax, dword [ebp - 0x11c]
lea ecx, [ebp - 0x124]
push ecx
lea ecx, [ebp - 0x128]
push ecx
mov esi, dword [eax]
push eax
mov ecx, dword [esi + 0x10]
call dword [0x100614f4]
call dword [esi + 0x10]
lea ecx, [ebp - 0x114]
call fcn.100162b1
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x11c]
test eax, eax
je 0x100274ba
mov ecx, dword [eax]
push eax
mov esi, dword [ecx + 8]
mov ecx, esi
call dword [0x100614f4]
call esi
lea ecx, [ebp - 0x120]
mov byte [ebp - 4], 1
call fcn.100162b1
jmp 0x100274cd
xor ebx, ebx
mov eax, dword [ebp - 0x10c]
push eax
mov ecx, dword [eax]
mov esi, dword [ecx + 0x10]
mov ecx, esi
call dword [0x100614f4]
call esi
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x118]
test eax, eax
je 0x10027500
mov ecx, dword [eax]
push eax
mov esi, dword [ecx + 8]
mov ecx, esi
call dword [0x100614f4]
call esi
or dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x10c]
test eax, eax
je 0x10016945
mov ecx, dword [eax]
push eax
mov esi, dword [ecx + 8]
mov ecx, esi
call dword [0x100614f4]
call esi
jmp 0x10016945