Watching Hancock at a pre-release critics’ screening, I was convinced it would be either one of the all-time biggest flops, or a cult film that would be picked over and obsessed about for decades to come. Hancock did what big studio films almost never do: It surprised me. I was impressed by its audacity, even as I felt the massive third-act gearshift between glib, goofy superhero slapstick and brooding, straight-faced mythologizing simply did not work.

It turns out that critics were among the last to be shocked by the big twist in Hancock. Instead of preserving that element of surprise, Hancock’s advertising revealed that what was initially sold as the story of bitter, self-loathing superhero Hancock (Will Smith) was actually the saga of two superheroes, one of whom, Mary (Charlize Theron), spends the entire first hour of the film in her disguise as a housewife before she’s revealed as even more powerful than Hancock.

From a commercial standpoint, turning this into a non-twist ended up paying huge dividends. Despite my suspicion that Hancock’s unexpected originality and audacity would spell its commercial doom, it ended up being America’s fourth highest-grossing film of 2008, trailing only The Dark Knight, Iron Man, and Indiana Jones And The Crystal Skull. My prediction of cult fame for the film seems similarly off-base: Somehow, an audacious superhero movie starring Will Smith that grossed more than half a billion dollars internationally and had the potential to become a tentpole franchise inspired shockingly little controversy and conversation, despite the central, essential place superhero movies and superheroes (and Will Smith, for that matter) play in our culture. This Halloween, you will not see children with fake stubble, bloodshot eyes, and too-tight leather Hancock costumes begging for bite-sized Snickers bars. I don’t seem to recall many people cosplaying Hancock the last time I went to Chicago’s C2E2 comics convention. Hancock came, it made an insane amount of money, and it left a surprisingly faint footprint.

Part of the film’s muted reception, culturally at least, seems attributable to the studio pre-spoiling the film. Revealing the twist in commercials made the film’s extreme late tonal shift less jarring, and by extension, less likely to incite anger and toxic buzz. Hancock could not be accused of a massive bait-and-switch when the commercials revealed exactly where the film’s narrative was heading. Sure, it lost the element of surprise, but from a marketing standpoint, that isn’t necessarily pejorative. (Witness the culture-wide explosion of anger that recently greeted the surprise that U2 was giving away its new album via Apple, something that in an alternate universe might actually have been considered a generous gesture.)

By the time Hancock hit theaters, it had already been through a number of permutations. The film began as a spec script in the mid-1990s by an unknown writer named Vincent Ngo. Originally titled Tonight, He Comes, Ngo’s screenplay had a reputation as one of those projects that are simultaneously brilliant and unfilmable. Sometimes scripts with those kinds of reputations turn out to be masterpieces. Sometimes they turn out to be The Beaver, at which point it becomes apparent that they can be made, but shouldn’t be.

Having read Tonight, He Comes, I think it falls into the second category. I don’t read many screenplays, because they’re fundamentally blueprints whose value ultimately lies in what they will eventually become, not in what they are on the page. Tonight, He Comes implies that’s a wise policy. Poring through the script online, I was profoundly annoyed by things that probably never would have registered onscreen, even if the film had been made directly from Ngo’s screenplay, rather than being radically rewritten to keep only the bare-bones outline of his work.

I was irritated, for instance, by the screenplay’s description of Mary, the mother and wife Hancock becomes obsessed with, as possessing “breasts so full they could pop a boner in your dead uncle” and an adolescent boy’s teacher possessing “lips, legs, lungs-stuff prepubescent wet dreams are made of.” Of course, there’s no reason filmmakers would have to honor, or even humor, Ngo’s heavy-breathing descriptions of his female characters.

Tonight, He Comes (the title is even more brazenly sexual than the script) follows the sorrowful travails of Hancock, an alcoholic, self-loathing, deeply depressed superhero who swoops into the lives of a lower-middle-class family. Where Hancock is so virile and powerful, he literally can destroy women with his seed, Horus, the family’s father, is defined by his powerlessness. He’s a security guard who aspired to be the cop his dad wanted/angrily demanded him to be (cheap psychology alert!) but is instead such a pathetic sad-sack that when bullies urinate on his bullied son, Horus encourages the kid to turn the other cheek.

Hancock becomes fixated on Mary (and her ripe, full breasts). He quickly establishes himself as a father surrogate far superior to the dopey, sad-sack man of the house, and in the final act, he morphs from belligerent antihero into proper villain when he abducts Mary, and Horus finally defeats him. Hancock ends up acting as an accidental life coach whose speeches about doing what one must do give Horus the motivation to stop being an emasculated husk of a man, and assert himself. To underscore that this impotent-seeming girly-man is now worthy of his full-breasted wife, the script even ends with Mary moaning in pleasure during sex with her now-triumphant husband.

