KNOWING the worst can help with a recovery. But it is no guarantee. Petrobras issued its much-delayed results on April 22nd, after accountants had scoured its books to find details of many years of scams and kickbacks, which are part of Brazil’s biggest corruption scandal. The state-controlled oil company said that graft had cost it 6.2 billion reais ($2.1 billion). Other charges included a bigger-than-expected write-down of 44.6 billion reais, mainly on a flagship petrochemical complex and a big refinery. The net loss was 21.6 billion reais in 2014, against a 23.6 billion reais profit the year before.

Cleaning up Petrobras (and Brazil’s political system) is a long-term job. In the short term the company is focused on survival, with production sinking, oil prices low, cash scarce, and a hefty bill looming to develop its prized assets: the “pre-salt” oilfields that lie deep below the country’s offshore waters.

Publishing audited results was vital. Creditors could have demanded early repayment of $54 billion of debt if the company had missed a deadline of April 30th. The previous management’s borrowing binge left Petrobras as the most indebted company in the world, and—when the scandal broke—an outcast from the capital markets.

Openness about the past will not forestall American shareholders who are fuming about mismanagement; some have already sued. But for now, investors seem willing to give the new management under Aldemir Bendine, a former boss of state-controlled Banco do Brasil, a chance: Petrobras’s shares have steadied in recent months, though they are still well below their peak (see chart).

Mr Bendine says he will husband cash by cancelling this year’s dividend, slash capital expenditure, and sell $14 billion of assets by the end of next year—though finding buyers for them is another story.

The company’s future does not lie just with its management. Politicians must not only stop stealing: they must cease interfering too. President Dilma Rousseff’s left-wing Workers’ Party forced Petrobras to sell imported petrol at a loss to keep pump prices low. That made the company bleed cash. The government has since let it raise prices, but Petrobras still suffers political pressure, such as demands for big dividends, which help bolster Brazil’s threadbare public finances. The government insists that Petrobras should take the lead in developing offshore fields—a task for which it may have the technical expertise, but not the balance-sheet.

Some of these problems will land on Shell’s desk. The Anglo-Dutch giant has just bought BG, a British energy company, which is a big partner for Petrobras. Mr Bendine says he may seek more ties. Shell has cash and know-how, but may tread carefully in a country where nemesis follows hubris, and there is always plenty of blame to go round.