He was a personal-injury lawyer who often worked out of taxi offices scattered around New York City.

There was the one above the run-down auto repair garage on West 16th Street in Manhattan, on the edge of the Meatpacking District before it turned trendy. There was the single-story building with the garish yellow awning in the shadow of the Queensboro Bridge. There was the tan brick place on a scruffy Manhattan side street often choked with double-parked taxis.

And then there was his office on the 26th floor of Trump Tower overlooking Fifth Avenue, right next to the one belonging to Donald J. Trump.

Before he joined the Trump Organization and became Mr. Trump’s lawyer and do-it-all fixer, Michael D. Cohen was a hard-edge personal-injury attorney and businessman. Now a significant portion of his quarter-century business record is under the microscope of federal prosecutors — posing a potential threat not just to Mr. Cohen but also to the president.