In the narrations we read
من ذهب انّه له على الآخر فضلاً فهو من المستكبرين
Whoever sees themselves as better than another then they are from the arrogant ones(). Because we are not aware of how in the end a person will end up being before they pass away, we cannot hastily pass a verdict upon them. Many believers have died as immoral people and many immoral people have passed away as believers.
Imam Sadiq peace be upon him, in explaining the above narration describes how magicians whose entire lives were deviant in one moment have faith enter their hearts upon witnessing the miracle of Prophet Moses peace be upon him, and all the threats of Pharaoh were to no avail. Satan worshipped Allahﷻ for six thousand years but in the end deviated, while Hur and Zuhair in Karbala found happiness. So it is possible to leave the path of disbelief and immorality.
 Bihar Al Anwar V70 P226