The Rambam writes [Teshuva 7-8] that when a Rasha does mitzvos they are discarded [טורפין אותן בפניו]. In the Sifrei Chasidus we find that a Rasha's mitzvos all go to the קליפה. Not good.
How does that square with the Chazal [Eicha Rabba Psichta 2] הלואי אותי עזבו ותורתי שמרו והמאור שבה יחזרים למוטב, meaning that as bad as we are we should keep learning and the light of Torah will bring us back??