It really does take money to make money. So far, lawyers and other consultants have racked up $701 million in fees as they work to recover the $17.5 billion lost to Bernard Madoff's Ponzi scheme.

That's less than half of the $1.6 billion legal tab associated with the Lehman Brothers' bankruptcy - the largest legal bill in history. But it's a considerable sum that's still growing as efforts to make Madoff investors whole drag on. To date, court-appointed trustee Irving Picard has collected $9.3 billion in cash and assets and repaid $5.4 billion of that to victims.

The bulk of the fees associated with the case, $384 million, have been paid to Picard's law firm, BakerHostetler. Another $292 million has been divided among dozens of other law firms, and $25 million went to "general administrative" costs. Funding these payouts is the Securities Investor Protection Corporation, which collects dues from Wall Street firms that are used to restore lost assets to investors burned by bankruptcy or fraud.

The trustee files a bill every few months that must be approved by a federal bankruptcy court judge. Ten have been submitted so far and all have been approved. The latest tab, which covers a five-month billing period and comes to nearly $50 million, was filed last week. The total comes to 135,00 hours of legal services, which works out to about $364 per hour. Picard alone makes $890 per hour. He billed for 728 hours of work and earned a total of $648,000.

He and his colleagues spent about $8 million on various business expenses as they searched for the lost funds. That includes $400,000 for out-of-town travel, $67,000 in copying costs, $161,000 for online research, $1,206 on business meals, and $12.60 on faxes.

Related: Madoff destroyed thousands, including his son

Most of the money Picard's lawyers has collected came through settlements with former investors who withdrew more from Madoff's firm than they deposited. Even though many of these investors claim to have known nothing of the Ponzi scheme, the trustee is suing them for benefiting from it.

Forensic accountant Sam Rosenfarb, of Rosenfarb LLC, said that much of the fees were probably paid to accountants like himself, who can earn between $150 an hour and $700 an hour untangling a mess like the Madoff scam. Forensic accounting is the means by which the trustee determines which of the investors are net winners from investing in Madoff's firm.

"In order to take out more than you put in, you're really only taking that money from other victims, because Madoff didn't make any money," said Rosenfarb. "You're the beneficiary of other victims' losses. You're the beneficiary of the fraud."

Settlements have played a huge role in reclaiming the stolen money, as the trustee goes after individuals and companies that may have profited from the scheme. The largest settlement occurred in 2011, when the widow of Jeffry Picower, believed to be the biggest beneficiary of Madoff's schemes apart from the Madoffs, surrendered a whopping $5 billion from his estate.

In the pursuit of ill-gotten gains, the trustee has also sued various companies for allegedly profiting from the Ponzi scheme, but with mixed success. The trustee settled with Tremont Group Holdings, one of the largest groups of feeder funds in the Madoff case, for more than $1 billion in 2011. But suits totaling more than $20 billion against UBS (UBS) and JPMorgan (JPM) which are also accused of profiting from the scam, were tossed out by a federal judge in 2011.

Related: Breakdown of a Madoff legal bill

In 2012, a federal judge also threw out Picard's $20 billion suit against Italian bank UniCredit S.p.A (UNCFF). and Austrian banker Sonja Kohn. Both were accused of recruiting well-heeled European victims for Madoff's scheme. The judge rejected Picard's accusation that Kohn and UniCredit participated in organized crime.

Additionally, the trustee sued Mets owners Fred Wilpon and Saul Katz, who were also Madoff investors, seeking $1 billion. But Picard settled with Wilpon and Katz last year for just $67 million.

The trustee also sued the owners of the Mets, Fred Wilpon and Saul Katz, who were also Madoff investors, seeking $1 billion. But Picard settled with Wilpon and Katz last year for just $67 million.

Madoff's scheme came crashing down with his arrest on Dec. 11, 2008. He pleaded guilty three months later and was sentenced to 150 years. He is currently languishing in a federal prison in Butner, N.C.

His brother Peter recently began a 10-year sentence for helping to cover up the scheme.