Cheat Engine (CE) itself is legal, open-source software (GPL v3) for memory scanning/debugging. Version 5.6 is very old (2009); current is 7.5+.
Recommendation: Download latest version from official site. Use only in offline/single-player. Never run with anti-cheat games active.