I don't think we know for sure. There's a lot of strong evidence that such a law would be held to be unconstitutional as violating the First Amendment. See Citizens United v. FEC and the various cases cited there.
The logic is very much the same. In Citizens United, the money was spent to influence an election. Here, the money would be spent to influence a lawsuit. The rationale of the law is pretty much the same, preventing undue influence, preventing the appearance of corruption, and so on.
Here's what the Supreme Court said about expenditure limits for campaigns in Buckley v. Valeo, "The First Amendment requires the invalidation of the Act's independent expenditure ceiling, its limitation on a candidate's expenditures from his own personal funds, and its ceilings on over-all campaign expenditures, since those provisions place substantial and direct restrictions on the ability of candidates, citizens, and associations to engage in protected political expression, restrictions that the First Amendment cannot tolerate."
It would be quite surprising if this were not extended to expenditures for private counsel. But, of course, that doesn't mean it's a sure thing.