Sony’s all-female “Ghostbusters” will attempt to scare off the haters at the U.S. box office but faces a formidable foe for the no. 1 spot– the second session of “The Secret Life of Pets,” which will probably take in around $55 million.

That should be enough for “Pets” to top the opening of the much-debated “Ghostbusters,” modestly pegged by the studio to finish in the $38 million to $40 million range at 3,950 locations on Friday. But box office trackers believe the action-comedy reboot will take in more like $45 million to $50 million.

“Ghostbusters” is coming into the market following a rocky reception earlier in the year from fans of the 1984 original with griping emerging about women — Melissa McCarthy, Kristen Wiig, Kate McKinnon and Leslie Jones —  filling the roles originated by Dan Aykroyd, Bill Murray, Harold Ramis and Ernie Hudson.

The studio opted to delay press screenings of the movie, directed by Paul Feig, until July 9 but has since seen mostly positive reviews with a current 77% Fresh rating on Rotten Tomatoes. The critical support might lift grosses closer to $50 million but even at $40 million, “Ghostbusters” would be the biggest live-action comedy opening since “Pitch Perfect 2” opened in May, 2015, with a stunning $69 million.

On the plus side, the Feig-McCarthy collaboration has produced three hits in a row with “Bridesmaids,” “The Heat” and “Spy” — all which showed strong holding power following their opening weekends. With a $144 million price tag, “Ghostbusters” will need a need a similar performance to be profitable — and generate significant grosses overseas.

The 1984 original was a smash Stateside with $229 million in its first release after a $13.6 million opening and a $15.1 million second weekend. Foreign grosses totaled $53 million.

“Ghostbusters” opens internationally in the English language territories of the UK and Australia as well as Brazil and a handful of other smaller markets. The rest of western Europe, Japan, Mexico and Latin America are launching in the upcoming weeks.

The only other domestic opener is Broad Green’s drug drama “The Infiltrator,”  starring Bryan Cranston as a federal agent battling Pablo Escobar’s drug cartel and opening at about 1,600 locations. Expectations have been moderate with about $6 million expected over the first five days.

John Leguizamo, Diane Kruger, Benjamin Bratt, Yul Vazquez and Amy Ryan also star in “The Infiltrator.”

Paul Dergarabedian, senior media analyst with comScore, said “Pets” has proven already to be a tonic for what had been a disappointing summer.

“‘The Secret Life of Pets’ has certainly set the summer box office on a stronger path with renewed vigor and much momentum generated by its bigger than expected $104 million debut,” he said. “Further, with its short running time and continued strong word of mouth, it remains the film to beat this weekend. The reboot of Ghostbusters is generating a massive social media conversation and boasts huge awareness yet it will have its challenges to live up to the much beloved 1984 original and give ‘Pets’ a run for its money.”

As of Sunday, the year-to-date total is 3% above the same point last year at $6.12 billion while the summer to date is off 1.1% to $2.51 billion.

Dergarabedian said there’s still time for the summer box office to recover: “An onslaught of late summer product including ‘Ghostbusters,’ ‘Star Trek Beyond,’ ‘Ice Age,’ ‘Jason Bourne,’ ‘Suicide Squad’ and ‘War Dogs’ among others could spark a healthy back end dose of revenue for what has been a very unpredictable and volatile summer box office season.”