Assalamu Alaikum wa rahmatallahi wa barakatuhu
One thing that I've noticed, Alhemdulilah, is that we have an obligation to each other to help one another in guidance, so that it's doesn't remain a friendship only based on love and entertainment, but rather to be a friendship that
benefits Islamically all those whom are involved.
I try my hardest to remain with friends that either (1) benefit me Islamically, or if they don't benefit me then, (2) I benefit them Islamically.
If I do not find benefit from them Islamically, I have to know that their iman is getting better when they are around me, otherwise I start thinking that either I'm not one who benefits or they just don't want to change their ways. If they are too stubborn to change their ways after trying to help them continuously with sincerity and patience and they remain sinning and it starts to affect me as well, then I distance myself from them.
Malik bin Dinar advised Mughirah bin Habib:
“Every companion and friend from whom you do not earn a religious benefit then discard him and his friendship.” [Az zuhd p.449 and Sifatus-Safwah vol. 3, 286]
I suggest you try to help them for now and continue to advice them, perhaps go to lectures together or try to inform them about their ways in a very subtle way so that they can reflect upon themselves and see how they improve inshallah. If they don't want to change and they do not find benefit in you then distance yourself from them in case they start to affect your iman. For now, just try to help them with patience and sincerity Inshallah.
Anas ibn Malik narrated that the Holy Prophet S.A.W said:
Help your brother when he commits a wrong or a wrong is committed against him. Someone asked: O messenger of Allah! I could help him if a wrong is committed against him, but how shall I help him if he himself is committing a wrong? He answered: Stop him from committing the wrong, that is helping him. [Bukhari]
It seems as if you advising them is helping them improve little by little, which is good, but if they stop improving and you advising them doesn't lead them anywhere then be around those who will help you in your iman bi'idnillah.
fi aman Allah
w'salaam