A U.S. judge has denied a motion by lawyers for file-sharing service Megaupload to dismiss criminal copyright charges against the company.

Megaupload's lawyers had argued that the U.S. Department of Justice had not properly served the company with the charges against it, but Judge Liam O'Grady, in an order released late Friday, said the agency still has time to serve the company.

Lawyers for Megaupload had asked O'Grady to dismiss the criminal case because the DOJ seized the Hong Kong company's website and assets without serving it with the charges. The DOJ violated U.S. rules for criminal procedure by not attempting to serve Megaupload, they argued.

But O'Grady, with the U.S. District Court for the Eastern District of Virginia, questioned whether a foreign company should be able to skirt U.S. law by locating itself overseas. "It is doubtful that Congress would stamp with approval a procedural rule permitting a foreign corporate defendant to intentionally violate the laws of this country, yet evade the jurisdiction of United States' courts by purposefully failing to establish an address here," he wrote in the order.

The DOJ may be able to serve Megaupload properly through company officers also charged in the case, O'Grady wrote. "The court cannot find to a legal and factual certainty that the United States will be unable to serve the corporate defendant properly," he wrote.

Megaupload founder Kim Dotcom and six other executives also face copyright infringement charges. The DOJ is attempting to extradite them from New Zealand and other countries. The DOJ may be able to establish that one of the company's officers is a legitimate representative of the company for purposes of serving court papers, O'Grady wrote, making a dismissal premature "at this time."

A spokesman for Neil MacBride, U.S. attorney for the Eastern District of Virginia, said the office will "let the order speak for itself."

A lawyer for Megaupload wasn't immediately available for comment.

The DOJ in January shut down Megaupload and charged the company with conspiracy to commit racketeering, copyright infringement, money laundering, and other copyright-related offenses.

Grant Gross covers technology and telecom policy in the U.S. government for The IDG News Service. Follow Grant on Twitter at GrantGross. Grant's e-mail address is grant_gross@idg.com.