(Reuters) - Former drug company executive Martin Shkreli could spend years in prison for Friday’s investor fraud conviction if the judge focuses on the intended impact of his crime and his “Pharma Bro” social media antics, according to legal experts.

Former drug company executive Martin Shkreli exits U.S. District Court after being convicted of securities fraud in the Brooklyn borough of New York City, U.S., August 4, 2017. REUTERS/Carlo Allegri

Shkreli, widely criticized after he acquired rights to an infection treatment and then raised prices 5,000 percent in 2015, hopes to avoid prison because of an unusual twist to his case: defrauded investors suffered no loss from his crime.

That could favor Shkreli, because investor harm is the main factor in determining a sentence for securities fraud. However, a law enforcement source said prosecutors will challenge Shkreli’s underlying assumption of how to calculate the investor losses.

Hours after his conviction, Shkreli proclaimed on YouTube the mixed verdict by the federal jury in Brooklyn as an “astounding victory.”

“I’m one of the richest New Yorkers there is, and after today’s outcome it’s going to stay that way,” he said, showing no sign of contrition.

Lawyers unconnected with the case said comments on YouTube and other social media by the famously outspoken 34-year-old could backfire at sentencing.

“He seems to lack any remorse so this will likely cause the judge to avoid appearing lenient when she sentences him,” said James Cox, a law professor at Duke University.

Shkreli was convicted of defrauding investors in his two failed hedge funds, MSMB Capital Management and MSMB Healthcare Management, by concealing trading losses behind fake account statements.

Prosecutors said he eventually paid investors back with stock or cash from Retrophin Inc, a biopharmaceutical company he managed, by having them sign settlement or consulting agreements with the company.

But while Shkreli was convicted on three securities fraud and conspiracy counts, he was acquitted of other charges, including that he conspired to steal $11 million in assets from Retrophin.

Benjamin Brafman, Shkreli’s lawyer, said because the hedge fund investors ultimately profited, his client’s sentencing range should be zero to six months, which allows for probation in lieu of prison.

Brafman in an email on Saturday acknowledged Shkreli’s social media habits are “not helpful” and hoped the court would focus on the facts of the case and the law.

“My hope is that the court will ignore the childish and compulsive tweeting of Mr. Shkreli that‎ is his right to do,” Brafman said.

Shkreli could benefit from steps he took to repay investors before he caught the attention of authorities.

“As long as the investors were paid back before he knew there was a criminal investigation that is subtracted from any loss figure,” said Sarah Walters, a lawyer at the law firm McDermott Will & Emery.

Prosecutors are expected to argue the intended losses of the fraud were much higher, noting the millions of dollars that investors lost before they were repaid, according to the law enforcement source, who requested anonymity to discuss the case.

That could allow for a lengthier sentence, as under federal sentencing guidelines, judges are to consider the actual or intended loss, whichever is higher.

Legal experts also said prosecutors could argue for a lengthier sentence by asking U.S. District Judge Kiyo Matsumoto to factor in the conduct involving Retrophin despite the acquittals.

While juries must find wrongdoing under the high standard of proof beyond a reasonable doubt, judges at sentencing may consider facts proven by the lower standard of preponderance of the evidence.

The guidelines are advisory only, and Matsumoto can factor in other issues, including Shkreli’s trash-talking habits.

“In this case, I imagine they will focus more on that he is a liar, he disparages people, he is a disruptive force and he has a complete lack of remorse,” said John Zach, a lawyer at Boies, Schiller & Flexner.