Ngo’s script attracted the attention of filmmakers like Jonathan Mostow and Michael Mann, who ended up producing. Friday Night Lights director Peter Berg signed on, with a script radically re-written by Vince Gilligan, who juggled rewrites with preparations for a TV show he had created, called Breaking Bad. At that point, the film took on a much different form. It no longer took place in a dark, stormy, weather-besieged Eastern seaboard, but in sunny Southern California. And the dad was no longer Captain Sad-Sack, the most pathetic and tortured of half-men, but rather Ray Embrey (Jason Bateman), a handsome, charming, and confident husband and father hailed as the “Bono Of PR.” Ray lives in a giant house in a wealthy neighborhood, with his gorgeous wife Mary (Charlize Theron) and their young son Aaron.

Where the dad of Tonight, He Comes is defined by his inadequacy, Ray is a great, involved father. (That’s a rarity in movies like these, where dads are almost invariably lacking, and must redeem themselves somehow.) When his car is stuck at a railroad crossing and Hancock saves his life, Ray sees him as the client and opportunity of a lifetime: a superhero who has accomplished great things, but whose reputation is in tatters due to his habit of leaving millions of dollars of property damage in his wake, his long habit of ignoring subpoenas, and a public history of rampant jackassery to rival Justin Bieber’s.

Hancock is a superhero, but just as importantly, he’s a celebrity. Casting an actor of Smith’s popularity, a household name since he was a teenager, adds an additional element of meta-commentary. In Hancock, being a superhero is a lot like being a movie star. Everybody knows Hancock. For better or worse, his reputation precedes him. He doesn’t have to do anything to impress people, because the public is already impressed or enraged by him—as with celebrities, there seems to be precious little middle ground. Both are so powerful and privileged that that power and privilege comes to seem mundane. When the miraculous becomes normal for someone, it ceases to be noteworthy, or even interesting. Even the most transcendent thrills can lose their luster in the sad shadow of depression.

Smith plays Hancock as a man in a bone-deep state of exhaustion, so jaded by his incredible abilities that nothing seems to bring him the faintest glimmer of pleasure. The whiskey he’s constantly drinking doesn’t seem to make him drunk; it just chases away the terrifying specter of sobriety. He’s devoid of hope until he latches onto Ray’s positivity and desire to salvage his public image. He acts as though this is his last chance in a lifetime full of regrets—or things he would regret if he could remember them. (He has blacked out seemingly most of his past.) Like a celebrity who has been famous too long to have any frame of reference for how the non-famous behave, Hancock needs to be trained to act like a non-feral human. Nothing comes easy to him, not even the most basic social niceties.

When Ray tells him to smile, Hancock nervously bares his teeth like an animal trying to frighten a predator. When Ray tells him he should thank security guards and other members of the rabble he encounters in his business, Hancock sounds as shaky and unconvincing as a sub-par actor cold-reading a script he doesn’t understand.

For its first hour, Hancock is a consistently funny, inventive combination of deadpan under-reaction and goofy superhero slapstick. It isn’t as audacious as the Superman-ponders-suicide grimness of Tonight, He Comes, but it’s a lot more entertaining. Then, at around the one-hour mark Hancock discovers that Mary is also a superhero, and that they’ve lived together in a curious state of super-co-dependence for thousands of years. They split up 80 years earlier when Hancock was attacked and suffered amnesia, leading Mary to abandon him so she might have at least a fighting chance of a normal life, since their powers are dependent upon their proximity to each other, and they never age.

With this revelation, the film adopts a jarring new tone. The comedy of the first hour is replaced by dour seriousness. The glibness that makes Hancock so much fun in the early going cannot support the world-building of the third act, and that mythology feels like it was made up on the fly. It feels more like a panicked script-doctor’s afterthought than the product of any grand design.

Theron has the presence and the charisma to play a superhero who hides her inner light from the world for the sake of her family and her own happiness, but the film doesn’t give her anything funny to do, which for a lead in a comedy is deadly. But in its third act, Hancock is barely a comedy, and Theron is burdened with delivering tons of clunky exposition as the film radically shifts from one kind of movie to another, from a Mystery Men-like romp to an Unbreakable-like deconstruction of comic-book mythology.

Hancock’s third-act shift makes the film messier and more interesting, though less satisfying and successful. But I’ve come to prize messiness as a virtue in its own right, especially when applied to a commercial undertaking as massive as Hancock. I admire the chances it takes even when they don’t pay off, as well as its willingness to really experiment with the superhero form. I suspect that messiness helps explain why even in a culture as obsessed with superheroes as our own, Hancock hasn’t produced a sequel, despite its extraordinary financial success. (There has been scattered talk of a follow-up.) In a climate where superhero franchises are rebooted on a seemingly daily basis, Hancock has proven strangely resistant to this impulse. If there is a reboot for Hancock somewhere down the road (say, as a vehicle for, I dunno, Jaden Smith, when he needs to rehabilitate his image after drunkenly crashing a series of tanks in his mid-20s), let’s hope it isn’t too gritty. Despite the original script’s lofty reputation for transgressive genius, it turns out that removing a lot of the grit and sordid darkness from Ngo’s original vision was essential. It helped transform an intriguing, unfeasible idea into something deeply flawed, but also deeply entertaining.

Up next: Convoy