If you’ve read Paul Lieberman’s nonfiction book “Gangster Squad: Covert Cops, the Mob, and the Battle for Los Angeles,” or the series of L.A. Times stories that inspired it, you know all about the corruption that lurked at the heart of pre- and post-World War II L.A.

Seriously, though, you could have learned all you needed simply by watching a pair of movies: Roman Polanski’s 1974 film “Chinatown” and Curtis Hanson’s 1997 film “L.A. Confidential.” Both are superb examples of hard-edged crime fiction, the former a vintage Private-Eye mystery, the latter a period-piece police procedural. And both are based on real Los Angeles history, respectively, the great Owens Valley water grab and the battle to clean out rogue elements of the LAPD.

One thing you DON’T have to do is see Ruben Fleischer’s adaptation of Lieberman’s book. Fleischer, who directed 2009’s “Zombieland,” has given us a film that – even though it covers a fascinating period of American history – is about a phony as a spray-on suntan.

The story that Lieberman, a former L.A. Times reporter, tells is this: In 1946, in response to the growing mob presence in Los Angeles – most notably in the person of Mickey Cohen, a former underling of Bugsy Siegel but now a mob boss all his own – a group of L.A. cops formed their own secret society. Armed with Thompson submachine guns, and an endorsement that wavered with whomever was police chief at the moment, the so-called Gangster Squad made life hell for Cohen and other criminals by hitting them where it hurt: at their casinos, gambling parlors, houses of prostitution and so on.

It’s a riveting story, immersing us in the real-life world of vigilante cops. But director Fleischer screws up its telling. For one thing, consider how much his version of the story, which is based on an adaptation by screenwriter Will Beall, indulges in what author Lieberman describes as outright “fantasy.” Besides mixing up characters and timelines, “Gangster Squad” indulges in a succession of unlikely events – from a cop played by Anthony Mackie being able to throw knives with unerring accuracy to another cop played by Josh Brolin taking on the former prizefighter Cohen (Sean Penn in heavy makeup) in a climactic fistfight.

Indulging in “fantasy,” though, is one thing. The bigger problem with “Gangster Squad” is two-fold: One, Fleischer is heroizing the wrong guys. The cops here go outside black-letter law to hit at mobsters instead of – as “L.A. Confidential” did – following the far more courageous lawmen who engaged the harder enemy, the very forces that were working to protect Cohen and his ilk: crooked judges, politicians and even fellow cops.

Two, Fleischer adopts a tone that is more appropriate for a graphic novel than a serious movie. He embraces cliché – a wisecracking shoeshine boy, no less – while using decent actors such as Brolin, Mackie and Ryan Gosling to portray comic-book versions of junior Captain Americas. Meanwhile, a heavily made-up Penn seems to be less interested in capturing the nuances of the real Cohen than in auditioning for an even more cartoonish “Dick Tracy” remake.