The Egg and the Stone 1990
A philosophy teacher finds himself and his ethics surrounded by a corrupt society, and as he's mistaken for an exorcist and fortune-teller. He uses logic and psychological tricks to practice wizardry, until he masters it and controls people, meanwhile losing his ethics.