WARNING: The following article contains spoilers for Shazam!, in theaters now.

Originally known as Captain Marvel, Shazam made his comic book debut in 1939, and at the height of his popularity during World War II, his adventures outsold those of Superman. Except for a period of about two decades, from late 1953 to 1972, the superhero's stories have been told across much of the medium's history. Therefore, Warner Bros. and DC had more than enough source material to mine to bring Shazam back to the big screen.

RELATED: Shazam: The (Many) Origins of DC's Mightiest Mortal

But if you're looking for the primary inspiration for Shazam!, you won't have to travel far. The comic series that serves as the basis for David F. Sandberg's film was published in 2012. Written by Geoff Johns and illustrated by Gary Frank, it was originally published as a back-up feature in Justice League before being collected into a single volume, Shazam!

If you pick up the comic, you'll realize that it has a lot in common with the DC film. However, there are still some major differences that set Shazam! apart from the source material.

The Villain

Sivana in Shazam!

The main antagonist of the film is Doctor Sivana, played by Mark Strong, whose goal is to return to the Rock of Eternity, after briefly being taken there when he was a child. He's on a quest for truth and absolute power, which pits him against the heroic Billy Batson. However, it's much different in the comics book.

RELATED: How Shazam! Sets Up a Sequel

In the series, Sivana appears only as a secondary antagonist. The primary threat is Black Adam, who's only subtly referenced in the film. Still, Sivana's actions in the film are similar to those of Black Adam, from his partnership with the Seven Deadly Sins to his final battle with Shazam.

What's more, in the comic, Sivana was motivated by his desire to help save his family. When science failed him, he turned to magic, and an accident made it so one of his eyes could see magic in action. In the film, however, Sivana's eye is different: It gives him superpowers similar to those of Black Adam, due to the Seven Deadly Sins contained with in it.

The Seven Deadly Sins

In Warner Bros.' Shazam!, the Seven Deadly Sins of Man are trapped within statues in the Rock of Eternity, until they're freed by Doctor Sivana. They're then contained inside the supervillain, who is able to unleash them whenever he chooses to.

However, it's actually different in the comic book. There, the seven monsters had been trapped within the bodies of men and women, and then scattered across the globe. It was up to Sivana and Black Adam to find and awaken them.

Billy Batson's Origin

Shazam DC Comics

When we first meet Billy Batson in Shazam!, he's desperate to find his mother, after being separated from her sometime earlier. However, when he finally locates her, Billy learns his mother purposely left him behind. That's much different from the comic, in which Billy orphaned by the death of his parents. There is no quest to find them, and no major revelation about his mother abandoning him.

RELATED: Shazam! Mid-Credits Scene's Massive Surprise, Explained

However, the rest remains the same. Billy is taken into a foster home, where he first acts cold toward his new brothers and sisters. Once he becomes Shazam, he befriends Freddy Freeman, learning the value of family along the way, until he learns to share his power to create a whole family of superheroes.

Directed by David F. Sandberg, Shazam! stars Asher Angel as Billy Batson, Zachary Levi as Shazam, Mark Strong as Dr. Thaddeus Sivana, Djimon Hounsou as the ancient wizard Shazam, Grace Fulton as Mary Bromfield, Jack Dylan Grazer as Frederick “Freddy” Freeman, Ian Chen as Eugene Choi, Jovan Armand as Pedro Peña, Faithe Herman as Darla Dudley, Cooper Andrews as Victor Vásquez and Marta Milans as Rosa Vásquez.