Function at 0x1006cc6
Capabilities:
Get keyboard layout

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x32c
mov eax, dword [0x1029fe8]
mov edx, dword [ebp + 0x14]
push ebx
push esi
mov esi, dword [sym.imp.USER32.dll_GetKeyboardLayoutList]
push edi
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x2ec], eax
push 0x14
pop ecx
xor eax, eax
mov ebx, 0x102a000
inc eax
mov edi, ebx
rep stosd dword es:[edi], eax
xor edi, edi
push edi
push edi
mov dword [0x102a050], edx
call esi
mov dword [ebp - 0x2f4], eax
shl eax, 2
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
cmp eax, edi
mov dword [ebp - 0x2f8], eax
jne 0x1006d54
mov esi, dword [sym.imp.USER32.dll_LoadStringW]
push 0x20
lea eax, [ebp - 0x44]
push eax
push 0xef6b
push dword [0x102a050]
call esi
push 0x100
lea eax, [ebp - 0x2e4]
push eax
push 0xef6c
jmp 0x1006e7a
push eax
push dword [ebp - 0x2f4]
call esi
cmp dword [ebp - 0x2f4], edi
mov dword [ebp - 0x2e8], edi
mov dword [ebp - 0x2f0], edi
jbe 0x1006e3c
mov eax, dword [ebp - 0x2f8]
sub eax, ebx
mov dword [ebp - 0x2fc], eax
mov esi, 0x1003
jmp 0x1006d90
mov eax, dword [ebp - 0x2fc]
mov ecx, dword [ebp - 0x2e8]
mov ebx, dword [eax + ecx*4 + 0x102a000]
push ebx
call sub.IMM32.dll_ImmIsIME
test eax, eax
je 0x1006e24
lea eax, [ebp - 0xe4]
push eax
push esi
push edi
push ebx
mov word [ebp - 0xe4], di
call sub.IMM32.dll_ImmEscapeW
cmp eax, edi
je 0x1006e24
cmp word [ebp - 0xe4], di
jne 0x1006dec
mov ecx, dword [ebp - 0x2e8]
cmp dword [ecx*4 + 0x102a000], edi
je 0x1006de8
push edi
push 3
push dword [ebp - 0x2ec]
push ebx
call sub.IMM32.dll_ImmConfigureIMEW
cmp eax, edi
je 0x1006e24
cmp word [ebp - 0xe4], di
mov eax, dword [ebp - 0x2e8]
mov dword [eax*4 + 0x102a000], edi
jne 0x1006e1e
lea eax, [ebp - 0xe4]
push eax
push esi
push edi
push ebx
call sub.IMM32.dll_ImmEscapeW
test eax, eax
je 0x1006e24
cmp word [ebp - 0xe4], di
je 0x1006e24
inc dword [ebp - 0x2f0]
inc dword [ebp - 0x2e8]
mov eax, dword [ebp - 0x2e8]
cmp eax, dword [ebp - 0x2f4]
jb 0x1006d8a
push dword [ebp - 0x2f8]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
cmp dword [ebp - 0x2f0], edi
jne 0x1006e9f
mov esi, dword [sym.imp.USER32.dll_LoadStringW]
push 0x20
lea eax, [ebp - 0x44]
push eax
push 0xef69
push dword [0x102a050]
call esi
push 0x100
lea eax, [ebp - 0x2e4]
push eax
push 0xef6a
push dword [0x102a050]
call esi
push edi
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x2e4]
push eax
push dword [ebp - 0x2ec]
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x1006f7c
lea eax, [ebp - 0x32c]
push eax
mov ebx, 0x100187c
push ebx
push dword [0x102a050]
call dword [sym.imp.USER32.dll_GetClassInfoExW]
test eax, eax
jne 0x1006f36
mov eax, dword [0x102a050]
push 0x7f00
push edi
mov dword [ebp - 0x32c], 0x30
mov dword [ebp - 0x328], 3
mov dword [ebp - 0x324], 0x10066fe
mov dword [ebp - 0x320], edi
mov dword [ebp - 0x31c], 8
mov dword [ebp - 0x318], eax
mov dword [ebp - 0x314], edi
call dword [sym.imp.USER32.dll_LoadCursorW]
mov dword [ebp - 0x310], eax
lea eax, [ebp - 0x32c]
push eax
mov dword [ebp - 0x30c], 0x10
mov dword [ebp - 0x308], edi
mov dword [ebp - 0x304], ebx
mov dword [ebp - 0x300], edi
call dword [sym.imp.USER32.dll_RegisterClassExW]
push edi
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
movzx ecx, word [ebp + 0xc]
mov esi, eax
mov eax, dword [ebp + 0x10]
neg eax
sbb eax, eax
and eax, 0xffff
movzx eax, ax
shl eax, 0x10
or eax, ecx
push eax
push 0x1006adf
push dword [ebp - 0x2ec]
push 0x100188c
push dword [0x102a050]
call dword [sym.imp.USER32.dll_DialogBoxParamW]
push edi
push esi
call dword [sym.imp.USER32.dll_ActivateKeyboardLayout]
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.01023881
leave
ret 0x10