Sony Pictures' release of 'The Interview' at the Plaza Theater on, Christmas Day, December 25, 2014 in Atlanta, Georgia Moses Robinson | WireImage | Getty Images

Sony Pictures said "The Interview" has earned more than $15 million in online sales and another $2.8 million in theaters, an impressive return made possible by the publicity surrounding the cyberattack blamed on North Korea. The raunchy comedy that depicts the assassination of North Korean leader Kim Jong Un made almost as much money through online distribution and in limited theaters in its opening weekend as it would have in a wide release that was shelved after threats from hackers. The studio said on Sunday the film had been purchased or rented online more than 2 million times on the four days through Saturday, making it Sony Pictures' No. 1 online movie of all time.

"That is a huge number," said Jeff Bock, a box office analyst at Exhibitor Relations. "This is almost what it was going to do theatrically before it was pulled. It made about what people expected, but in a completely different way." The film that triggered the devastating cyberattack on the studio last month, which the United States says was launched by North Korea, opened Thursday in 331 independent theaters with a $1 million box office and $1.8 million over the subsequent three days, according to Sony. Many filmgoers and theater owners said they supported the film in the name of free speech. The $44 million film starring Seth Rogen and James Franco had been expected to gross at least $20 million in its opening holiday weekend if it had gone to wide release, according to Boxoffice.com. After large movie theater chains, like AMC and Regal Entertainment, refused to screen the comedy following threats of violence from hackers who opposed the film, Sony stitched together a limited release in theaters and a $5.99 video-on-demand (VOD) rental and $14.99 purchase option on YouTube Movies, Google Play, Microsoft Xbox Video and a dedicated site starting Dec. 24. Read MoreHow to stop hackers once they're in: CyberArk CEO

Sony had been fiercely criticized by top Hollywood talent and President Barack Obama for what many considered caving to the hackers. Sony maintained it had no choice but to pull the wide release and immediately began looking for alternative platforms with technology companies. 'Weird watching this on TV' It was still unclear whether Sony, which is still struggling with the impact of the cyberattack, would recoup the money it spent to make the film and the $30 million or $40 million in estimated marketing costs.