His campaign’s single biggest expense in December was a nearly $5 million media buy paid to the firm that bought his television advertisements. His second-largest payment, $4.4 million, was for online advertising. And the Republican National Committee pocketed millions of dollars in donations — collecting 25 cents for every dollar Mr. Trump raised online — in the final weeks of the year as it spent relatively little on legal costs.

All told, Mr. Trump’s campaign spent only $10 million on legal costs — about one-fifth of what it spent on advertising and fund-raising, according to an analysis of Federal Election Commission filings from Nov. 4 through the end of the year…

Most of the money appears to have come online and from smaller contributors, with relatively few five- and six-figure checks, especially once the calendar turned to December. One $100,000 check in early December came from Elaine J. Wold, a major Republican donor in Florida.