What a Kroc.

Almost from the moment a fast-talking, world-weary, borderline desperate, middle-aged salesman from the Midwest named Ray Kroc latched onto a revolutionary hamburger joint pioneered by two kitchen-smart but street-naïve brothers from California, he was rewriting history to position himself as the man with the plan.

Mac and Dick McDonald practically invented fast food in the mid-20th century — from the step-right-up ordering method (as opposed to car hops taking your orders at drive-ins) to the scaled-down, user-friendly menu to the game plan to build a burger in 30 tightly choreographed seconds to the packaging of burgers and fries in paper wrappers and bags to the family-friendly pricing and atmosphere to the famous “Golden Arches” design.

True, it was Ray Kroc’s vision to go nationwide with the McDonald’s game plan and franchise the heck out of it. But by the time Kroc had finished fleecing — er, doing business with — the McDonald brothers, Kroc was taking credit for everything, including the conception of those Golden Arches.

Kroc even labeled the Des Plaines, Illinois, restaurant he opened in 1955 as “The Original McDonald’s” and/or “McDonald’s #1,” even though it was actually the ninth McDonald’s ever built.

John Lee Hancock’s whip-smart, breezy, sunny and yet also darkly funny “The Founder” tells the story of Kroc’s takeover of McDonald’s in a fashion that reminded me of a half-century-earlier version of “The Social Network,” with burgers instead of Facebook; a fiftysomething salesman in lieu of a cocky Ivy Leaguer, and the hunky-handsome Winklevoss twins replaced by a couple of super-square brothers who woke up one day and learned they didn’t even own the rights to their own names any more.

I half expected Michael Keaton’s Ray Kroc to say to the McDonald brothers, “If you guys were the inventors of McDonald’s, you would have invented McDonalds.”

The casting of the eminently likable, crinkly-eyed Keaton is a stroke of genius. Even as it becomes increasingly clear Kroc is a fox in the henhouse, we can’t help but like (or at least admire) the guy, and we understand how he could have captivated and seduced everyone from the McDonald’s brothers to potential investors, to the very wife of one of those investors.

“The Founder” opens with a tight close-up of Keaton as Kroc circa 1954, delivering a spiel for a new, high-end, five-spindle milkshake-mixing machine. Kroc spends as much time complimenting potential clients for being smart enough to see the value of the machine as he does explaining the machine itself — but flattery is getting him nowhere. Time and again, Kroc is told thanks but no thanks, and he lugs the unwieldy machine back to his car, pulls out the road map (and the flask of whiskey) and hits the road again.

Laura Dern (saddled with a downer of a role) plays Ray’s wife Ethel, who patiently waits for Ray in their Arlington Heights home, hoping he’ll take her to the country club so she can get a break from the monotony of hearing Ray’s latest pie-in-the-sky, get-rich-somewhat-quickly scheme.

Ray’s in a marriage, a career, an existence, standing off to the side of the road, watching life pass him by.

A trip to Southern California and the restaurant owned and operated by the McDonald’s brothers (John Carroll Lynch and Nick Offerman, both wonderful) changes everything for Ray. He immediately senses the franchise possibilities, and even though the brothers tried franchising before but abandoned the plan because they couldn’t control every detail at every store, they agree to partner up with Ray — but Ray won’t be able to make a move without their approval.

That arrangement lasts about as long as it takes to get a couple of cheeseburgers and a large fries to go.

The beautifully calibrated script from Robert Siegel follows Kroc as he successfully copies the McDonald’s blueprint and then goes about finding ways to cut costs and amp up the profits — and figuring out how to circumvent his contract with the McDonalds and start reaping the lion’s share of the revenue. Every once in a while we cut to the brothers back in California, exclaiming disbelief with the latest phone call or letter from Ray, who has made yet another move without their blessing.

Yet for every time we think, “This Kroc is the WORST,” we can’t help but acknowledge there’s no way McDonald’s would have become the frighteningly dominant Fast Food Mega Power it is today without Kroc’s unrelenting determination and his willingness to take big chances.

“The Founder” spends zero time examining what a steady diet of cheeseburgers, French fries, soda and milkshakes has done to tens of millions of Americans (and citizens of the world). There’s almost no talk of the genius marketing and advertising campaigns, or Ronald McDonald, or myriad other aspects of the giant footprint McDonald’s has left (and continues to leave) on the popular culture.

This is all about how one man spearheaded a movement that transformed a single fast-food restaurant in San Bernardino, California, into a global force with more than 36,000 restaurants in 118 countries, serving nearly 70 million customers each and every day.

It’s a great slice of Americana — a classic, red-white-and blue success story in more ways than one, with Keaton embodying everything admirable and not so admirable and despicable about Ray Kroc’s climb to the top of Hamburger Mountain. It’s some of Keaton’s finest work.

It’s also the first great movie I’ve seen in 2017.

★★★★

The Weinstein Co. presents a film directed by John Lee Hancock and written by Robert Siegel. Rated PG-13 (for brief strong language). Running time: 115 minutes. Opens Friday at local theaters.