Function at 0x1005a43
Capabilities:
Get keyboard layout

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x4b8
mov eax, dword [0x1029fe8]
push esi
push edi
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
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 edi, dword [sym.imp.USER32.dll_GetKeyboardLayoutList]
xor esi, esi
push esi
push esi
mov dword [ebp - 0x47c], eax
call edi
mov dword [ebp - 0x474], eax
shl eax, 2
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
cmp eax, esi
mov dword [ebp - 0x488], eax
jne 0x1005aa6
xor eax, eax
jmp 0x1005f1b
push ebx
push eax
push dword [ebp - 0x474]
xor ebx, ebx
call edi
xor edi, edi
cmp dword [ebp - 0x474], esi
mov dword [ebp - 0x478], esi
mov dword [ebp - 0x470], edi
jbe 0x1005b41
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 0x1005b23
lea eax, [ebp - 0x46c]
push eax
push 0x1003
push esi
push dword [ebp - 0x470]
mov word [ebp - 0x46c], si
call sub.IMM32.dll_ImmEscapeW
test eax, eax
je 0x1005b23
cmp word [ebp - 0x46c], si
je 0x1005b23
mov eax, dword [ebp - 0x470]
mov ecx, dword [ebp - 0x488]
mov dword [ecx + edi*4], eax
inc edi
inc dword [ebp - 0x478]
mov eax, dword [ebp - 0x478]
cmp eax, dword [ebp - 0x474]
jb 0x1005ac8
cmp edi, esi
mov dword [ebp - 0x470], edi
jne 0x1005b6d
mov edi, dword [sym.imp.USER32.dll_LoadStringW]
push 0x20
lea eax, [ebp - 0x44]
push eax
push 0xef69
push dword [0x102a050]
call edi
push 0x100
lea eax, [ebp - 0x264]
push eax
push 0xef6a
jmp 0x1005bae
mov eax, edi
imul eax, eax, 0x4c
add eax, 0x1c
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, eax
cmp ebx, esi
jne 0x1005bd3
mov edi, dword [sym.imp.USER32.dll_LoadStringW]
push 0x20
lea eax, [ebp - 0x44]
push eax
push 0xef6b
push dword [0x102a050]
call edi
push 0x100
lea eax, [ebp - 0x264]
push eax
push 0xef6c
push dword [0x102a050]
call edi
push esi
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x264]
push eax
push dword [ebp - 0x47c]
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x1005f0c
cmp dword [ebp - 0x470], esi
mov dword [ebx + 0xc], edi
lea edi, [ebx + 0x1c]
mov dword [ebp - 0x478], esi
jbe 0x1005c71
lea eax, [edi + 8]
mov dword [ebp - 0x474], eax
mov ecx, dword [ebp - 0x478]
mov eax, dword [ebp - 0x488]
mov eax, dword [eax + ecx*4]
push esi
push 0x1005
push esi
push eax
mov dword [edi], eax
call sub.IMM32.dll_ImmEscapeW
cmp eax, esi
je 0x1005c34
add eax, eax
cmp eax, 0x1a
ja 0x1005c34
push dword [ebp - 0x474]
push 0x1006
push esi
push dword [edi]
call sub.IMM32.dll_ImmEscapeW
test eax, eax
jne 0x1005c39
dec dword [ebx + 0xc]
jmp 0x1005c5d
mov eax, dword [ebp - 0x474]
push eax
mov word [eax + 0x1e], si
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [ebp - 0x474]
add edi, 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 0x1005bf4
cmp dword [ebx + 0xc], esi
jne 0x1005ca5
mov edi, dword [sym.imp.USER32.dll_LoadStringW]
push 0x20
lea eax, [ebp - 0x44]
push eax
push 0xef69
push dword [0x102a050]
call edi
push 0x100
lea eax, [ebp - 0x264]
push eax
push 0xef6a
jmp 0x1005d67
push 0x10
lea eax, [ebp - 0x64]
push eax
push 0xef66
push dword [0x102a050]
call dword [sym.imp.USER32.dll_LoadStringW]
push esi
call dword [sym.imp.USER32.dll_GetDC]
mov edi, 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 edi
call dword [sym.imp.GDI32.dll_GetTextExtentPointW]
push edi
push esi
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 edi, eax
mov eax, dword [ebx + 0xc]
cmp eax, edi
ja 0x1005d1f
mov edi, eax
lea eax, [edi + 1]
shl eax, 5
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edx, eax
cmp edx, esi
mov dword [ebp - 0x470], edx
jne 0x1005d8c
mov edi, dword [sym.imp.USER32.dll_LoadStringW]
push 0x20
lea eax, [ebp - 0x44]
push eax
push 0xef6b
push dword [0x102a050]
mov dword [ebx + 0xc], esi
call edi
push 0x100
lea eax, [ebp - 0x264]
push eax
push 0xef6c
push dword [0x102a050]
call edi
push esi
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x264]
push eax
push dword [ebp - 0x47c]
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x1005efe
mov dword [edx], esi
mov dword [edx + 4], edi
mov eax, dword [ebp - 0x484]
mov dword [edx + 8], eax
mov eax, dword [ebp - 0x480]
mov dword [edx + 0xc], eax
cmp dword [ebx + 0xc], edi
jbe 0x1005e4c
mov eax, dword [ebp - 0x490]
sub eax, dword [ebp - 0x498]
push esi
push dword [0x102a050]
push esi
push dword [ebp - 0x48c]
push eax
push dword [ebp - 0x484]
mov eax, dword [ebp - 0x494]
sub eax, dword [ebp - 0x49c]
push esi
sub eax, dword [ebp - 0x484]
push eax
push 0x50000001
push esi
push 0x10018f0
push esi
call dword [sym.imp.USER32.dll_CreateWindowExW]
mov ecx, dword [ebp - 0x470]
mov dword [ecx + 0x1c], eax
mov ecx, dword [ebx + 0xc]
lea ecx, [edi + ecx - 2]
push esi
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], esi
mov dword [ebp - 0x4a8], edi
mov dword [ebp - 0x4a4], esi
mov dword [ebp - 0x4a0], esi
call dword [sym.imp.USER32.dll_SetScrollInfo]
mov edx, dword [ebp - 0x470]
cmp edi, esi
jbe 0x1005eef
mov dword [ebp - 0x470], 1
lea eax, [edx + 0x30]
mov dword [ebp - 0x47c], edi
mov ecx, dword [ebp - 0x484]
mov dword [eax - 0x10], ecx
mov ecx, dword [ebp - 0x470]
imul ecx, dword [ebp - 0x480]
mov edi, dword [eax - 0x10]
shr ecx, 1
sub ecx, 3
mov dword [eax - 0xc], ecx
mov ecx, dword [ebp - 0x484]
lea ecx, [ecx + ecx*2]
lea ecx, [edi + ecx*2]
mov dword [eax - 8], ecx
mov edi, dword [ebp - 0x480]
mov ecx, dword [eax - 0xc]
lea ecx, [edi + ecx + 6]
mov dword [eax - 4], ecx
mov ecx, dword [eax - 8]
add ecx, dword [ebp - 0x484]
add dword [ebp - 0x470], 4
mov dword [eax], ecx
mov ecx, dword [eax - 0xc]
mov edi, dword [eax]
mov dword [eax + 4], ecx
mov ecx, dword [ebp - 0x484]
lea ecx, [ecx + ecx*2]
lea ecx, [edi + ecx*2]
mov dword [eax + 8], ecx
mov ecx, dword [eax + 4]
mov edi, dword [ebp - 0x480]
lea ecx, [ecx + edi + 6]
mov dword [eax + 0xc], ecx
add eax, 0x20
dec dword [ebp - 0x47c]
jne 0x1005e67
push edx
push 4
push dword [ebp - 0x48c]
call dword [sym.imp.USER32.dll_SetWindowLongW]
cmp dword [ebx + 0xc], esi
jne 0x1005f0c
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
mov ecx, dword [ebp - 4]
pop edi
pop esi
call fcn.01023881
leave
ret 4