If only what happened in Vegas had stayed in Vegas.

Everything that made “The Hangover” such an unexpected hit — its bold, brilliant pick-up-the-pieces story structure; the way it reveled in exposing the wild side of its outwardly conventional (if mismatched) buddies; and the big dose of strange that was Zach Galifianakis in his breakthrough movie role — has been squandered and cheapened in two uninspired, largely mirthless and meretricious sequels.

So much for hair of the dog.

At least this time Todd Phillips and co-writer Craig Mazin have come up with some new beats in “The Hangover Part III,” instead of presenting a carbon copy of the first film. (Original writers Jon Lucas and Scott Moore are long gone, of course.) If you’re looking for plot, they’ve got one. It’s lazy, but at least it’s straightforward.

Phil, Stu and Doug (Bradley Cooper, Ed Helms and Justin Bartha) are escorting their emotionally volatile buddy Alan (Zach Galifianakis) to a rehab clinic when they’re forced off the road. Crime boss Marshall (John Goodman) explains — at length — how their old sparring partner Chow (Ken Jeong) has escaped from a Bangkok prison. Marshall means to hold Doug captive until the Wolfpack produces Chow and the gold bullion he stole.

The hunt for Chow takes them to Mexico, for no very good reason, then back to Nevada, for closure (we hope).

If Goodman seems subdued after his big, boisterous turns in “Argo” and “Flight,” it could be because the writing is so hack — or maybe he figured there was just no way anyone was going further over the top than Ken Jeong, whose angry cokehead /rabid degenerate shtick is way beyond funny. His seething hatred for man and beast (“Make sure you kill the guard dogs,” he insists at one point) is so venomous it smacks of some kind of warped integrity.

Not that Phillips and company are aiming for warm and fuzzy here. The movie begins (you probably saw a PG version in the trailer) with a giraffe coming to a sticky end on a highway overpass. After buttering us up with this grotesque roadkill, the writers follow through with a scene of Alan blithely badgering his father into a fatal heart attack. It’s daring, I suppose, almost a form of anti-comedy. It’s so divorced from anything you would want to laugh at. Except that almost none of the audience I saw it with was laughing.

Too often, in “Hangover III,” profanity passes for wit and bad taste is equated with taboo-busting. If there is something subversive about Alan’s man-love for Phil — and Galifianakis’ presexual overgrown adolescent remains the movie’s closeted comedic focal point — it’s all bound up in an ugly tangle of homophobic taunts, male bonding cliches, and the virtual exclusion of the opposite sex (Heather Graham’s solitary scene very much included).

For a series built on friendship, this is one cold and alienating movie, a comedy for sociopaths. The longer we hang out with these guys, the less fun they are to be with. And judging by the way he seems to be edging out of the frame all the time, I’m guessing Bradley Cooper feels the same way. It may represent a marginal improvement on the disastrous second film, but there must be a hole in the desert somewhere big enough to bury this sorry, sordid franchise once and for all.

Tom Charity | Special to CNN