Here's a prescient AEI report by Ali Alfoneh on the recent restructuring of the Revolutionary Guards toward foiling internal, rather than external enemies. The key man is General Ali Jafari, appointed in 2007 by Khamenei to pay special attention to the threat of "velvet revolutions":
After the [Iran-Iraq] war, Jafari served as commander of IRGC Ground Force for more than a decade (1994-2005). He then became chief of the newly established IRGC Strategic Studies Center. Under his supervision, the center began to conduct research into "velvet revolutions" and alleged U.S. "soft regime change policies."
He argued that the IRGC should focus on future internal threats to the Islamic Republic's stability, a push that led the IRGC to establish the Al-Zahra and 'Ashoura Brigades to serve as anti-riot forces within the organizational framework of the paramilitary Basij Resistance Force, long the subordinate little brother of the IRGC. Upon assuming the mantle of IRGC leadership, Jafari sought to implement the theories he had developed as head of the IRGC think tank. If the chief future threats were velvet revolutions and internal strife--perhaps supported by the hidden hands of outside powers--then the IRGC needed to readjust to meet the challenge.