LONDON—Award-winning screenwriter Isa Mazzei did not have a welcoming introduction to the movie industry. “I’ve worked in retail, I’ve worked in the tech industry, I’ve worked in porn, and I have never been more sexually harassed than trying to sell this film in Hollywood,” she told The Daily Beast.

Mazzei, a former cam girl, has written one of the hottest horror movies on this year’s genre festival circuit. Cam, which will debut on Netflix later this month, drags the audience inside the paranoia and perils of being an internet star.

Her success in creating a believable yet terrifying online dystopia was bolstered by its roots in Mazzei’s real fears, including the risks of being harassed, hacked, doxxed or assaulted. She scooped best screenplay at Fantasia Festival, where the movie also won Best First Feature.

Long before the buzz, Mazzei had to endure the sleaze of movie execs who believed they could harass and belittle her because of her previous sex work. Lots of them asked her to share details from her past life, some suggested she was only credited as the screenwriter as a gimmick to help the pitch, while one owner of a Hollywood agency went so far as to write an alternate ending to the semi-biographical movie that included himself and Mazzei inserted into the script.

“It was basically erotic fan-fiction of me and him,” said Mazzei. “And he was a pretty powerful person.”

She was 25 at the time.

The reaction to Mazzei within the industry redoubled her determination to create a movie that is driven by strong female leads. The protagonist is Alice (Madeline Brewer of Orange is the New Black and The Handmaid’s Tale), a webcam model who is earning big bucks and moving up the hierarchy at a porn site called Free Girls Live.

With hundreds of men at her beck and call online, Alice feels she is in control. She is the one telling them what she will be doing next, not the other way around. Her phone is constantly buzzing with compliments, she’s flush in gifts and cash payments, and her new apartment is filling up with expensive soft furnishings.

We soon see that the veneer of control can disappear quickly online. Flicking between the on-screen view of her camera and the reality of Alice toiling away to please her audience, we get a sense of the fine line between real life and the version of yourself that is broadcast on the internet.

In the first extended sequence of Alice broadcasting, we see paying members of the audience vote on what she should use to penetrate herself—from a tiny vibrator to an enormous dildo. An anonymous user suggests she use a knife, and suddenly we plunge into the scary side of the internet: “I want to cut your pussy open. I want you to bleed,” he says. “Go ahead, kill yourself.”

Anons holler and encourage her, as Alice does pick up a knife. The number of viewers, the tips, and her overall ranking—which are constantly being monitored at the side of the screen—are surging.

The more extreme her behavior, the more attention she garners.

The race toward the extremes is something Mazzei experienced in her own online career. “I made the most money and had the most viewers when I did BDSM and kinky shows,” she said. “The more extreme you go the more you get the reputation ‘oh, she's crazy,’ the more people want to come in and see that spectacle.”

It’s a temptation familiar to all manner of web publishers, from individual social media users to advertisers and the mainstream media, all the way down to the president of the United States.

Mazzei said: “The film could very easily be about a YouTube star or an Instagram celebrity or a Twitch streamer. But it’s a cam girl because it kind of is the furthest you can push this expression of digital identity.”

Just as Alice’s ranking is finally edging toward the hallowed top 10 on the site amid fierce competition from rival cam girls, she loses control of her own identity. She is locked out of her account and forced to watch on powerless and terrified as a mystery doppelgänger continues to cam in her name.

This new version of herself breaks the rules she set but pushes her online presence to ever greater heights.

When she begs the cops to help track down this supernatural impostor, an officer advises that if she doesn’t want to see this sort of thing she should stay off the internet.

His words were based on the real experience of a friend of Mazzei who got the same response from Luddite police officers after she was doxxed and then repeatedly “Swatted.” As Alice’s life descends into misery on screen, a rival spits the words: “Welcome to the internet.”

“These are the risks we all make when we agree to be online,” said Mazzei. “We have no privacy, but we all take that risk to be able to participate in this magnificent thing that we’ve created and we kind of just accepted it very nonchalantly.”

Cam will help to erode your nonchalance.

Now 27, Mazzei radiated movie-star confidence as she attended the London Film Festival to promote her debut film. She wants you to reconsider your attitude toward sex workers.

When Alice’s mother finally learns how her daughter has been pulling down such an impressive income, she is initially shocked but soon tries to offer support. “I do understand the female empowerment stuff,” she tells her.

Mazzei laughs. “There exists this idea that sex workers have to be either victims or empowered. They can’t just have a job. We don’t look at waiters and say, ‘Oh, are you empowered by bussing people’s dishes?’”

“ There exists this idea that sex workers have to be either victims or empowered. They can’t just have a job. We don’t look at waiters and say, ‘Oh, are you empowered by bussing people’s dishes?’ ”

The screenwriter, who grew up in Boulder, Colorado, thinks the media misunderstands the motivation of millions of U.S. sex workers. “There’s always this dichotomy: it’s either super glamorous or it’s super seedy. In reality sex workers are normal, professional, intelligent people.”

Her perspective as a former sex worker is exceedingly rare in screenwriting circles, but sadly it’s pretty rare to have any woman crafting horror movie scripts. Mazzei says that’s obvious from what you see on screen.

“It really irritates me about horror that it’s still such a trope to have a dumb woman. You hear a sound in your basement. I don’t know a single woman that would go down into the basement—we just don’t, we’re smart,” she said. “It was very important to me to have a protagonist that doesn’t make dumb decisions, but still have it be scary and to show that that can be done.”

She’s succeeded. Alice’s predicament in Cam is horrific and it’s no spoiler to say her response is both courageous and fiercely intelligent. The film is taut and tense as Alice, played with real drive by Brewer, tries to seize back control of her identity by any means necessary.

“Men can make successful films about women,” Mazzei told The Daily Beast. “It’s just about giving up a little bit of control and listening to women.”

Her collaborator on this film is her former high school sweetheart, Daniel Goldhaber. Their first production, Art of a Slow Death, was staged when they were around 16. It was about a man dying of insomnia. “It was very dark,” said Mazzei. “We liked dark themes.”

Judging by their next movie, there is no sign of them lightening up. It will be another female-led horror movie, this time focused on a serial killer. “It’s also somewhat autobiographical,” said Mazzei. “But in more of a symbolic way—obviously, I haven’t murdered anyone.”