For more than a month now, the investigation of Michael D. Cohen, President Trump’s longtime personal lawyer, has been a spectacle, a garish pageant of money, sex and politics unfolding both in court and in the court of public opinion.

And if anyone can be thought of as the ringmaster in this noisy legal circus, it is Mr. Cohen’s chief nemesis, Michael Avenatti, the lawyer for the pornographic film star Stephanie Clifford.

After all, it was Mr. Avenatti who sent Ms. Clifford — better known as Stormy Daniels — into a courtroom in Manhattan last month to sit (in her pink blazer) within sight of Mr. Cohen as part of a publicity stunt that largely seemed designed to needle and unnerve him. It was also Mr. Avenatti who set off a frenzy in the media last week by releasing a report that showed how Mr. Cohen had taken more than $1 million from a firm linked to a wealthy Russian oligarch and from several major companies, including AT&T.

As federal prosecutors in Manhattan continue to investigate whether Mr. Cohen broke the law by paying Ms. Clifford to stay silent about an affair she says she had with Mr. Trump, Mr. Avenatti has never once shut up about the case. In a guerrilla-style campaign, he has been on Twitter daily — sometimes almost hourly — talking of Mr. Cohen and has appeared so frequently on television that some have joked that he sleeps at CNN.