Function at 0x1007731
Capabilities:
Get keyboard layout

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x32c
mov eax, dword [0x102cd74]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0x14]
push ebx
push esi
mov esi, dword [sym.imp.USER32.dll_GetKeyboardLayoutList]
push edi
mov dword [ebp - 0x2ec], eax
push 0x14
pop ecx
xor eax, eax
mov ebx, 0x102cd98
inc eax
mov edi, ebx
rep stosd dword es:[edi], eax
xor edi, edi
push edi
push edi
mov dword [0x102cde8], edx
call esi
mov dword [ebp - 0x2f4], eax
cmp eax, 0x14
ja 0x10079f7
shl eax, 2
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x2f8], eax
cmp eax, edi
jne 0x10077ea
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 - 0x2e4]
push eax
push 0xef6c
push dword [0x102cde8]
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 0x10079f7
push eax
push dword [ebp - 0x2f4]
call esi
mov dword [ebp - 0x2e8], edi
mov dword [ebp - 0x2f0], edi
cmp dword [ebp - 0x2f4], edi
jbe 0x10078d4
mov eax, dword [ebp - 0x2f8]
sub eax, ebx
mov dword [ebp - 0x2fc], eax
mov esi, 0x1003
jmp 0x1007826
mov eax, dword [ebp - 0x2fc]
mov ecx, dword [ebp - 0x2e8]
mov ebx, dword [eax + ecx*4 + 0x102cd98]
push ebx
call sub.IMM32.dll_ImmIsIME
test eax, eax
je 0x10078bc
xor eax, eax
mov word [ebp - 0xe4], ax
lea eax, [ebp - 0xe4]
push eax
push esi
push edi
push ebx
call sub.IMM32.dll_ImmEscapeW
cmp eax, edi
je 0x10078bc
cmp word [ebp - 0xe4], di
jne 0x1007884
mov ecx, dword [ebp - 0x2e8]
cmp dword [ecx*4 + 0x102cd98], edi
je 0x1007880
push edi
push 3
push dword [ebp - 0x2ec]
push ebx
call sub.IMM32.dll_ImmConfigureIMEW
cmp eax, edi
je 0x10078bc
mov eax, dword [ebp - 0x2e8]
mov dword [eax*4 + 0x102cd98], edi
cmp word [ebp - 0xe4], di
jne 0x10078b6
lea eax, [ebp - 0xe4]
push eax
push esi
push edi
push ebx
call sub.IMM32.dll_ImmEscapeW
test eax, eax
je 0x10078bc
cmp word [ebp - 0xe4], di
je 0x10078bc
inc dword [ebp - 0x2f0]
inc dword [ebp - 0x2e8]
mov eax, dword [ebp - 0x2e8]
cmp eax, dword [ebp - 0x2f4]
jb 0x1007820
push dword [ebp - 0x2f8]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
cmp dword [ebp - 0x2f0], edi
jne 0x1007917
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 - 0x2e4]
push eax
push 0xef6a
jmp 0x10077c5
lea eax, [ebp - 0x32c]
push eax
push dword [section..data]
push dword [0x102cde8]
call dword [sym.imp.USER32.dll_GetClassInfoExW]
test eax, eax
jne 0x10079b3
mov eax, dword [0x102cde8]
push 0x7f00
push edi
mov dword [ebp - 0x32c], 0x30
mov dword [ebp - 0x328], 3
mov dword [ebp - 0x324], 0x1007165
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
mov eax, dword [section..data]
mov dword [ebp - 0x304], eax
lea eax, [ebp - 0x32c]
push eax
mov dword [ebp - 0x30c], 0x10
mov dword [ebp - 0x308], edi
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
shl eax, 0x10
or eax, ecx
push eax
push 0x1007544
push dword [ebp - 0x2ec]
push dword [0x102c004]
push dword [0x102cde8]
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
xor ecx, ebp
pop ebx
call fcn.01026cc5
leave
ret 0x10