U.S. prosecutors say Megaupload raked in at least $175 million — mainly from people who used the site to illegally download songs, television shows and movies -— before the FBI shut it down in early 2012 and arrested Dotcom and other company officers.
Even in the US there’s no law against hosting encrypted files. They could be liable if they knew a specific file was illegal/pirated and didn’t take it down but a recent SCOTUS case (think it was Twitter v Taamneh) set the precedent that general knowledge of illegal activity is not enough.
I don’t think the original MegaUpload site hosted encrypted files, at least not in a zero-knowledge way. They also encouraged users to do things like upload their entire music libraries and had a searchable database of them called Megabox. They weren’t just a file hosting provider, they were in many instances encouraging their users to upload pirated content and had all of the tools to see what was being uploaded and what was infringing.