Kevin Costner has been miscast quite often in his career, but perhaps never more disastrously than in the movie out this week, Mr. Brooks.

He plays Earl Brooks, the prosperous owner of a box manufacturing plant in Portland, Ore., who assiduously maintains a boring façade so that nobody suspects he is secretly The Thumbprint Killer, a serial murderer who stalks couples for months before killing them in their homes and then posing their dead bodies in romantic tableaux. For all the momentary pleasure this gives him, Earl nevertheless views his homicidal urges as an addiction that he needs to kick, and he frequently tries to keep them at bay by reciting various prayers to himself. This is a part that many actors might have success with, but Costner has neither the scruffy anonymity of a man who blends into polite society, nor the snaky charm of a psychopath, nor the coiled self-loathing of a man who’s conscience-stricken by what he does. In short, he’s conspicuously lacking in every quality that this character is supposed to possess. The pity of it is, the rest of the film is fairly interesting.

William Hurt is cast exceptionally well as a man Earl calls “Marshall,” a shadowy figure who clearly represents Earl’s murderous id. The exchanges between Earl and Marshall are blackly witty, and Hurt’s icy demeanor is broken by some beautifully off-the-beat line readings and grotesque outbursts of laughter as he sizes up various threats to his existence. Hurt reveals a true flair for the demonic here. And people said in the 1980s that his acting was boring. Good as Hurt is, he’s upstaged by the film’s real star-making performance, which comes from Dane Cook. Yes, you read that right. Mr. Tourgasm plays a slimy sexual voyeur who calls himself “Mr. Smith,” who photographs Earl in the act of shooting his latest victims and uses the pictures to blackmail the killer into taking him along on his next kill. I hate Cook’s standup comedy act as much you probably do, but his youth, vulgarity, and nervous energy are exactly what the movie needs to offset the main character’s genteel middle-aged reserve. All the qualities that make Cook such an unsympathetic standup serve here to make his Smith a worthy foil to Mr. Brooks, and the juiciest part of this movie is the cat-and-mouse game that Earl plays with this dimwitted scumbag.

Tabor_farm exp 300x250

Director/co-writer Bruce A. Evans, whose one previous credit is the deservedly forgotten 1992 action-comedy Kuffs, imparts a somber atmosphere to the proceedings that usefully prevents the movie from overheating — there are several other serial killers here in addition to the characters I’ve mentioned. He and writing partner Raynold Gideon try to create a meditation on evil, and they can’t quite raise the material to that level. Yet they do manage to make a wickedly entertaining diversion, and you sense that if only they’d picked any one of several dozen viable lead actors, Mr. Brooks might have been the crackling, pulpy, subversive thriller that they envisioned.

 Mr. Brooks Starring Kevin Costner, William Hurt, and Dane Cook. Directed by Bruce A. Evans. Written by Bruce A. Evans and Raynold Gideon. Rated R.