When an evil spirit comes into the company of good ones, it usually results in such a confusion of directions that the good spirits hardly know where their east is. This is an event I have often noticed, and I have heard about it from spirits who complained about it
Evil spirits sometimes seem to be oriented to heaven’s directions, at which time they have intelligence and a grasp of what is true, but no affection for what is good; so as soon as they turn back toward their own directions, they are without intelligence or any grasp of what is true. They then say that the true things they had heard and understood are not true but false, and even want false things to be true. I have been told about this kind of turning, specifically that for evil people the intellectual faculty can be turned in this way, but not the voluntary faculty. I have also been told that this is provided by the Lord to the end that everyone may have the ability to see and acknowledge what is true, but that no one will accept it except people who are focused on what is good, since the good—never the evil—is what accepts truths.
Further, it is similar with us, so that we can be corrected by means of truths, though the extent to which we are corrected depends on our focus on what is good. This is why we can be turned toward the Lord in much the same way. However, if we are engaged in evil in the conduct of our lives, we immediately turn back again and justify within ourselves the false rationalizations of our evil over against the truths that we have understood and seen. This happens when we think within ourselves, on the basis of our deeper inclinations.
from Heaven and Hell, Sections 151, 152