The best you can hope to with most people like this is to plant a seed or two in some way, to show that Catholicism has one or two perfectly biblical and beautiful beliefs and then let God do the rest.
Personally, I go straight to Mary with these types of guys. I ask them if they keep God’s commandments and bear witness to Jesus and when they say yes, I read Revelation 12 to them, where it says that those who do so are Mary’s “Offspring.” “See” I say, “Mary is your mother.” Some respond that the book of revelation is in the future and my response is, “Well then, you better get ready!”
Regarding bad Popes, the only response is that people are human. As they say in New York, whadaya gunna do? How people act does not change the essential truth’s of faith. Even Islamic suicide bombers speak truth when they yell “God is great” before they set off the explosives. People used the Bible to justify slavery. Does that mean the Bible is wrong? No way. Some Popes did some bad things. So what? Does that mean that everything they said is wrong or that twenty centuries of Christianity is a sham? Talk about throwing out the baby with the bath water!
The fact is that Jesus did not promise to give us perfect leaders; that he chose Peter shows just the opposite. Jesus promised that he would guide his Church but not necessarily the individuals in it.
Throw a couple of these back at your friend.
The disciples approached him and said, “Why do you speak to them in parables?” He said to them in reply, "Because knowledge of the mysteries of the kingdom of heaven has been granted to you, but to them it has not been granted. (Matthew 13:10-11) Note that Matthew does not distinguish between Apostles and Disciples but the context shows that he was probably speaking to the twelve.
Whoever listens to you listens to me. Whoever rejects you rejects me. And whoever rejects me rejects the one who sent me." (Luke 10:16)
Moreover, we possess the prophetic message that is altogether reliable. You will do well to be attentive to it, as to a lamp shining in a dark place, until day dawns and the morning star rises in your hearts. Know this first of all, that there is no prophecy of scripture that is a matter of personal interpretation, for no prophecy ever came through human will; but rather human beings moved by the holy Spirit spoke under the influence of God. (2 Peter 1:19-21)
I have a few more here.