Fans of "The Daily Show's" Steve Carell who have long awaited the feature film breakout of this hilarious actor will have to wait longer and look further than "The 40-Year-Old Virgin," an attenuated sketch that, despite its occasional moments of comic genius, doesn't do justice to Carell's gifts.

The film belongs to that genre that traffics in what might be described as narcissistic self-loathing, wherein men behave badly, comment self-consciously about how bad their behavior is and continue to behave badly. Measured on the scale of moral evolution, they might be lower than whale spit -- but they're the whale spit the world revolves around.

To be fair, Carell's character in "The 40-Year-Old Virgin" -- which indeed is a drawn-out version of a skit Carell developed while he was with the Second City comedy troupe -- doesn't behave badly. In fact, Andy Stitzer, a 40-year-old bachelor who works as an electronics store clerk, collects action figures and indeed has never had sex, is a great guy who respects women so much that, he explains at one point, he stays completely away from them.

As the sweet, lovable, unironically square leading character of "The 40-Year-Old Virgin," Andy provides the same core of sweetness that allowed the Farrelly brothers' "There's Something About Mary" to rise above the slough of idiocy, anxiety and misogyny in which post-adolescent sex comedies are usually mired. But "The 40-Year-Old Virgin" adheres to the core values of its genre, delivering set piece after set piece involving yet one more take on potty humor, gross-out jokes and sheer vulgarity. The movie's intentions -- to up the ante by stooping lower and lower -- are unmistakably announced in its opening sequence, an extended sight gag guaranteeing that, regardless of its critical reception, this is one film that won't be described as "flaccid."

But it won't be described as "great," either. The plot revolves around the efforts of Andy's colleagues -- played by Paul Rudd, Seth Rogen and Romany Malco -- to introduce him to sex, with their schemes inevitably ending with some slapstick misadventure. Meanwhile, Andy is pursuing a lovely woman named Trish (Catherine Keener), who runs a store across the street. Her business is helping people sell their stuff on eBay, and considering Andy's vast -- and very sad -- collection of toys, science fiction movie posters and obscure music memorabilia, viewers will be able to spot at least a financial happy ending a long way off.

As a collection of boy jokes, "The 40-Year-Old Virgin" doesn't break much new ground. Scenes in which the guys try to pick up drunk women at a bar, attend a speed-dating session and engage in homophobic repartee while playing video games feel stale. But once in a while, there are surprises. One of those women at the bar, played by Leslie Mann, pulls off a funny drunk-driving scene. And a sequence in which Andy gets his chest waxed -- in which Carell reportedly really did undergo the procedure -- rings with the kind of honesty that truly uncompromising sadistic humor needs in order to work.

The women's parts in "The 40-Year-Old Virgin" are nicely written, too. Yes, there's the de rigueur nymphomaniac (underwhelmingly played by Elizabeth Banks), but Keener's character is not only a sexy single mom, but a sexy single grandmom, and her character is invested with a degree of dignity rarely seen in similar movies. Also, the girl that Rudd's character is weepily pining for turns out to be completely out of the all-American ordinary in a welcome departure from the same old blond, blue-eyed, buxom ideal.

Rudd, it should be noted, delivers the kind of scene-stealing performance that Carell can usually be counted on for. But "The 40-Year-Old Virgin" belongs solely to Carell, who is always funny, even during the movie's most derivative moments. What's more, his signature deadpan delivery -- currently seen on "The Office" -- is ideally suited for straight-arrow Andy, a character the audience can laugh at but also root for as he refuses to compromise his ideals. In fact, the most surprising thing about "The 40-Year-Old Virgin" may be that despite the flagrantly exploitative and gratuitous efforts of his friends, Andy remains steadfastly chaste and genuinely humane. In a textbook example of the have-it-both-ways ethos of self-loathing narcissism, Carell has succeeded in creating a character of old-fashioned decency in a movie that otherwise flouts it at every turn.

The 40-Year-Old Virgin (111 minutes, at area theaters) is rated R for pervasive sexual content, profanity and some drug use.

Steve Carell's Andy is a genuinely humane, and funny, character stuck in a script that too often stoops to gratuitousness.Steve Carell stars as Andy in "The 40-Year-Old Virgin," who stands a chance of breaking his losing streak with Trish (Catherine Keener), above. But on a date with inebriated Nicky (Leslie Mann), below, he's taken on a wild ride.