Hashem works out all things for Himself, indeed, even the rasha (wicked) for the Yom Ra'ah (day of evil).