Johnny Depp has signed up to play quirky McAfee antivirus creator John McAfee in the darkly comedic biopic King of the Jungle. While Depp’s credits stretch wide across the cinematic spectrum, the famed actor has plenty of comedies to his name, including his turn as bumbling scalawag Captain Jack Sparrow in the Pirates of the Caribbean film series (including the upcoming Dead Men Tell No Tales).

And while Depp has proven he has sea legs as the pirate captain – the first film earned him a Best Actor Oscar nomination and the franchise billions of dollars in box office booty – other attempts in the comedy realm (namely Mortdecai) have hit the wall. If the old adage “An actor is only as good as his script” holds up, though, then things are looking up for Depp with King of the Jungle.

According to Variety, Depp will be reateaming with Ed Wood screenwriters Scott Alexander and Larry Karaszewski for the dark comedy, which will be co-directed by Glenn Ficarra and John Requa. The film is based on the Wired article John McAfee’s Last Stand, which chronicles how the tech giant cashed in on his fortunes and embarked on a bizarre trek into the jungle in Belize. According to a statement from the production, it’s there McAfee sets up, a la Marlon Brando in Apocalypse Now, a “Colonel Kurtz-like compound of guns, sex and madness.”

The film will also follow a Wired magazine investigator, who, according to the production, “accepts what he thinks is a run-of-the-mill assignment to interview McAfee, but once he arrives in Belize, he finds himself pulled into McAfee’s escalating paranoia, slippery reality, and murder.”

Given the fact that Depp is a modern-day version of Brando – he was a friend of co-star of the actor (they worked together on Don Juan DeMarco) who created such brilliant characters as Kurtz and Don Vito Corleone in The Godfather – King of the Jungle seems like it’s completely in the actor’s wheelhouse. Depp has no doubt become the definitive king of quirky roles throughout his career, and among his best portrayals is the titular role in director Tim Burton’s Ed Wood – a film that, while not a hit in its initial theatrical release in 1994, has rightfully earned its cult status in subsequent years.

Given the combination of a story that’s so bizarre that it just can’t be made up and his gifted Ed Wood scribes to aid him, Depp appears to have made the right move signing on to King of the Jungle. No production start date or release information is available yet on the film, but Depp has lots of work to keep him busy in the interim – including a voice role in the 2018 animated sequel Gnomeo and Juliet: Sherlock Gnomes (voicing Sherlock), and a reprisal of his role as Gellert Grindelwald in Fantastic Beasts and Where to Find Them 2, also set for a 2018 release.