They intensified as Mr. Trump’s campaign began in the summer of 2015, when a former hedge-fund manager told Mr. Cohen that he had obtained photographs of Mr. Trump with a bare-breasted woman. The man said Mr. Cohen first blew up at him, then steered him to David J. Pecker, chairman of the tabloid company, which sometimes bought, then buried, embarrassing material about his high-profile friends and allies…

It was July 2015 when Mr. Cohen received a phone call from Jeremy Frommer, a hedge-fund manager turned digital entrepreneur, who had obtained photos of Mr. Trump appearing to autograph the breasts of a topless woman from the estate of Bob Guccione, the founder of Penthouse magazine. Mr. Cohen was not pleased.

“He was in a rage,” Mr. Frommer said in an interview. “He’s like, ‘If you show those photos, I’m gonna take you down.’”