The correct answers are A) to support moderate factions in the Iranian government, C) to help gain the release of U.S. hostages in the Middle East, and E) to try to gain influence in Iran.
In the Iran–Contra Affair, weapons weres old to Iran, which was designated a state sponsor of terrorism in 1984, because of these three reasons: to support moderate factions in the Iranian government, to help gain the release of U.S. hostages in the Middle East, and to try to gain influence in Iran.
The United States had a secret deal to sell weapons in exchange of Americans held hostage by terrorists in the Middle East, specifically in Lebanon. With the money of that secret deal, the government supported the Contras in Nicaragua.
National Security Advisor Robert McFarlane, advised President Ronald Regan that Iran wanted to buy weapons to use them against Irak. The problem was that Iran had been imposed a trade embargo by the US due to the Iran Hostage Crisis. Many people from the Reagan Cabinet opposed to that decision but at the end, the deal was done.