In spite of evil, God is working out his good purposes. It's in the Bible, Genesis 50:20, TLB. "As far as I am concerned, God turned into good what you meant for evil."
God can use all things, even the bad, for a good purpose. It's in the Bible, Romans 8:28, NIV. "And we know that in all things God works for the good of those who love Him, who have been called according to His purpose."