Here’s a film that gets into the idea of opposites attracting. It’s a “based-on-fact” story that’s been highly fictionalized. It’s a serious, tension-filled drama that’s at times, laugh-out-loud funny. It features two main characters that are ... well, that’s where the opposites really loom large.

The real events that became the Rolling Stones piece, then a book, and now the film “War Dogs” happened in the mid-2000s, when a couple of 20-something guys in Miami pulled off a business deal involving the U.S. military, lots of guns and ammo that would eventually get into the hands of Afghan rebels, and the kinds of misfortunes that pop up when things balance somewhere along the edge of what’s legal and what’s illegal.

Those guys were David Packouz and Efraim Diveroli, pals in junior high school who had gone their separate ways, partially because they had nothing in common with each other beyond their desire to smoke dope and party on. You know, opposites.

There’s an unnecessary prologue, featuring a scene that will pop up later in the film, and a dazzling visual display concerning how and why people are attracted to international arms dealing — yup, our boys are War Dogs, guys who make money off war without stepping on a battlefield.

Then it’s time for introductions: David (Miles Teller) is working, unhappily, as a masseur, wondering what to do with his life, and keeps looking for shortcuts to help him and his wife (Ana de Armas) get by. His newest scheme involves buying up expensive bed sheets, then trying to sell them to residents of nursing homes. One of the film’s funniest sequences happens in one of those places, as a folkie with a guitar sits in a rec room, crooning an acoustic version of “(Don’t Fear) The Reaper” to an inattentive crowd. That’s twisted (and it made me laugh out loud). (Trivia fans: The singer is the real David Packouz in cameo mode.)

Well, sheets aren’t going to make David any money, so it’s a good thing that his old pal Efraim (Jonah Hill) has just moved back to town after an extended stay in California where, he brags, he made good money by “re-selling guns on the Internet.” Now he’s in Miami to set up a new and bigger arms-dealing shop, searching out ways to bid on overlooked government contracts that will allow him to sell guns and other war-related equipment to the American military.

It’s never made clear why these guys ever got along. Efraim is a fast-talking, smooth operator with a short fuse of a temper; David is a mild-mannered lost soul who is comparatively levelheaded. But soon they’re working together, with Efraim in charge, familiar with all of the ropes, and David proving to be a fast learner in manners involving thinking on his feet.

A problem with a shipment of Beretta handguns for a U.S. army captain in Baghdad results in David and Efraim hightailing it over to the Middle East, then having to get together with “the best smuggler in Jordan.” That all leads to some of the film’s craziest, action-packed scenes. But the script also comes around to issues of trust, some between David and his wife, from whom he’s kept his sorta legal business ventures a secret, and between David and Efraim, after a third party, Henry Girard (Bradley Cooper), a shady fellow who’s known as “a legend among arms dealers” enters the scene with talk of the biggest government contract they can imagine.

Among the fast-moving film’s many pleasures are the chemistry between Teller and Hill; the way things can be going so well, then switch to going really wrong so quickly; and the integration of some very cool music choices on the soundtrack. There’s something here for fans of everyone from The James Gang to Vanilla Fudge to Leonard Cohen, and it all complements what’s happening in the movie.

“War Dogs” is about people wanting big money, and how to get around the roadblocks between it and them; it’s about the stupidity of greed; and, if you dig just past the surface, it bears some resemblance to that other Miami crime story, the Al Pacino version of “Scarface.” That’s easy to pick up on. A photo of Pacino, with gun-a-blazin’, is on regular and blatant display.

— Ed Symkus covers movies for More Content Now.

“War Dogs”
Written by Stephen Chin, Todd Phillips, and Jason Smilovic; directed by Todd Phillips
With Jonah Hill, Miles Teller, Ana de Armas, Bradley Cooper
Rated R