McCarthy embodies a Sandler-like combination of raw, inchoate anger and sticky sentimentality. With McCarthy, however, there’s an underlying political undercurrent to that anger that renders it less incoherent than Sandler’s, even though it’s just as free-flowing. McCarthy is a large, middle-aged woman in a pop-culture world that suggests women like her should neither be seen nor heard—and certainly should not be headlining big studio comedies. So when McCarthy’s characters holler and generally make an exuberant nuisance of themselves, it’s partially because women who fall so far outside the rubric of showbiz femininity need to scream just to be heard.

But whereas these days, Sandler barely even bothers to play characters who aren’t rich, powerful, and insanely privileged, McCarthy still manages to pull off playing a genuine underdog, a put-upon loser pushed to the breaking point by the aggravations and headaches of everyday life. Tammy casts McCarthy as the title character, a small-town denizen amid the worst day of her life. En route to work, she hits a deer, apparently a common occurrence for her. Getting to work late as a result, she’s unceremoniously fired. (Falcone plays her boss.) So she comes home early, and discovers her husband is cheating on her with their next-door neighbor.

With nothing left to lose, Tammy decides to strike out on the open road with her boozy, pill-popping grandmother Pearl (Susan Sarandon), looking for adventure and whatever comes their way. The film initially takes the form of a ramshackle Thelma & Louise, with these unlikely road warriors encountering a series of colorful characters and perilous situations, and before long, the women end up in a perilous situation that requires them to be unlikely outlaws.

Tammy makes a lot of hick jokes and dumb-lady jokes and fat jokes and food jokes without ever turning its abrasive but lovable protagonist into a joke. The film isn’t averse to playing Tammy’s love of food for laughs. But there’s a wistful, almost melancholy quality to McCarthy’s performance when she’s discussing beloved snack foods like Cheetos or Klondike Bars, and it deepens the comedy and the pathos. It underlines the emotional role food plays in her life, how it’s a source of comfort and pleasure in a life that seemingly doesn’t have much of either.

For all its slapstick outrageousness, Tammy never lets audiences forget that it’s about two fundamentally sad, broken women at a perilous crossroads in their lives. Pearl’s alcoholism is played for laughs, but it’s also taken seriously, and throughout the film, McCarthy and Falcone’s script offers fascinating snapshots of who these women used to be, and how their relationships evolved. Sarandon’s drunk, boob-flashing granny is the most substantive role she’s played in ages, and she rises to the occasion. Reduced to broad outlines, the character might seem like a dumb caricature, but Sarandon makes her a heartbreakingly real human being.

For example, Pearl reveals she was a Duane Allman groupie for a six-month stretch decades ago. That is exactly the kind of gag that would appear in an Sandler movie. It fits the tried-and-true mathematical formulas of his films perfectly: granny + sex + campy pop-culture references = instant hilarity. In Tammy, however, this revelation paints the character in a genuinely different light, and it’s treated in a refreshingly positive fashion, as evidence that Pearl lived lustily and without shame, and went after what she wanted, propriety be damned. But part of what makes Tammy oddly touching and multi-dimensional is that this streak of sexual adventuring is also intertwined with the alcoholism she’s been fighting her entire adult life, and that has clearly wreaked a lot of damage in her relationships, particularly with her granddaughter.

Tammy is refreshingly non-judgmental about just about everything, including Pearl’s sexual relationship with a handsome cowboy type named Earl (Gary Cole), who is not entirely unmarried. (Like so much in this deceptively crude film, Earl’s relationship status is complicated.) Tammy is stylistically undistinguished and hits a few wrong notes in its third act. A drunken outburst on Pearl’s part late in the film feels like an attempt to add conflict where none is needed, but the cast smooths out the rough edges. If you’re going to have a character flat-out deliver a monologue conveying the movie’s message, it’s wise to have Kathy Bates to do the sermonizing as Pearl’s wealthy, life-loving lesbian cousin. A crowd-pleasing, proudly working-class celebration of large women, old women, broke women, and women who love women, Tammy isn’t just consistently funny and unexpectedly touching and tender, it’s also genuinely subversive.