Jim Urquhart / REUTERS Hewlett Packard CEO and President Meg Whitman attends the Allen & Co Media Conference in Sun Valley, Idaho July 12, 2012.

The fallout from Hewlett-Packard’s purchase of software company Autonomy, which has turned into a multi-billion dollar debacle, keeps getting worse. Last week, after a several-months-long investigation, H.P. announced an $8.8 billion write-down related to allegedly fraudulent accounting at Autonomy, which it purchased last year for more than $11 billion. H.P. said it had referred the matter to criminal and regulatory authorities in the U.S. and in Britain, where Autonomy was founded. The scandal has led to a bitter war of words between H.P. executives, including CEO Meg Whitman, and Autonomy founder Mike Lynch, who has demanded details of H.P.’s investigation. H.P. has responded by telling Lynch that it will see him in court.

Earlier this week, H.P. was slapped with a shareholder lawsuit in federal court in San Jose, California, which named Whitman, H.P.’s board of directors, and auditing firms Deloitte and KPMG as defendants. The lawsuit alleges that H.P. and its accountants were negligent in missing red flags related to the Autonomy purchase. The lawsuit, which is likely the first of many related to the scandal, charges that H.P.’s failure to perform adequate due diligence caused the company to significantly overpay for Autonomy, resulting in billions of dollars of damages to the company and its shareholders.

So who’s to blame for this mess? Was it H.P.’s current and former management, which didn’t really have a handle on what they were buying? Was it the company’s auditors, who were supposed to perform due diligence on the deal? Was it Lynch and his Autonomy colleagues, who are alleged to have cooked the books at their company?

The short answer is we just don’t know yet. There’s a lot of blame flying around, but it’s hard to evaluate the evidence H.P. uncovered in its probe, because the company has not released any details. Meanwhile, U.S. and U.K. authorities have only just begun their respective investigations, and it could be months before civil or criminal charges are filed. One thing seems clear: As H.P. CEO, Whitman bears ultimate responsibility for this debacle, and already there are rumblings that her days at the tech giant may be “numbered.”

(MORE: SAC Capital: Feds Are Probing Insider Trading Scandal)

The simple fact is that H.P.’s problems extend well beyond the Autonomy mess, as Keven Kelleher observed recently in PandoDaily: “The company’s revenue has declined for five straight quarters, as smartphones and tablets eat into demand for its PC business, and as cloud computing obviates need for printing photos, documents, and boarding passes,” Kelleher wrote. “HP was already in the midst of an arduous and unlikely turnaround, and the problems with Autonomy are going to make the turnaround that much more improbable.”

Let’s take a step back and look at the background on this scandal. Tech giant Hewlett-Packard is one of the most storied firms in Silicon Valley. The company’s legendary founders, Bill Hewlett and Dave Packard, founded H.P. in 1939 in a Palo Alto garage with $538 in startup capital. The two men are widely considered to be the symbolic founders — or at least fathers — of Silicon Valley. Over the decades, H.P. grew to be one of the most important technology companies in America. Wired magazine credits H.P. with producing the first personal computer, the H.P. 9100A, in 1968. The company would go on to produce a range of popular consumer electronics, including desktop computers, laptops and printers.

But over the last decade, there has been a fundamental shift in the technology industry away from low-margin hardware devices such as PCs and printers, and toward software and services. No major tech firm has been able to navigate this transition better than I.B.M., which acquired PricewaterhouseCoopers’ consulting business in 2002, and sold its personal computer business, including its ThinkPad line of laptops, to Chinese hardware giant Lenovo in 2005. By contrast, H.P. has struggled to manage the shift from hardware to software and services, and in recent years has seemed adrift, lacking a clear strategic vision to move it forward.

(MORE: Google CEO Meets with Feds as U.S. Senator Blasts FTC Over Antitrust Probe)

H.P.’s purchase of U.K.-based software firm Autonomy in 2011, for over $11 billion, was supposed to be a major component of H.P.’s shift to software. The deal was initiated under former H.P. CEO Léo Apotheker and consummated under his successor, former eBay CEO Meg Whitman, who was named to lead H.P. in September 2011. Autonomy, which was founded by two Cambridge scientists, including Mike Lynch, produces software that allows companies to detect patterns from large collections of data. Autonomy was supposed to be “the crown jewel of the software turnaround and the software transition” at H.P., Edward Jones analyst Bill Kreher told Bloomberg. “They really have to rethink their plans here. Certainly this is a setback for a company that is trying to restore its credibility as an enterprise leader.”

H.P.’s purchase of Autonomy generated a massive, $800 million windfall for Lynch, who joined H.P. to run the division until he was unceremoniously fired by Whitman in May for failing to deliver satisfactory financial results. It was only then, according to H.P., that a senior member of Lynch’s management team came forward alleging serious accounting improprieties prior to the purchase. H.P. enlisted PricewaterhouseCoopers to conduct a forensic investigation into the allegations. After a multi-month probe, H.P. delivered a bombshell to shareholders last week on the company’s earnings call. What the investigators found was deeply troubling: accounting improprieties, misrepresentations and disclosure failures. As a result, H.P. was forced to take a whopping $8.8 billion write-down on the purchase, causing its stock price to tumble to a ten-year low. H.P. shares have fallen more than 50% so far this year.

“What we now believe,” Whitman told the BBC recently, “is that there was willful effort on the part of certain members of Autonomy’s management to inflate the underlying financial metrics of Autonomy when it was a publicly held company before HP bought it, in a deliberate effort to mislead shareholders and mislead potential buyers of the company.” In other words, H.P. believes that Autonomy officials cooked the company’s books in order to make it appear more valuable than it really was, and thus receive a higher price for the sale. H.P. has referred the matter to the Securities and Exchange Commission and the UK’s Serious Fraud Office for civil and criminal investigation.

(MORE: Murdoch Says ‘YES’ to the Yankees: Why the Deal Could Help Fox Take On ESPN)

For his part, Lynch has denied wrongdoing and accused H.P. of mismanaging Automony after the acquisition. “I utterly reject all allegations of impropriety,” Lynch wrote in an open letter to H.P.’s board earlier this week. “Having no details beyond the limited public information provided last week, and still with no further contact from you, I am writing today to ask you, the board of HP, for immediate and specific explanations for the allegations HP is making.”

H.P. responded with the following tartly-worded statement. “While Dr. Lynch is eager for a debate, we believe the legal process is the correct method in which to bring out the facts and take action on behalf of our shareholders,” the company said. “In that setting, we look forward to hearing Dr. Lynch and other former Autonomy employees answer questions under penalty of perjury.”

The Autonomy debacle is just the latest blow for H.P., a storied technology firm whose history mirrors that of Silicon Valley itself. It’s unfortunate to see this once-proud company suffer such tribulations. But given the multiple ongoing investigations and the likelihood of litigation, this scandal may very well get worse for H.P. before it gets better. And even if H.P. can eventually put the Autonomy episode behind it, and integrate Autonomy’s technology and clients into its business, the tech giant still faces an uphill battle — amid a rapidly changing and highly competitive technology industry — to regain its former glory.

Clarification 11/30: An earlier version of this story said that IBM sold its hardware business to Lenovo. Big Blue only sold its PC business, including the ThinkPad line of laptops, to the Chinese hardware giant. IBM is still in the hardware business.