Function at 0x4dd540
Capabilities:
Get keyboard layout

Disassembly:
sub esp, 0x10
mov eax, dword [0x634ba4]
test eax, eax
mov dword [esp + 8], 0
jne 0x4dd559
call fcn.004dcbc0
cmp dword [0x634ba4], 2
push ebx
push ebp
push esi
push edi
jne 0x4dd8cc
mov eax, dword [0x634bb8]
test eax, eax
je 0x4dd8cc
mov eax, dword [esp + 0x24]
push eax
call dword [0x634ba8]
mov ebp, eax
test ebp, ebp
mov dword [esp + 0x1c], ebp
je 0x4dd8cc
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 [0x634bb8]
mov ebx, eax
mov esi, ebx
shr esi, 1
lea edx, [esi + esi + 2]
push edx
call fcn.0043f080
add esp, 4
test eax, eax
mov dword [esp + 0x18], eax
je 0x4dd8cc
push ebx
mov ebx, eax
push ebx
push edi
push ebp
call dword [0x634bb8]
mov al, byte [esp + 0x2c]
test al, al
mov word [ebx + esi*2], 0
je 0x4dd8c0
mov ecx, dword [esp + 0x28]
call fcn.004a7100
cmp eax, 7
jle 0x4dd8c0
push 0
push 0
push 0x200
push ebp
call dword [0x634bb8]
mov esi, eax
test esi, esi
je 0x4dd8c0
mov ebx, esi
shr ebx, 1
lea eax, [ebx + ebx + 2]
push eax
call fcn.0043f080
mov ebp, eax
add esp, 4
test ebp, ebp
mov dword [esp + 0x10], ebp
je 0x4dd8bc
mov ecx, dword [esp + 0x1c]
push esi
push ebp
push 0x200
push ecx
call dword [0x634bb8]
cmp ebx, 1
mov word [ebp + ebx*2], 0
jne 0x4dd67a
cmp word [ebp], 0x3000
jne 0x4dd67a
mov edx, dword [esp + 0x18]
push edx
call fcn.0043f0a0
push ebp
call fcn.0043f0a0
add esp, 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret
call fcn.004dccd0
cmp eax, 0x3a4
jne 0x4dd820
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.004dcdc0
add esp, 4
mov edi, 0x5e23cc
mov esi, eax
mov ecx, 0x12
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x4dd6c4
mov ebp, 0x800000
jmp 0x4dd711
mov edi, 0x5e2388
mov esi, eax
mov ecx, 0x12
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x4dd6dd
mov ebp, 0x900000
jmp 0x4dd711
mov edi, 0x5e23b4
mov esi, eax
mov ecx, 0x17
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x4dd6f6
mov ebp, 0xa00000
jmp 0x4dd711
mov esi, eax
mov edi, 0x5e239c
mov ecx, 0x17
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x4dd820
mov ebp, 0x200000
call fcn.004df210
test al, al
push 0
je 0x4dd77b
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.0043f080
mov esi, eax
add esp, 4
test esi, esi
je 0x4dd81c
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.004cadb0
push esi
mov edi, eax
call fcn.0043f0a0
add esp, 0xc
jmp 0x4dd818
mov eax, dword [esp + 0x14]
push eax
call fcn.004cadb0
mov esi, eax
add esp, 8
test esi, esi
je 0x4dd81c
push 0
push esi
call fcn.004f3800
push esi
mov ebx, eax
call fcn.0043f0a0
add esp, 0xc
test ebx, ebx
je 0x4dd81c
mov eax, ebx
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4dd7b0
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.0043f080
mov esi, eax
add esp, 4
test esi, esi
je 0x4dd81c
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4dd7e4
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.004caea0
push esi
mov edi, eax
call fcn.0043f0a0
add esp, 0x14
test edi, edi
jne 0x4dd837
mov ebp, dword [esp + 0x10]
push 0
push ebp
call fcn.004cadb0
mov edi, eax
add esp, 8
test edi, edi
je 0x4dd8b3
jmp 0x4dd83b
mov ebp, dword [esp + 0x10]
mov esi, dword [esp + 0x28]
mov ecx, dword [esi + 0x20]
test ecx, ecx
je 0x4dd857
mov eax, dword [esi + 0x5a8]
test eax, eax
je 0x4dd857
push eax
push edi
call fcn.00540270
push 0x405b40
push 1
push 4
lea ecx, [esp + 0x20]
push ecx
call fcn.00401000
mov ecx, esi
call fcn.004a7100
push eax
push edi
push esi
lea ecx, [esp + 0x20]
call fcn.0046c3c0
push 0
push 1
lea edx, [esp + 0x1c]
push edx
push str.onIMEComposition
push str.System.IME
mov ecx, esi
call fcn.004b91c0
push edi
call fcn.0043f0a0
add esp, 4
push 0x4013f0
push 1
push 4
lea eax, [esp + 0x20]
push eax
call fcn.00401030
push ebp
call fcn.0043f0a0
add esp, 4
mov ebp, dword [esp + 0x1c]
mov ecx, dword [esp + 0x24]
push ebp
push ecx
call dword [0x634bac]
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret