The Iranian regime must be thinking now of North Korea, whose rogue nuclear program went unpunished and indeed benefited it by causing the money laundering sanctions to be lifted. Their reasoning is not exactly correct.
North Korea stopped major money laundering operations years ago, and the US lost nothing by lifting the sanctions. Indeed, cleansing the banking system of Nauru made the sanctions redundant.
Also, North Korea frequently suffers major humanitarian crises which the US cannot ignore, much less aggravate by sanctions.
North Korea has a history of cross-border attacks on a major US ally, South Korea. Striking the communist regime would cause those tensions to flare up. Iran, on the other hand, has launched no wars of aggression in its modern history.
North Korea is insular, while Iran has strong imperial ambitions. The North’s nuclearization sparked a regional arms race, as both Japan and South Korea are certain of their ability to develop nuclear weapons within two to three years and enjoy American protection in the meantime. Iranian nuclearization would throw Egypt, Saudi Arabia, and Turkey into a nuclear race, and Oman would follow.
The Western attitude toward a nuclear Iran would most likely resemble its attitude toward Pakistan: years of strong sanctions followed by suspicion and very cold relations. And Iran, which depends on exports for survival and on foreign relations to project its power by naval forces and proxies, can hardly afford such sanctions.