It’s an action movie and a comedy. It’s a buddy film that throws two completely opposite types of characters into a situation, then makes them work together. It’s got a thoughtful message — “be yourself” — that’s coated with a thick layer of entertainment.

“Central Intelligence,” as the title hints, has something to do with the CIA. But before any agents appear, before bad guys go after good guys, and good guys try to stop bad guys, there’s a flashback. The film opens 20 years in the past, on a day that high school seniors Robbie and Calvin — acquaintances but not friends — will never forget.

Robbie is the fat, dorky kid that the jocks pick on; Calvin is mister popular, the kid everyone likes, who steps forward to help when one nasty kid embarrasses Robbie beyond imagination.

The opening few minutes are funny, cringe-worthy, and a tad heartwarming.

Then it shoots up to today, 20 years later, when these kids are well into their adult careers.

Calvin (Kevin Hart) is happily married to his high school sweetheart, Maggie (Danielle Nicolet), but hasn’t exactly followed his plan of some day conquering the world. He’s an accountant, a very successful one. But he seems disappointed by the cards that were handed to him.

Then out of the blue, he gets a Facebook friend request from Bob Stone. Who is Bob Stone, he wonders, but curiosity gets the best of him so he accepts the invite, and when he realizes that it’s that poor schlub Robbie, from all those years ago, he also agrees to meet him for a drink.

Just like in “Casablanca,” it turns out to be the beginning of a beautiful friendship.

Bob (Dwayne Johnson) is unrecognizable to Calvin. There’s not an ounce of fat anymore, and his muscles have grown muscles. I mention “Casablanca” because this film is loaded with movie references, among them Calvin getting his first glance at the new, improved 6-foot-5 Bob and saying, “You look like Hercules, or somebody” (a little in-joke there, since Johnson starred in “Hercules” in 2014), and Bob checking out 5-foot-4 Calvin and saying, “You’re like a snack-size Denzel.” Other references wittily worked into the script include “Twilight,” “Goodfellas,” “Road House,” and “16 Candles.”

Calvin has adjusted to his own reality and is kinda glum, but Bob has turned his life around, has gotten a new lease on it, and is one energetic, happy fellow. But he’s got an air of mystery around him, and it feels a little odd when he asks Calvin to do an “accounting favor” for him, then clams up about what it actually involves, even after Bob does it.

Wouldn’t you know it? Some CIA folks, led by Agent Harris (Amy Ryan) soon arrive at the home of Calvin and Maggie, asking if Calvin has seen Bob Stone, a CIA operative who is wanted for treason and for murdering his partner (Aaron Paul in flashbacks).

Well, there was this air of mystery around him. So, let the action begin. Calvin may be very good at HIS job, but Bob is far better at HIS. Amidst a plotline that involves the U.S. Satellite Security Program, and the theft of related encryption codes by someone nicknamed “The Black Badger,” the film erupts into pandemonium, and a fair share of non-deadly violence, much of it played for comic effect.

As an action comedy, it moves along rapidly, and manages quite a feat. Usually funny Kevin Hart plays the straight man (doing so as a bundle of nervous energy), while rugged Dwayne Johnson goes for and gets most of the laughs. But the best thing about Johnson’s performance is that no one, either on the screen or in the audience, is ever sure if Bob is a good guy or a bad guy (until it’s time to know). And that’s just one part of the film’s hat trick: There’s an equal amount of great comic timing in the writing, the directing, and the acting.

— Ed Symkus covers movies for More Content Now.

“Central Intelligence”
Written by Ike Barinholtz, David Stassen, and Rawson Marshall Thurber
Directed by Rawson Michael Thurber
With Dwayne Johnson, Kevin Hart, Amy Ryan, Aaron Paul, Danielle Nicolet
Rated PG-13