All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
It is not permissible for a Muslim to use any forbidden means for the sake of any good project. As the generous inquirer mentioned, an end does not justify its means: legitimate charity should be from lawful and pure property.
Allah Says (what means): {O you who have believed, spend from the good things which you have earned and from that which We have produced for you from the earth. And do not aim toward the defective therefrom,...} [Quran 2:267]
Besides, the Prophet said: “O people, Allah is Tayyib (which implies pure), and He does not accept except that which is pure.” [Muslim]
Thereupon, if you give charity from ill-gotten money, you will not be rewarded for that. Rather, this action will be a sin, especially if you do such a work intentionally.
As for what you mentioned about the critical state of affairs of Muslims worldwide, we do ask Allah, The Great and Almighty, to reform and return Muslims to their faithful commitment to Islam and to their glory. Also, such a state does not legalize commitment to any forbidden action. Yet, ill-gotten gains constitute a reason of weakness and humility of the Muslim nation and also prevents the supplication from being answered.
As a result, it is not allowed to take part in such restaurants, since they sell prohibited things even if you want to spend revenues as charity.
However, if you are engaged in such a business and you want to repent and get rid of it, then you can spend all revenues, you received, in the fields of public welfare of Muslims. The latter point is fundamental for sincere repentance.
Allah knows best.