Anyone who paid attention to the financial collapse of 2008 knows that the ratings agencies who are the arbiters of whether companies are a safe bet to take on debt played a big role. Less known are the exact details of how big a role they played. The Rolling Stone’s Matt Taibbi fills in the gaps in a blockbuster cover story.

Taibbi’s new piece, titled “The Last Mystery of the Financial Crisis,” shows in detail the role of the ratings agencies and how they rubber-stamped dubious bank transactions. The agencies Taibbi focuses on are the nation’s top two: S&P and Moody’s, which control a good chunk of the ratings agency market. Ratings agencies define what is safe to put money in and what is not. Their ratings are vitally important to the financial industry. But instead of evaluating companies objectively and giving them the ratings they deserve, Moody’s and S&P doled out top ratings to entities that were undeserving.

The new details Taibbi writes on come from documents and e-mails released as part of a lawsuit against the ratings agencies that alleged they conspired with Morgan Stanley to induce investment in subprime deals.

In April, the ratings agencies settled the lawsuit brought against them, with King County, Washington and the Abu Dhabi Commercial bank being the lead plaintiffs. The case centered on what’s known as a structured investment vehicle, or SIV.

SIVs are similar to other tools that are used by companies who want to move liabilities off their books and onto an entity where they could hide them. SIVs were used by banks to keep mortgage-backed securities–pools of mortgages, some of them bad–off their own books. “The SIV structure allowed investment banks to create and take advantage of, without risk, billions of dollars of things like subprime loans, which became the centerpiece of the new trendy corporate scam – creating and then selling masses of risky mortgage-backed securities as AAA investments to institutional suckers,” Taibbi writes.

The ratings agencies were asked to sign off on the safety of these SIVs. And that’s what they did, even if they were totally unsafe. The major reason why they would sign off on bad investments was that the same banks asking them to sign off on them were the ones giving them the money to operate as a rating agency.

In one specific case, an SIV was created by London-based hedge fund Cheyne Capital Management. The hedge fund was run by ex-employees of Morgan Stanley, which got involved in a deal to get investment into Cheyne. Morgan Stanley reaped fees from structuring the investment deal, and also earned money for selling their own mortgage-backed securities to the SIV, which were then marketed to investors like the Abu Dhabi bank. Internal documents from Morgan Stanley reveal that the bank put bad mortgages into the SIV.

The ratings agencies had nothing to go on to rate the subprime SIVs. But Moody’s and S&P–banks often used multiple ratings agencies because they often gave investments a lower rating if they weren’t involved with evaluating the deal–gave it top ratings anyway.

The ratings agencies knew they were rubber-stamping bad deals, e-mails show. “Lord help our fucking scam,” one e-mail from an S&P executive reads. “This has to be the stupidest place I have worked at.”

The ratings agencies gave top grades to another bad deal with a subprime-laden SIV called Rhinebridge. Both the Rhinebridge and Cheyne investments eventually went down the tubes, along with other subprime deals.

Despite the implosion of the U.S. economy due to the top grades these bad deals got, the system remains much the same.

“What happened to the ratings agencies during the financial crisis, and what is likely still happening within their walls, is a phenomenon as old as business itself,” writes Taibbi. “Given a choice between money and integrity, they took the money.”