Function at 0x1006459
Capabilities:
Get keyboard layout

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x4b8
mov eax, dword [0x102cd74]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
push edi
push 4
push eax
mov dword [ebp - 0x48c], eax
call dword [sym.imp.USER32.dll_GetParent]
push eax
call dword [sym.imp.USER32.dll_GetWindow]
mov esi, dword [sym.imp.USER32.dll_GetKeyboardLayoutList]
xor edi, edi
push edi
push edi
mov dword [ebp - 0x47c], eax
call esi
mov dword [ebp - 0x474], eax
cmp eax, edi
je 0x1006939
cmp eax, 0x3fff
jae 0x1006939
shl eax, 2
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x488], eax
cmp eax, edi
je 0x1006939
push ebx
push eax
push dword [ebp - 0x474]
xor ebx, ebx
call esi
xor esi, esi
mov dword [ebp - 0x478], edi
cmp dword [ebp - 0x474], edi
jbe 0x1006565
mov ecx, dword [ebp - 0x478]
mov eax, dword [ebp - 0x488]
mov eax, dword [eax + ecx*4]
push eax
mov dword [ebp - 0x470], eax
call sub.IMM32.dll_ImmIsIME
test eax, eax
je 0x1006547
xor eax, eax
mov word [ebp - 0x46c], ax
lea eax, [ebp - 0x46c]
push eax
push 0x1003
push edi
push dword [ebp - 0x470]
call sub.IMM32.dll_ImmEscapeW
test eax, eax
je 0x1006547
cmp word [ebp - 0x46c], di
je 0x1006547
mov eax, dword [ebp - 0x470]
mov ecx, dword [ebp - 0x488]
mov dword [ecx + esi*4], eax
inc esi
inc dword [ebp - 0x478]
mov eax, dword [ebp - 0x478]
cmp eax, dword [ebp - 0x474]
jb 0x10064ea
mov dword [ebp - 0x470], esi
cmp esi, edi
jne 0x10065b4
mov esi, dword [sym.imp.USER32.dll_LoadStringW]
push 0x20
lea eax, [ebp - 0x44]
push eax
push 0xef69
push dword [0x102cde8]
call esi
push 0x100
lea eax, [ebp - 0x264]
push eax
push 0xef6a
push dword [0x102cde8]
call esi
push edi
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x264]
push eax
push dword [ebp - 0x47c]
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x1006928
mov eax, esi
imul eax, eax, 0x4c
add eax, 0x1c
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, eax
cmp ebx, edi
jne 0x10065f7
mov esi, dword [sym.imp.USER32.dll_LoadStringW]
push 0x20
lea eax, [ebp - 0x44]
push eax
push 0xef6b
push dword [0x102cde8]
call esi
push 0x100
lea eax, [ebp - 0x264]
push eax
push 0xef6c
jmp 0x100658f
mov dword [ebx + 0xc], esi
lea esi, [ebx + 0x1c]
mov dword [ebp - 0x478], edi
cmp dword [ebp - 0x470], edi
jbe 0x1006697
lea eax, [esi + 8]
mov dword [ebp - 0x474], eax
mov ecx, dword [ebp - 0x478]
mov eax, dword [ebp - 0x488]
mov eax, dword [eax + ecx*4]
push edi
push 0x1005
push edi
push eax
mov dword [esi], eax
call sub.IMM32.dll_ImmEscapeW
cmp eax, edi
jne 0x100663f
dec dword [ebx + 0xc]
jmp 0x1006683
add eax, eax
cmp eax, 0x1a
ja 0x100663a
push dword [ebp - 0x474]
push 0x1006
push edi
push dword [esi]
call sub.IMM32.dll_ImmEscapeW
test eax, eax
je 0x100663a
mov eax, dword [ebp - 0x474]
xor ecx, ecx
push eax
mov word [eax + 0x1e], cx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [ebp - 0x474]
add esi, 0x4c
add dword [ebp - 0x474], 0x4c
mov dword [ecx + 0x20], eax
inc dword [ebp - 0x478]
mov eax, dword [ebp - 0x478]
cmp eax, dword [ebp - 0x470]
jb 0x1006618
cmp dword [ebx + 0xc], edi
jne 0x10066eb
mov esi, dword [sym.imp.USER32.dll_LoadStringW]
push 0x20
lea eax, [ebp - 0x44]
push eax
push 0xef69
push dword [0x102cde8]
call esi
push 0x100
lea eax, [ebp - 0x264]
push eax
push 0xef6a
push dword [0x102cde8]
call esi
push edi
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x264]
push eax
push dword [ebp - 0x47c]
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x100691a
push 0x10
lea eax, [ebp - 0x64]
push eax
push 0xef66
push dword [0x102cde8]
call dword [sym.imp.USER32.dll_LoadStringW]
push edi
call dword [sym.imp.USER32.dll_GetDC]
mov esi, eax
lea eax, [ebp - 0x484]
push eax
lea eax, [ebp - 0x64]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
lea eax, [ebp - 0x64]
push eax
push esi
call dword [sym.imp.GDI32.dll_GetTextExtentPointW]
push esi
push edi
call dword [sym.imp.USER32.dll_ReleaseDC]
lea eax, [ebp - 0x49c]
push eax
push dword [ebp - 0x48c]
call dword [sym.imp.USER32.dll_GetWindowRect]
mov eax, dword [ebp - 0x490]
sub eax, dword [ebp - 0x498]
mov ecx, dword [ebp - 0x480]
cdq
add ecx, ecx
idiv ecx
mov esi, eax
mov eax, dword [ebx + 0xc]
cmp eax, esi
ja 0x1006765
mov esi, eax
lea eax, [esi + 1]
shl eax, 5
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ecx, eax
mov dword [ebp - 0x470], ecx
cmp ecx, edi
jne 0x10067b2
mov esi, dword [sym.imp.USER32.dll_LoadStringW]
push 0x20
lea eax, [ebp - 0x44]
push eax
push 0xef6b
push dword [0x102cde8]
mov dword [ebx + 0xc], edi
call esi
push 0x100
lea eax, [ebp - 0x264]
push eax
push 0xef6c
jmp 0x10066c6
mov dword [ecx], edi
mov dword [ecx + 4], esi
mov eax, dword [ebp - 0x484]
mov dword [ecx + 8], eax
mov eax, dword [ebp - 0x480]
mov dword [ecx + 0xc], eax
cmp dword [ebx + 0xc], esi
jbe 0x1006872
mov eax, dword [ebp - 0x490]
sub eax, dword [ebp - 0x498]
push edi
push dword [0x102cde8]
push edi
push dword [ebp - 0x48c]
push eax
push dword [ebp - 0x484]
mov eax, dword [ebp - 0x494]
sub eax, dword [ebp - 0x49c]
push edi
sub eax, dword [ebp - 0x484]
push eax
push 0x50000001
push edi
push 0x1001970
push edi
call dword [sym.imp.USER32.dll_CreateWindowExW]
mov ecx, dword [ebp - 0x470]
mov dword [ecx + 0x1c], eax
mov ecx, dword [ebx + 0xc]
lea ecx, [ecx + esi - 2]
push edi
mov dword [ebp - 0x4ac], ecx
lea ecx, [ebp - 0x4b8]
push ecx
push 2
push eax
mov dword [ebp - 0x4b8], 0x1c
mov dword [ebp - 0x4b4], 0x17
mov dword [ebp - 0x4b0], edi
mov dword [ebp - 0x4a8], esi
mov dword [ebp - 0x4a4], edi
mov dword [ebp - 0x4a0], edi
call dword [sym.imp.USER32.dll_SetScrollInfo]
mov ecx, dword [ebp - 0x470]
cmp esi, edi
jbe 0x100690b
mov dword [ebp - 0x470], 1
lea eax, [ecx + 0x30]
mov dword [ebp - 0x47c], esi
mov edx, dword [ebp - 0x484]
mov dword [eax - 0x10], edx
mov edx, dword [ebp - 0x470]
imul edx, dword [ebp - 0x480]
shr edx, 1
sub edx, 3
mov dword [eax - 0xc], edx
mov edx, dword [ebp - 0x484]
imul edx, edx, 6
add edx, dword [eax - 0x10]
add dword [ebp - 0x470], 4
mov dword [eax - 8], edx
mov esi, dword [ebp - 0x480]
mov edx, dword [eax - 0xc]
lea edx, [edx + esi + 6]
mov dword [eax - 4], edx
mov edx, dword [eax - 8]
add edx, dword [ebp - 0x484]
mov dword [eax], edx
mov edx, dword [eax - 0xc]
mov dword [eax + 4], edx
mov edx, dword [ebp - 0x484]
imul edx, edx, 6
add edx, dword [eax]
add eax, 0x20
dec dword [ebp - 0x47c]
mov dword [eax - 0x18], edx
mov edx, dword [eax - 0x1c]
mov esi, dword [ebp - 0x480]
lea edx, [edx + esi + 6]
mov dword [eax - 0x14], edx
jne 0x100688d
push ecx
push 4
push dword [ebp - 0x48c]
call dword [sym.imp.USER32.dll_SetWindowLongW]
cmp dword [ebx + 0xc], edi
jne 0x1006928
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor ebx, ebx
push dword [ebp - 0x488]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, ebx
pop ebx
jmp 0x100693b
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.01026cc5
leave
ret 4