Relativity Media has debuted the first trailer for "Masterminds," the action-comedy starring Zach Galifianakis, Kristen Wiig, Owen Wilson and Jason Sudeikis.

Written and directed by Jared Hess ("Napoleon Dynamite"), and based on the 1997 Loomis Fargo Bank Robbery, the film centers on David Ghantt (Galifianakis), an uncomplicated man with a monotonous job, driving an armored vehicle filled with other people's money. But then his work crush Kelly Campbell (Wiig) lures him into a flawed scheme involving a group of hair-brained criminals and the theft of $17 million. David makes off with the cash, only to hand it over to his double-crossing co-conspirators, who live the high life, leaving a trail of evidence in their wake. On the run from both the authorities and a hit man (Sudeikis), David must figure out a way to turn the table on his one-time partners in crime.

"Masterminds" opens Aug. 7.