Function at 0x4ecf60
Capabilities:
Get keyboard layout

Disassembly:
sub esp, 0x10
mov eax, dword [0x681024]
test eax, eax
mov dword [esp + 8], 0
jne 0x4ecf79
call fcn.004ec5e0
cmp dword [0x681024], 2
push ebx
push ebp
push esi
push edi
jne 0x4ed2ec
mov eax, dword [0x681038]
test eax, eax
je 0x4ed2ec
mov eax, dword [esp + 0x24]
push eax
call dword [0x681028]
mov ebp, eax
test ebp, ebp
mov dword [esp + 0x1c], ebp
je 0x4ed2ec
mov cl, byte [esp + 0x2c]
neg cl
push 0
push 0
sbb ecx, ecx
and ecx, 0x7f8
add ecx, 8
mov edi, ecx
push edi
push ebp
call dword [0x681038]
mov ebx, eax
mov esi, ebx
shr esi, 1
lea edx, [esi + esi + 2]
push edx
call fcn.005ddbe0
add esp, 4
test eax, eax
mov dword [esp + 0x18], eax
je 0x4ed2ec
push ebx
mov ebx, eax
push ebx
push edi
push ebp
call dword [0x681038]
mov al, byte [esp + 0x2c]
test al, al
mov word [ebx + esi*2], 0
je 0x4ed2e0
mov ecx, dword [esp + 0x28]
call fcn.004b5360
cmp eax, 7
jle 0x4ed2e0
push 0
push 0
push 0x200
push ebp
call dword [0x681038]
mov esi, eax
test esi, esi
je 0x4ed2e0
mov ebx, esi
shr ebx, 1
lea eax, [ebx + ebx + 2]
push eax
call fcn.005ddbe0
mov ebp, eax
add esp, 4
test ebp, ebp
mov dword [esp + 0x10], ebp
je 0x4ed2dc
mov ecx, dword [esp + 0x1c]
push esi
push ebp
push 0x200
push ecx
call dword [0x681038]
cmp ebx, 1
mov word [ebp + ebx*2], 0
jne 0x4ed09a
cmp word [ebp], 0x3000
jne 0x4ed09a
mov edx, dword [esp + 0x18]
push edx
call fcn.005ddc00
push ebp
call fcn.005ddc00
add esp, 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret
call fcn.004ec6f0
cmp eax, 0x3a4
jne 0x4ed240
call dword [0x5f626c]
push eax
call dword [0x5f64c4]
mov ecx, dword [esp + 0x24]
movzx eax, ax
push ecx
mov dword [esp + 0x18], eax
call fcn.004ec7e0
add esp, 4
mov edi, 0x601af4
mov esi, eax
mov ecx, 0x12
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x4ed0e4
mov ebp, 0x800000
jmp 0x4ed131
mov edi, 0x601ab0
mov esi, eax
mov ecx, 0x12
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x4ed0fd
mov ebp, 0x900000
jmp 0x4ed131
mov edi, 0x601adc
mov esi, eax
mov ecx, 0x17
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x4ed116
mov ebp, 0xa00000
jmp 0x4ed131
mov esi, eax
mov edi, 0x601ac4
mov ecx, 0x17
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x4ed240
mov ebp, 0x200000
call fcn.004eee60
test al, al
push 0
je 0x4ed19b
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
push 0
push ebx
push ecx
push ebp
push edx
call dword [0x5f6260]
mov edi, eax
lea eax, [edi + edi + 2]
push eax
call fcn.005ddbe0
mov esi, eax
add esp, 4
test esi, esi
je 0x4ed23c
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
push edi
push esi
push ebx
push ecx
push ebp
push edx
call dword [0x5f6260]
push 0
push esi
mov word [esi + edi*2], 0
call fcn.004da7a0
push esi
mov edi, eax
call fcn.005ddc00
add esp, 0xc
jmp 0x4ed238
mov eax, dword [esp + 0x14]
push eax
call fcn.004da7a0
mov esi, eax
add esp, 8
test esi, esi
je 0x4ed23c
push 0
push esi
call fcn.005046b0
push esi
mov ebx, eax
call fcn.005ddc00
add esp, 0xc
test ebx, ebx
je 0x4ed23c
mov eax, ebx
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4ed1d0
mov ecx, dword [esp + 0x14]
push 0
push 0
sub eax, edx
push eax
push ebx
push ebp
push ecx
call dword [0x5f6264]
mov edi, eax
lea edx, [edi + 1]
push edx
call fcn.005ddbe0
mov esi, eax
add esp, 4
test esi, esi
je 0x4ed23c
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4ed204
push edi
push esi
sub eax, edx
push eax
mov eax, dword [esp + 0x20]
push ebx
push ebp
push eax
call dword [0x5f6264]
push 0
push 0
push 6
push esi
mov byte [esi + edi], 0
call fcn.004da890
push esi
mov edi, eax
call fcn.005ddc00
add esp, 0x14
test edi, edi
jne 0x4ed257
mov ebp, dword [esp + 0x10]
push 0
push ebp
call fcn.004da7a0
mov edi, eax
add esp, 8
test edi, edi
je 0x4ed2d3
jmp 0x4ed25b
mov ebp, dword [esp + 0x10]
mov esi, dword [esp + 0x28]
mov ecx, dword [esi + 0x20]
test ecx, ecx
je 0x4ed277
mov eax, dword [esi + 0x74c]
test eax, eax
je 0x4ed277
push eax
push edi
call fcn.00551a10
push 0x405bc0
push 1
push 4
lea ecx, [esp + 0x20]
push ecx
call entry0
mov ecx, esi
call fcn.004b5360
push eax
push edi
push esi
lea ecx, [esp + 0x20]
call fcn.004768b0
push 0
push 1
lea edx, [esp + 0x1c]
push edx
push str.onIMEComposition
push str.System.IME
mov ecx, esi
call fcn.004c8400
push edi
call fcn.005ddc00
add esp, 4
push 0x401400
push 1
push 4
lea eax, [esp + 0x20]
push eax
call fcn.00401030
push ebp
call fcn.005ddc00
add esp, 4
mov ebp, dword [esp + 0x1c]
mov ecx, dword [esp + 0x24]
push ebp
push ecx
call dword [0x68102c]
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret