This may be one of the most derriere-centered movies ever made: not only is it crammed with visual gags and jokes about butts, but just about all the characters in it are asses, too. That’s not terribly surprising: it’s directed by Jared Hess, who was responsible for “Napoleon Dynamite” and “Nacho Libre,” both of them pictures that treated their characters with something akin to contempt. But it’s unusual in that “Masterminds” is based—as it tells us—on a real story.

That story is the 1997 robbery of an armored car company in Charlotte, North Carolina. The perpetrator was soon identified as one of the drivers, David Ghantt, who was caught on a security camera loading the $17 million in cash into his getaway van. He’d been in league with several others, including former employee Kelly Campbell and her friend Steve Chambers. Before Ghantt could be arrested he fled to Mexico, where Chambers sent a hitman named Mike McKinney to kill him after he and Ghantt had a falling-out. Eventually Ghantt was captured and, along with his confederates, tried and convicted.
Because the “gang” were all low-rent local types, the caper eventually came to be known as the “hillbilly heist.”

Admittedly these crooks were hardly the brightest bulbs in the box, but scripters Chris Bowman, Hubbel Palmer and Emily Spivey have refashioned them as complete stooges, with David, Steve and Mike portrayed by Zach Galifianakis, Owen Wilson and Jason Sudeikis as dumb, dumber and dumbest (though which is which is up to the viewer to decide). Kelly, played by Kristen Wiig, comes across as a bit less dense, but everybody else in Steve’s crew, including Mary Elizabeth Ellis as his wife, is utterly dim, and the FBI agent leading the investigation (Leslie Jones) is about as goofy as the guys she’s tracking. Add to the mix Jandice (Kate McKinnon), the manipulative fiancée whom David leaves at the altar, and you have a full deck of redneck jokers.

Of course, the script adds plenty of extravagant embellishments to the plot, too—lots of outrageous costumes, embarrassing situations, vulgar asides and big confrontations—as well as heaping helpings of the scatological humor the script seems to favor. Perhaps this misbegotten caper wouldn’t lend itself to a less farcical treatment, but this wacky version of it does it no favors.

The cast is composed of able comedians, but all are handed mediocre material and most are forced to go way overboard in an attempt to sell it. The exception is Wilson, who’s given a series of run-on monologues that seem specifically designed for his standard con-man delivery but contain virtually no good lines. Galifianakis, a maddeningly uneven performer from movie to movie, is burdened with trying to carry the bulk of this one, and he certainly proves willing to endure any indignity in search of laughs, but while the idiot shtick might work over the course of a five-minute sketch on SNL (the format in which Lorne Michaels, one of the producers, has proven his skill, as he never has in features), but quickly grows deadening when dragged out over ninety minutes. A similar problem plagues Sudeikis, another talented guy, who’s stuck with a one-note character that wasn’t much funny to begin with. Among the others, the distaff side—Wiig, McKinnon, Jones and Ellis—fare best, if only because they get less screen time. The physical production—deliberately tacky, one hopes—and cinematography that veers from glaring to ordinary does them no favors, either.

Painfully unfunny, “Masterminds” feels like a movie its own moronic characters might have made. And as the second release in the post-bankruptcy era of Relativity Studios (following the aptly titled “The Disappointments Room”), it suggests that those in charge of the still-fragile distributor might not have been ready to jump back into the fray.