War Dogs is based on one of those true stories that no one would actually believe if it were written as fiction. In the mid-’00s, two kids named Efraim Diveroli and David Packouz managed to secure a $300 million contract with the United States government to supply allied forces in Afghanistan with arms and ammunition. They then embarked on a globetrotting misadventure that saw them dealing with shady crooks and corrupt politicians and dangerous soldiers in the name of making a fortune. Most astonishingly, both men were twentysomething stoners with no experience handling anything of this size or scope. As much as the film may diverge from the truth for the sake of cinematic drama, the core story remains jaw-droppingly true.

The Origin Story

The dizzying rise and devastating fall of Diveroli and Packouz was initially recounted in Guy Lawson’s 2011 Rolling Stone story “The Stoner Arms Dealers: How Two American Kids Became Big-Time Weapons Traders.” Lawson later expanded the story into the book Arms and the Dudes, which was the original title for the film adaptation. Reading the original article today, you can see why director Todd Phillips snatched up the rights as soon as possible – this is a true story, but it is a true story full of sex, drugs, violence, intrigue and an increasing number of poor decisions.

The Beginning

Jonah Hill would later explain that he tried to buy the rights to Lawson’s original article soon after it was published, only to learn that Phillips had beaten him to the punch. However, Hill reached out to the Hangover trilogy director and requested to play Efraim if a film version got off the ground. Miles Teller has his own strange entryway into the film – his father e-mailed him with the news that the Rolling Stone article was being made into a movie and said that he’d be perfect for it.

Who Is Efraim Diveroli?

The true origin story of Efraim Diveroli can make your head spin. Dealings arms was his family’s business, so at 18, he took over his father’s company and set out to become an arms dealer himself – only he dealt solely with the U.S. military. Within a few years, he was handling contracts worth tens of millions of dollars, driving a Mercedes, and bragging about his career to his circle of stoner buddies. As his workload (and bank account) began to grow, he brought on childhood buddy David Packouz to assist in 2005. Things only escalated (before they crashed and burned) from there.

Although Diveroli has written about his experiences in a memoir titled One a Gun Runner, he wouldn’t meet with Jonah Hill. And that was fine by the Wolf of the Wall Street Oscar nominee, who told EW: “This is a good sign: if I sign on to play a real person and they don’t want me to be involved and they don’t want anything to do with it? It ends up being a good movie.”

Who Is David Packouz?

While Diveroli refused to meet with the actor playing him in War Dogs, Packouz met with both Miles Teller and Jonah Hill. Reading the source material may indicate why: In this story, Packouz comes off as the more sympathetic of the two, which isn’t saying that much considering that they both engage in all kinds of shady business. It’s actually a pretty classic Hollywood tale: an underachiever is promised wealth, achieves it, then flames out. Packouz has had something of a comeback in recent years. In 2014, the onetime wanna-be pop star invented the BeatBuddy, the “first guitar pedal drum machine,” which went on to be one of the most successful items to ever be funded on IndieGoGo.

How’d the Stars Get Cast?

Although Hill and Teller now seem like they were destined to nab these parts, they weren’t the first choices. The Wrap originally reported back in 2014 that Jesse Eisenberg and Shia LaBeouf were the first choices for the then-titled Arms and the Dudes. When both of them fell through, Hill was cast as Efraim… and Chris Pratt was rumored to play David for a hot minute. Teller — who saw Phillips at a restaurant and asked to be put in the movie — ultimately secured it.

Reality vs. Movie: The Big Differences

Like any movie adaptation, War Dogs takes some liberties. Some differences are simple: Jonah Hill and Miles Teller look nothing like the teenagers they’re playing. However, as the trailer makes clear, the film ups the action quotient. Though Packouz and Diveroli dealt in danger, they mostly did it behind a computer screen. The movie puts them squarely in the middle of the warfare. The real kids traveled the world, but usually to check out foreign arms stockpiles and international gun shows. War Dogs finds these guys literally under fire while personally transporting their goods across enemy territory, which didn’t happen. Also, Packouz is given a girlfriend in the movie (Ana de Armas), unlike the real story. 

It’s Really a Stoner Story

War Dogs may be more political than the average Todd Phillips movie, but it’s actually easy to see why the director of the three Hangover movies, Old School and Due Date would be attracted to this material. If you strip away the guns and the politics, this is really a buddy comedy about two bumbling stoners who get in way over their heads and face the wrath of the Powers That Be. While the film is a conceptual departure from his past work, it’s easy to imagine the hard-partying Packouz and Diveroli (who would share cocaine snorted out of a plastic bullet the latter carried with him) getting along quite well with the wild, hard-partying bros of Phillips’ previous movies.

Can’t wait to find out how it ends? War Dogs is in theaters on August 19.