In a controversial decision in 2007, the Pentagon issued a $300 million government contract to two twenty-something arms dealers (Jonah Hill and Miles Teller) to supply weapons for U.S. allies in Afghanistan. (  / Warner Bros. Pictures)

Efraim Diveroli, the ungainly, socially awkward miscreant at the center of “War Dogs,” surrounds himself with paraphernalia from the movie “Scarface.” A still of Tony Montana and his “little friend” hangs on the wall of Efraim’s Miami office, a cut-rate military contractor called AEY; when Efraim gives his partner and best friend, David Packouz (Miles Teller), a sentimental gift, it’s a gold-plated hand grenade, inscribed with a quote from the film: “The World Is Yours.”

The poster for “War Dogs” is even reminiscent of the one for “Scarface,” which offers the first clue as to why the new movie doesn’t work. Co-writer and director Todd Phillips — best known for the “Hangover” comedies — doesn’t seem sure if he’s celebrating Efraim and David’s dubious occupation or scolding it. For a movie about the gonzo, giddy world of gunrunning, ripping off the Pentagon and doing massive bong hits while living large in South Beach, “War Dogs” has a weird lack of energy and bite. Based on a Rolling Stone article about the real-life Diveroli and Packouz’s lucrative career as gray-market arms dealers, “War Dogs” stays at arm’s length from the subjects, afraid to implicate us in the pleasures and prosperity of their rise, thus making their fall seem distant, puny and unaffecting.


(L to R): Miles Teller as David and Jonah Hill as Efraim in “War Dogs,” a film based on a Rolling Stone article about two real-life friends, who worked as gray-market arms dealers. (Warner Bros. Pictures)

Haphazardly written and fitfully paced, “War Dogs” admittedly contains more than a few infectiously funny moments — usually courtesy of Jonah Hill, who plays Efraim with enormous girth, slicked-back hair and a fluttery, high-pitched laugh — and an irresistibly catchy soundtrack, including what may be the most crass use of “Fortunate Son” every committed to film. (That’s the real-life Packouz in an early scene singing an acoustic version of “Don’t Fear the Reaper” in a nursing home.) One memorable scene, of the stoned-out protagonists pitching some Pentagon procurement officials in an Illinois business office, is staged for maximum Coen-esque absurdity.

But for every hit there are as many or more misses, whether in the form of sluggish pacing or Teller’s lackluster, drearily written voice-over, in which he describes everything as “X but Y.” A Vegas trade show the two attend to make high-dollar contacts is “Comic-Con, but with grenades.” A government website they scour for potential arms deals is “eBay, but for war.”

Okay, then: “War Dogs” is “Goodfellas,” but with none of that film’s pulse, anthropological detail or seductive immediacy: It’s “Whoa, dude-fellas.” Nominally the story of how Packouz reunited with his best friend from junior high to make millions in gaming the contracting system during the Bush-Cheney years (Halliburton plays a bit part), “War Dogs” often feels like little more than a couple of guys bro’ing down in exotic locales, repeating the common trope of real-life conflicts serving as backdrops for American derring-do and, finally, self-realization. (For a primer on the form, see the recent films “Rock the Kasbah” and “Whiskey Tango Foxtrot.”) Efraim and David’s sordid pastime will eventually take them to Fallujah and the nastier precincts of Albania, where high jinks ensue with the same inevitability as the boys’ eventual comeuppance.

All those DePalma nods and Scorsese freeze frames should telegraph loud and clear where this story is headed: The reckoning, when it comes, leaves the audience feeling deflated and depressed, and far more cynical than when they walked in. That’s not necessarily inappropriate, but the pessimism feels unearned in a film that never firmly decides where its sympathies lie. “For the record, AEY doesn’t stand for anything,” Efraim tells an employee at one point. The same could be said for “War Dogs.”

R. At area theaters. Contains profanity, drug use and some sexual references. 114 minutes.