With “Pain Hustlers,” David Yates was ready to exchange Hogwarts for strip-mall medical offices. It was time for the British director behind many of the Harry Potter films and the “Fantastic Beasts and Where to Find Them” series to leave magic behind for a grittier look at muggledom.

“Having spent such a long time making films about wizards, I wanted to do a film in the real world and a social-issue driven, but one that wasn’t too earnest and serious,” Yates says a week before the Netflix release debuts at this year’s Toronto Film Festival. “I wanted to tell a story that was entertaining and funny in a subversive kind of way. I’m moving from a heightened world of J.K. Rowling, but I’m not going straight to kitchen-sink drama. The characters here are so heightened and crazy and the world is so intense.”

Related Stories

Indeed, “Pain Hustlers,” which follows the rise and fall of a ethically compromised saleswoman named Liza Drake (Emily Blunt) at a pharmaceutical startup, isn’t preachy, even as its characters profit from pushing fentanyl, a drug that has devastated communities. Yates wanted the story to sting, but first he was interested in taking his audience on a wild, highly pleasurable ride before reminding viewers of the pain and suffering that made this lifestyle possible. It was similar to the third act wallop delivered by “The Wolf of Wall Street” or “The Big Short,” even if the protagonists in “Pain Hustlers” deal with a different kind of toxic asset.

Popular on Variety

“I wanted people to feel culpable,” Yates says. “I wanted to allow them to be drawn into the same sort of whirligig of desire and ambition and then to take the fall with our key protagonists. I needed to show that there are consequences to what they are doing. Tonally, it was a tightrope walk.”

The movie is frequently outrageous as it follows the lengths that Eliza will go — from flattery to bribery — in order to convince doctors to embrace the painkillers her company makes. There’s a manic intensity to the whole thing, particularly as Eliza climbs the corporate ladder and drowns her moral qualms in alcohol and partying. But initial cuts were even broader.

“There were variations of the film in which it was more wildly funny,” Yates says. “We had to tame that. If it’s too entertaining and funny in the first half or two-thirds of the people feel a little cheated when they get to the final third and we want them to be moved and shocked by all this. It’s a careful calibration.”

Ultimately, the film asks tough questions about how capitalism has perverted the medical system in the United States, where pharmaceutical companies are more interested in quarterly profits than helping people.

“We have a public healthcare system in the U.K. that has huge issues in terms of funding and resources, but it seems preferable to me to having everything defined by just making money,” Yates says. “The people you’re treating are a huge resource. Keeping them well, rather than just satisfying shareholders, should be the priority.”

“Pain Hustlers” was originally set up at Sony, but the studio put the film into turnaround after a number of high-profile dramas flopped at the box office. Yates and his team then took the movie to Cannes, where it sold to Netflix. He knows the experience of releasing “Pain Hustlers” on streaming will be different from the theatrical rollout of a Harry Potter film.

“Netflix have been incredibly supportive and passionate about the film, but coming to this juncture is a slightly strange transition,” Yates says. “‘Pain Hustlers’ will go into theaters for a week and then it will go on the platform where a lot of people will watch it. I will miss that big theatrical space, because I love being in a cinema.”

More from Variety