It takes skill and determination to produce the numbers Hewlett-Packard (HPQ 1.55%) has put up in the past six years. And I don't mean that in a good way. If you put 10 smart people in a room and tasked them with destroying shareholder value, they'd struggle to match HP's six-year run.

Consider this: Since 2006, HP has taken $26.1 billion in "restructuring charges, goodwill writedowns, and merger-related expenses," according to Rolfe Winkler of The Wall Street Journal. The company's current market cap is $23.5 billion. So in six years flat, more money was destroyed on overpriced, ill-conceived acquisitions than the entire 73-year-old company is worth today.

It gets worse. As Winkler notes, "Despite spending $38 billion in cash on acquisitions since 2006, free cash flow in the fiscal year that just ended was $6.9 billion, compared with $8.8 billion in fiscal 2006." HP's total free cash flow since 2006 is about $59 billion, so 64% of all shareholder earnings were spent with little to show for it.

It's safe to say: The only people who have gotten rich off HP in the past six years are lawyers, bankers, and shareholders of companies it has acquired.

But it gets even worse. HP spent a lot of cash on acquisitions, but it has also accumulated about $20 billion of debt since 2006. Where'd the rest of the cash go? Share buybacks, which totaled $51 billion from 2006 to 2011. The average repurchase price during that period was $40.80, or more than three times the current share price. That's another $36 billion blown.

So add another group to the list of people who have gotten rich off HP: anyone selling its stock.

The latest in the company's quest to destroy shareholder value was an $8 billion writedown tied to the $11 billion acquisition of Autonomy, made barely a year ago. HP says Autonomy's former executives "used accounting improprieties, misrepresentations, and disclosure failures to inflate the underlying financial metrics of the company, prior to Autonomy's acquisition by HP."

Apparently HP's management, its bankers, and its auditors had no idea there was any accounting funny business going on at Autonomy. We'll give them the benefit of the doubt. But at least one person saw Autonomy's trickery all along: short seller and accounting sleuth Jim Chanos.

"We had been short Autonomy in our European fund in 2010 and 2011 and watched in horror as it was taken out at a big premium by Hewlett-Packard," Chanos told CNBC this week. "There was all sorts of cookie-jar accounting ... that appeared to be going on, and it was hard to miss." He used two words to describe HP's oversight of the accounting tricks: "willful blindness."

Who was in charge of HP at the time it bought Autonomy?

Let's back up for a moment.

In late 2010, former CEO Mark Hurd was canned for allegedly abusing $20,000 in expenses. Never a group for numbers, the board of directors showed him the door with a $12 million severance package.

As a replacement, the board selected Leo Apotheker, who had recently been ousted as head of European tech giant SAP after less than a year on the job. James Stewart in The New York Times describes how botched the process of hiring Apotheker was:

[W]hen the search committee of four directors narrowed the candidates to three finalists, no one else on the board was willing to interview them. And when the committee finally chose Mr. Apotheker and again suggested that other directors meet him, no one did. Remarkably, when the 12-member board voted to name Mr. Apotheker as the successor ... most board members had never met Mr. Apotheker.

Just 357 days later, Apotheker himself was fired. After HP shares fell 46% and Apotheker oversaw the phony-accounting Autonomy deal that has cost shareholders billions, the board of directors sent him home with a $25 million job-well-done present.

So add another group to the list of people who have gotten rich off HP: the people directly in charge of its downfall.

It turns out a lot of people have gotten rich off HP. Everyone, it seems, but its shareholders.