Function at 0x4dde10
Capabilities:
Get keyboard layout

Disassembly:
sub esp, 0x10
mov eax, dword [0x634a04]
test eax, eax
mov dword [esp + 8], 0
jne 0x4dde29
call fcn.004dd490
cmp dword [0x634a04], 2
push ebx
push ebp
push esi
push edi
jne 0x4de19c
mov eax, dword [0x634a18]
test eax, eax
je 0x4de19c
mov eax, dword [esp + 0x24]
push eax
call dword [0x634a08]
mov ebp, eax
test ebp, ebp
mov dword [esp + 0x1c], ebp
je 0x4de19c
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 [0x634a18]
mov ebx, eax
mov esi, ebx
shr esi, 1
lea edx, [esi + esi + 2]
push edx
call fcn.0043f000
add esp, 4
test eax, eax
mov dword [esp + 0x18], eax
je 0x4de19c
push ebx
mov ebx, eax
push ebx
push edi
push ebp
call dword [0x634a18]
mov al, byte [esp + 0x2c]
test al, al
mov word [ebx + esi*2], 0
je 0x4de190
mov ecx, dword [esp + 0x28]
call fcn.004a76d0
cmp eax, 7
jle 0x4de190
push 0
push 0
push 0x200
push ebp
call dword [0x634a18]
mov esi, eax
test esi, esi
je 0x4de190
mov ebx, esi
shr ebx, 1
lea eax, [ebx + ebx + 2]
push eax
call fcn.0043f000
mov ebp, eax
add esp, 4
test ebp, ebp
mov dword [esp + 0x10], ebp
je 0x4de18c
mov ecx, dword [esp + 0x1c]
push esi
push ebp
push 0x200
push ecx
call dword [0x634a18]
cmp ebx, 1
mov word [ebp + ebx*2], 0
jne 0x4ddf4a
cmp word [ebp], 0x3000
jne 0x4ddf4a
mov edx, dword [esp + 0x18]
push edx
call fcn.0043f020
push ebp
call fcn.0043f020
add esp, 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret
call fcn.004dd5a0
cmp eax, 0x3a4
jne 0x4de0f0
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov ecx, dword [esp + 0x24]
movzx eax, ax
push ecx
mov dword [esp + 0x18], eax
call fcn.004dd690
add esp, 4
mov edi, 0x5e2434
mov esi, eax
mov ecx, 0x12
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x4ddf94
mov ebp, 0x800000
jmp 0x4ddfe1
mov edi, 0x5e23f0
mov esi, eax
mov ecx, 0x12
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x4ddfad
mov ebp, 0x900000
jmp 0x4ddfe1
mov edi, 0x5e241c
mov esi, eax
mov ecx, 0x17
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x4ddfc6
mov ebp, 0xa00000
jmp 0x4ddfe1
mov esi, eax
mov edi, 0x5e2404
mov ecx, 0x17
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x4de0f0
mov ebp, 0x200000
call fcn.004dfb70
test al, al
push 0
je 0x4de04b
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
push 0
push ebx
push ecx
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_LCMapStringW]
mov edi, eax
lea eax, [edi + edi + 2]
push eax
call fcn.0043f000
mov esi, eax
add esp, 4
test esi, esi
je 0x4de0ec
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
push edi
push esi
push ebx
push ecx
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_LCMapStringW]
push 0
push esi
mov word [esi + edi*2], 0
call fcn.004cb710
push esi
mov edi, eax
call fcn.0043f020
add esp, 0xc
jmp 0x4de0e8
mov eax, dword [esp + 0x14]
push eax
call fcn.004cb710
mov esi, eax
add esp, 8
test esi, esi
je 0x4de0ec
push 0
push esi
call fcn.004f42f0
push esi
mov ebx, eax
call fcn.0043f020
add esp, 0xc
test ebx, ebx
je 0x4de0ec
mov eax, ebx
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4de080
mov ecx, dword [esp + 0x14]
push 0
push 0
sub eax, edx
push eax
push ebx
push ebp
push ecx
call dword [sym.imp.KERNEL32.dll_LCMapStringA]
mov edi, eax
lea edx, [edi + 1]
push edx
call fcn.0043f000
mov esi, eax
add esp, 4
test esi, esi
je 0x4de0ec
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4de0b4
push edi
push esi
sub eax, edx
push eax
mov eax, dword [esp + 0x20]
push ebx
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_LCMapStringA]
push 0
push 0
push 6
push esi
mov byte [esi + edi], 0
call fcn.004cb800
push esi
mov edi, eax
call fcn.0043f020
add esp, 0x14
test edi, edi
jne 0x4de107
mov ebp, dword [esp + 0x10]
push 0
push ebp
call fcn.004cb710
mov edi, eax
add esp, 8
test edi, edi
je 0x4de183
jmp 0x4de10b
mov ebp, dword [esp + 0x10]
mov esi, dword [esp + 0x28]
mov ecx, dword [esi + 0x20]
test ecx, ecx
je 0x4de127
mov eax, dword [esi + 0x5a8]
test eax, eax
je 0x4de127
push eax
push edi
call fcn.00540be0
push 0x405b30
push 1
push 4
lea ecx, [esp + 0x20]
push ecx
call fcn.00401000
mov ecx, esi
call fcn.004a76d0
push eax
push edi
push esi
lea ecx, [esp + 0x20]
call fcn.0046c3f0
push 0
push 1
lea edx, [esp + 0x1c]
push edx
push str.onIMEComposition
push str.System.IME
mov ecx, esi
call fcn.004b9a90
push edi
call fcn.0043f020
add esp, 4
push 0x401400
push 1
push 4
lea eax, [esp + 0x20]
push eax
call fcn.00401030
push ebp
call fcn.0043f020
add esp, 4
mov ebp, dword [esp + 0x1c]
mov ecx, dword [esp + 0x24]
push ebp
push ecx
call dword [0x634a0c]
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret