Seth Rogen takes the high holidays literally in “The Night Before,” a raucous drug-fueled ode to the seasonal spirit’s power to help man-children mature into responsible adults. Little more than a Christmas-y spin on many of the actor’s prior comedies, Jonathan Levine’s film nonetheless generates significant humor from its tale of three lifelong friends who come together on Dec. 24 for one last night of go-for-broke New York revelry — this time with the aim of finally attending the renowned Nutcracka Ball that has for the past 14 years eluded them. Brimming with R-rated naughtiness before, per formula, turning far too nice, it’s a profanely festive odyssey that should far exceed Rogen’s controversial 2014 year-end effort, “The Interview,” and place closer to the jolly box office territory of last summer’s $150 million-grossing “Neighbors.”

Reteaming with both co-star Joseph Gordon-Levitt and director Levine, his collaborators on 2011’s cancer dramedy “50/50,” Rogen dons a bold white-and-blue sweater emblazoned with a giant Jewish star as Isaac, a lawyer on the verge of having his first child with wife Betsy (Jillian Bell). That daunting duty doesn’t, at the outset, seem to intimidate Isaac. Yet cracks in his calm-and-cool facade begin to materialize once he embarks on a nocturnal adventure with best friends Chris (Anthony Mackie), a football star whose sudden fame at age 34 is the product of steroids, and Ethan (Gordon-Levitt), a lonely, going-nowhere musician who’s getting over a break-up with Diana (Lizzy Caplan), and whose parents’ 2001 deaths were the catalyst for the trio’s yearly ritual of getting smashed on the night before Christmas.

Given a heavenly gift box of narcotics by Betsy, Isaac hits the town alongside his buddies in Chris’ Red Bull limousine — a perk of his celebrity, which he nurtures via endless product-peddling social-media posts — and immediately begins chomping on handfuls of hallucinogenic mushrooms and then tempering his trip with snorts of cocaine. He’s the out-of-control lunatic of this merry threesome, and Rogen’s zonked-to-insanity performance is the lifeblood of “The Night Before,” giving it the sort of joyous, madcap energy that comes from letting loose with one’s closest comrades, even to the point of potential oblivion. As in a stellar sequence that finds Isaac trying in vain to achieve sobriety — an effort that results in bug-eyed glares and awkward elbow-on-knee sitting positions — Rogen is at his finest when in the throes of panicked, confused, paranoid substance abuse.

Mackie, meanwhile, exudes an amusing cockiness underscored by insecurity, fitting for a character doing his best to delight in attention that he knows hasn’t been virtuously attained. His fan-indulging bluster meshes nicely with Rogen’s outsized druggie daftness, as well as the aw-shucks mopiness of Gordon-Levitt, here condemned to be the unfunny straight man. Ethan’s desperate desire to cling to this Yuletide-partying procedure stems from his fear of losing touch with his surrogate brothers, just as his refusal to meet Diana’s parents — the cause of their separation — speaks to his terror over the changes that might come from acting his age. He’s the embodiment of the story’s hackneyed boys-becoming-men trajectory, and though Gordon-Levitt is charming, his Ethan is the buzzkill of these proceedings, which only truly hum when letting loose with unbridled impropriety.

There’s quite a bit of that throughout “The Night Before” as Ethan, Isaac, and Chris make their way from one cherished spot to another, including Rockefeller Center’s towering tree, the gigantic FAO Schwarz piano made famous by “Big,” a karaoke bar where they perform Run-DMC’s “Christmas in Hollis,” and Chris’ mom’s house, where they play a round of the classic Nintendo 64 video game “GoldenEye.” Those pit stops feature just a few of the script’s many shoutouts to ‘80s and ‘90s pop-culture artifacts, which are sure to play well to Rogen’s (and the film’s) thirtysomething target audience, and which come across as authentic examples of these characters’ inability to stop clinging to their adolescent pasts.

Considering the hijinks-heavy nature of this endeavor, which in subject matter and attitude recalls 2011’s “A Very Harold and Kumar 3D Christmas,” some incidents prove less fruitful than others — such as a strained gag involving Isaac inadvertently switching phones with Diana’s friend Sarah (Mindy Kaling), and then contemplating a homosexual affair upon seeing the explicit crotch-shot pics she receives from an admirer named “James” (one guess as to that mystery man’s real identity). Fortunately, “The Night Before” proceeds with such go-for-broke momentum that any lulls in the action are quickly eradicated by the next wacko bit. The finest of these concern Rogen’s Jewish Isaac engaging in ludicrous dialogue with Christians (and their messiah), especially at a misbegotten visit to midnight mass. Equally inspired are the trio’s meetings with a pot dealer who provides the protagonists with “A Christmas Carol”-by-way-of-THC visions of their past, present and future, and who’s played by Michael Shannon as a more deadpan, mellow-but-menacing version of his usually hyper-intense on-screen self.

As with so many comedies about men learning to discard their hedonistic ways in order to confidently embrace roles as husbands, fathers and grown-ups, the film inevitably becomes a schmaltzy slog that tsk-tsks the very behavior it’s previously celebrated. Still, a few climactic Nutcracka Ball cameos partially mitigate this devolution into dreary earnestness, as does a subtle — if insufficiently explored — idea about the way holiday traditions bind friendships even when marriage, kids and jobs threaten to unravel them. While females are merely around to help facilitate their male counterparts’ transformations, this boys-will-be-boys saga is buoyed by its cast’s uninhibited enthusiasm for sex-and-weed-and-bodily-fluids madness — as well as by a score chockablock with holiday standards, and visuals awash in warm, twinkling lights, that cast a simultaneously vulgar, heady and heartfelt seasonal spell.