The swamp that Donald Trump promised to drain is overflowing with cash.

Trump’s presidency has been extremely lucrative for some of his closest friends and advisers. His longtime personal lawyer Michael Cohen cashed in to the tune of at least $1.4 million since Election Day and a dossier released by an opposing attorney documents millions more (Cohen’s attorney said the document includes “numerous incorrect statements”).

And while it’s bad optics for a president who pledged to take on Washington’s monied interests, incredibly, it’s possible that it was all legal.

Some of the biggest companies in the world paid Cohen handsomely for his “insights” into the new president through Essential Consultants LLC, a shell company Cohen created just days before the 2016 election. The payments were first made public Tuesday night, when Michael Avenatti, attorney for porn star Stormy Daniels, uploaded a dossier of alleged financial transactions involving the LLC. VICE News found some errors in the document, but multiple companies confirmed that they bought in to Cohen’s pitch.

AT&T, for one, paid Cohen a total of $200,000 between October 2017 and January 2018 while a proposed merger with Time Warner was pending before the Justice Department and the company was lobbying on the Republican tax bill. When Trump celebrated the passage of the tax bill at the White House on Dec. 20, 2017, he gave a shout-out to the telecom giant near the top of his speech.

“This just came out, two minutes ago; they handed it to me: AT&T plans to increase U.S. capital spending $1 billion and provide $1,000 special bonus to 200,000 U.S. employees,” Trump said.

Drugmaker Novartis paid Cohen $1.2 million between February 2017 and February 2018 because they believed Cohen “could advise the company as to how the Trump administration might approach certain U.S. healthcare policy matters, including the Affordable Care Act,” according to a company statement.

“This highlights some of the shortcomings of the current rules”

“This highlights some of the shortcomings of the current rules,” said Dan Auble, a senior researcher at the Center for Responsive Politics who is in charge of the group’s lobby tracking tools. “If he was just providing insight into what the president and his administration were thinking or giving advice about who to talk to and what buttons to press with the companies’ already-established lobbying team, he would not have to register as a lobbyist.”

Cohen’s services were in demand especially early on because Trump was not a known entity in Washington and lacked a coterie of D.C. associates they could put on the payroll. Trump’s populist rhetoric during the campaign also worried some of Washington’s special interests.

Cashing in

And so Cohen cashed in and did it all without ever registering as a lobbyist — and all while keeping the president as an active client. White House Press Secretary Sarah Huckabee Sanders told reporters on Wednesday that she hadn’t “heard the president express any particular concerns” about Cohen’s consulting work.

There are still questions about whether Cohen’s LLC was aboveboard with banking and tax laws, but as far as influence peddling goes, all of Cohen’s actions might have been completely legal, law professors and good government experts say.

“If Cohen was not advocating on their behalf—by contacting government officials to press their issues—then he would not have to register,” Auble said. “The problem with this is that it is hard to hold the government to account for policies it enacts when so much activity like this takes place in the shadows.”

The details of how Cohen “consulted” are not fully known and could still pose legal trouble. If he called White House officials to press AT&T’s requests, for example, then he would have broken lobbying laws since he didn’t register as a lobbyist.

AT&T claims it did not hire Cohen as a lobbyist. Novartis now claims that one month into their yearlong contract with Cohen, they realized he “would be unable to provide the services that Novartis had anticipated related to U.S. healthcare policy matters, and the decision was taken not to engage further,” suggesting Cohen may have gotten paid for little work.

“You have to wait for the facts to be developed, and we don’t know the facts,” Shira Scheindlin, former United States district judge for the Southern District of New York, told Vox. “It seemed that people were paying him because he was close to the president and knew he had access to the president, and that begins to sound more like lobbying when you can reach the president.”

Swamp rules

Cohen isn’t alone in taking advantage of influence-peddling loopholes. Former members of Congress are banned from lobbying their ex-colleagues for two years after they leave office, but even they regularly get around that rule by serving as consultants, government relations experts, or specialists in public affairs for special interests.

It’s business-as-usual in D.C. and many Trump allies like former campaign manager Corey Lewandowski have taken advantage of the moment despite Trump’s promises to stop this sort of activity.

But Cohen’s behavior is different than Lewandowski's because he is also Trump’s attorney. If Cohen broke professional guidelines for attorneys in New York by disclosing confidential information about a client (the president), he could run into trouble with the New York State Bar Association.

“If I were still a bar prosecutor, there’d be more than enough information to begin conducting an investigation,” said Michael Frisch, a former bar prosecutor in Washington, D.C. who is now an adjunct professor at Georgetown Law. “There are no consequence to violating ethics rules except for effects on licensing such as disbarment.”

But again, the reports so far don’t prove Cohen broke any professional guidelines. “There’s not enough information here,” Bruce Green, the director of Fordham Law School’s Center for Law and Ethics, told VICE News. “Undoubtedly, more facts might lead to other questions as well.”