Rabbi Zecharia Wallerstein (5:39) said that the Zohar in Shemos states the following:
"In the beginning of the redemption, Klal Yisrael is going to go through many tzaros. Certain Jews will give up because of the tzaros. Most of the Jews will go off the derech. They will leave the rest of Klal Yisrael and join the enemies of Moshiach. Rabbi Shimon bar Yochai says, 'Woe to the person who lives in those days!' When Hashem comes to redeem the Shechinah from golus… He is going to look, in general to see, who is standing together with the Shechinah. He will into everybody’s deeds, but there’s not going to be that many tzaddikim.
In the times of Moshiach, whoever has emunah, he will see Moshiach. All the nations and their representatives, will get together and make sanctions against the Jews. They will write all types of edicts against us. They will all get together with one solution for the Jews…
The whole world will hide in caves and deep places. Then, the will be a great shaking in the whole world. Afterwards, Moshiach will come.
All the kings of the world will get together to fight Moshiach. Many Jews that left Judaism, will join the nations to fight against Moshiach.
In the times of Moshiach, the world will become dark like in Egypt for fifteen days. Many Jews will die in that darkness. However, because they died, that will be their forgiveness. Eventually, they will be resurrected. They won’t be like people that are thrown out.”
Does anyone know where this is located in the Zohar?