Paul Feig’s The Heat took a genre that has traditionally belonged to men — the buddy cop movie — and gave it a female twist. Feig’s new movie, Spy, does much the same thing, this time for spy films, a world that has long been by, about, and for dudes and their power fantasies. Spy explicitly subverts the genre’s typical gender dynamics by casting Melissa McCarthy as a lowly, desk-bound CIA analyst named Susan Cooper, who has spent her entire career in the shadow of a glamorous James Bond-esque spy (Jude Law) and then finally gets her opportunity to step into the spotlight and become a full-fledged field agent.

Feig makes a lot of jokes about the unglamorous nature of McCarthy’s office at the CIA, which is located in the building’s basement, and is infested with bats and mice. It’s a clever metaphor for the way Hollywood treats actresses; as his dutiful assistant, Susan is totally subservient to Law’s Bradley Fine, who assumes — the same way McCarthy’s superiors and many studio executives do — that she is not capable of handling the physical and mental rigors of the job (or, in a metatextual sense, doing action scenes or headlining big-budget comedies).

Spy’s defiant response to that kind of retrograde thinking is appealing. The Moneypennys of the world absolutely deserve their own spy movies, and McCarthy, who is often saddled with wacky sidekick roles, has more than enough charisma and talent to headline her own comedy. She more than proves her mettle as a leading lady in Spy, but the problem with the film is that gender politics aside, not much about it feels all that fresh. The truly inspired scenes are far outnumbered by the familiar ones recycled from earlier spy spoofs like Austin Powers and Top Secret!

There’s also surprisingly little humor about the CIA’s disturbingly invasive surveillance capabilities, which Susan uses to help guide Fine during his missions. The CIA seemingly has eyes everywhere, and can call in a drone strike (or even shut down the power grid of an entire foreign city) at a moment’s notice. But if Feig finds anything unsettling about this scenario, he keeps it to himself, and doesn’t make a single joke about the CIA’s limitless and seemingly unchecked power. Comedy or not, Spy is kind of Edward Snowden’s worst nightmare.

The basic premise comes from Face/Off (the movie even acknowledges it with a joke). A nuclear bomb is hidden somewhere in the world, and there’s only one person who knows where it is; the daughter of an international arms dealer played by Rose Byrne. A mysterious mole gives Byrne’s Rayna the identities of every CIA field agent, which means the agency has no choice but to send in the inexperienced but unknown Susan to save the day. Her boss gives her explicit instructions to “track and report,” but Susan’s a natural hero, and she can’t help getting more involved. Before long she’s assumed a new identity and infiltrated Rayna’s organization.

Susan not only has to contend with Rayna and her men, but with naysaying co-workers who keep telling her she’s not good enough to find the bomb. Chief among her doubters is Jason Statham playing an overconfident bungler who quits his CIA job at the start of the film, but keeps meddling in Susan’s affairs anyway. Statham, who’s not exactly known for his comedic chops, nonetheless steals scene after scene from McCarthy, including one hilarious series of riffs about his many Bunyanesque accomplishments, including the time he had his right arm ripped off and reattached it with his left.

McCarthy and Statham are great together recreating a lot of the same oil-and-water chemistry that fueled The Heat. And Rose Byrne has a lot of fun with her haughty, evil rich girl character (and McCarthy has a lot of fun teasing her about her ridiculously large hair). But Spy runs a bloated 120 minutes, with a Byzantine espionage plot, tired spy parody stuff (Hey! Did you know spy movies often begin with overblown titles sequences? Because they do.), and a ton of superfluous supporting characters (including Law, whose character feels slightly redundant next to Statham). By the big, confusing finale, the movie has completely run out of gas.

Still, there’s enough good stuff here, particularly the scenes between McCarthy and Statham, to warrant a mild recommendation. And it is great to see women having fun in an action comedy, instead of playing shrewish, nagging scolds. It’s surely no coincidence that Spy’s key fight scene takes place in a kitchen, where sexists idiots often tell women to go when they dare to speak their minds. In Spy, a couple of women go into a kitchen and thoroughly kick the crap out of each other. The sequence features knives, pots, pans, kicks to the groin, and absolutely no men whatsoever. And it is awesome.