According to scripture, Jesus is revealed to those after His heart. You are after His heart if you hate what is evil Rom 12:9. If you hate what is evil you will sincerely repent Psalm 51:17. If you repent, God judges this depth of intent Jer 17:9-11 and if you pass, He reveals Jesus to you 1 Cor 12:3. So to answer your second question, if anyone does good works and has not found Jesus, their motives are not pure. We must also recall that there are scales. 1 Pet 4:18 says the righteous are barely saved. There are many that will just not make it and many that will just make it. So your question is hard to answer in that only God can truly see and judge the level of intent. What we can safely conclude is two things: 1. Anyone who has not accepted Jesus has not yet passed God's judgment. 2. Everyone living still has hope.