Function at 0x4222e0
Capabilities:
Get keyboard layout

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [ebp - 0x28], ecx
mov ecx, dword [ebp - 0x28]
call fcn.004d80ec
mov ecx, dword [0x584fc0]
call fcn.004e2d7f
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x14]
push eax
push 0xcd
mov ecx, dword [ebp - 0x28]
call fcn.004dee78
mov ecx, eax
call fcn.00402af0
push 0x5c
push 0
mov ecx, dword [ebp - 0x28]
add ecx, 0x98
push ecx
call fcn.00504b10
add esp, 0xc
mov dword [ebp - 4], 0
push 0x536cb0
mov edx, dword [ebp - 0x28]
add edx, 0xb4
push edx
call fcn.00504ae3
add esp, 8
mov eax, dword [ebp - 0x28]
mov byte [eax + 0xaf], 0x86
mov ecx, dword [ebp - 8]
sub ecx, dword [ebp - 0x10]
sub ecx, 8
mov edx, dword [ebp - 0x28]
mov dword [edx + 0x98], ecx
mov eax, dword [ebp - 0x28]
add eax, 0x98
push eax
mov ecx, dword [ebp - 0x28]
add ecx, 0x80
call fcn.004228b0
push 0x5c
push 0
mov ecx, dword [ebp - 0x28]
add ecx, 0xf4
push ecx
call fcn.00504b10
add esp, 0xc
push 0x536cd0
mov edx, dword [ebp - 0x28]
add edx, 0x110
push edx
call fcn.00504ae3
add esp, 8
mov eax, dword [ebp - 0x28]
mov byte [eax + 0x10b], 0x88
mov ecx, dword [ebp - 8]
sub ecx, dword [ebp - 0x10]
sub ecx, 8
mov edx, dword [ebp - 0x28]
mov dword [edx + 0xf4], ecx
mov eax, dword [ebp - 0x28]
add eax, 0xf4
push eax
mov ecx, dword [ebp - 0x28]
add ecx, 0x88
call fcn.004228b0
push 0x5c
push 0
mov ecx, dword [ebp - 0x28]
add ecx, 0x150
push ecx
call fcn.00504b10
add esp, 0xc
push 0x536cf0
mov edx, dword [ebp - 0x28]
add edx, 0x16c
push edx
call fcn.00504ae3
add esp, 8
mov eax, dword [ebp - 0x28]
mov byte [eax + 0x167], 0x80
mov ecx, dword [ebp - 8]
sub ecx, dword [ebp - 0x10]
sub ecx, 8
mov edx, dword [ebp - 0x28]
mov dword [edx + 0x150], ecx
mov eax, dword [ebp - 0x28]
add eax, 0x150
push eax
mov ecx, dword [ebp - 0x28]
add ecx, 0x90
call fcn.004228b0
mov ecx, dword [ebp - 0x28]
movzx edx, byte [ecx + 0x1ac]
test edx, edx
je 0x422525
cmp dword [0x57ac10], 0
jne 0x422482
mov eax, dword [ebp - 0x28]
add eax, 0x98
push eax
mov ecx, dword [ebp - 0x28]
add ecx, 0x80
call fcn.004ca160
push eax
push 0x30
push 0xcd
mov ecx, dword [ebp - 0x28]
call fcn.004deef5
jmp 0x4224aa
mov ecx, dword [ebp - 0x28]
add ecx, 0xf4
push ecx
mov ecx, dword [ebp - 0x28]
add ecx, 0x88
call fcn.004ca160
push eax
push 0x30
push 0xcd
mov ecx, dword [ebp - 0x28]
call fcn.004deef5
push 0
push 0x1e
push 0xc5
push 0xcd
mov ecx, dword [ebp - 0x28]
call fcn.004deef5
cmp dword [0x57ac10], 0
jne 0x4224dd
push 0x536cfc
push 0x499
mov ecx, dword [ebp - 0x28]
call fcn.004def25
jmp 0x4224ef
push 0x536d18
push 0x499
mov ecx, dword [ebp - 0x28]
call fcn.004def25
cmp dword [0x57c264], 0
je 0x422520
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + 0x68]
push eax
mov ecx, dword [ebp - 0x18]
call fcn.0047e0a0
cmp dword [0x57ad5c], 0
je 0x422520
push 1
mov ecx, dword [ebp - 0x28]
push ecx
mov ecx, 0x57a0d4
call fcn.00406670
jmp 0x4226c0
mov edx, dword [ebp - 0x28]
add edx, 0x150
push edx
mov ecx, dword [ebp - 0x28]
add ecx, 0x90
call fcn.004ca160
push eax
push 0x30
push 0xcd
mov ecx, dword [ebp - 0x28]
call fcn.004deef5
push 0
push 0x28
push 0xc5
push 0xcd
mov ecx, dword [ebp - 0x28]
call fcn.004deef5
push 0x57c3a8
mov ecx, 0x57a0d4
call fcn.00405590
mov ecx, dword [ebp - 0x28]
mov dword [ecx + 0x78], eax
cmp dword [0x57ac10], 0
jne 0x422598
push 0x57c308
mov ecx, 0x57a0d4
call fcn.00405590
mov edx, dword [ebp - 0x28]
mov dword [edx + 0x7c], eax
jmp 0x4225ad
push 0x57c268
mov ecx, 0x57a0d4
call fcn.00405590
mov ecx, dword [ebp - 0x28]
mov dword [ecx + 0x7c], eax
push 0x536d34
push 0x499
mov ecx, dword [ebp - 0x28]
call fcn.004def25
cmp dword [0x57c264], 0
je 0x4226c0
mov edx, dword [ebp - 0x28]
cmp dword [edx + 0x7c], 0
je 0x4226c0
push 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x20]
cmp ecx, dword [eax + 0x78]
je 0x422676
mov ecx, dword [ebp - 0x28]
call fcn.004137d0
push eax
call sub.IMM32.dll_ImmGetContext
mov dword [ebp - 0x1c], eax
mov edx, dword [ebp - 0x1c]
push edx
call sub.IMM32.dll_ImmGetOpenStatus
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
je 0x422621
push 0
mov eax, dword [ebp - 0x1c]
push eax
call sub.IMM32.dll_ImmSetOpenStatus
mov ecx, dword [ebp - 0x1c]
push ecx
mov ecx, dword [ebp - 0x28]
call fcn.004137d0
push eax
call sub.IMM32.dll_ImmReleaseContext
push 8
mov edx, dword [ebp - 0x28]
mov eax, dword [edx + 0x78]
push eax
call dword [sym.imp.USER32.dll_ActivateKeyboardLayout]
mov ecx, dword [ebp - 0x28]
call fcn.004137d0
push eax
call sub.IMM32.dll_ImmGetContext
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x24], 0
je 0x422664
push 1
mov ecx, dword [ebp - 0x1c]
push ecx
call sub.IMM32.dll_ImmSetOpenStatus
mov edx, dword [ebp - 0x1c]
push edx
mov ecx, dword [ebp - 0x28]
call fcn.004137d0
push eax
call sub.IMM32.dll_ImmReleaseContext
cmp dword [0x57ad5c], 0
je 0x4226c0
mov ecx, dword [ebp - 0x28]
call fcn.004137d0
push eax
call sub.IMM32.dll_ImmGetContext
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x4226c0
mov eax, dword [ebp - 0x1c]
push eax
call sub.IMM32.dll_ImmGetOpenStatus
test eax, eax
jne 0x4226ae
push 1
mov ecx, dword [ebp - 0x1c]
push ecx
call sub.IMM32.dll_ImmSetOpenStatus
mov edx, dword [ebp - 0x1c]
push edx
mov ecx, dword [ebp - 0x28]
call fcn.004137d0
push eax
call sub.IMM32.dll_ImmReleaseContext
mov eax, 1
mov esp, ebp
pop ebp
ret