Anadarko Petroleum (APC) shares suffered a big blow back in December when a U.S. bankruptcy judge issued a memorandum of opinion related to the Tronox (TROX 1.95%) spinoff of Kerr-McGee. The court stated that Anadarko Petroleum could be liable to pay up to $14.5 billion for environmental liabilities, which, in Tronox's opinion, were transferred to Tronox by Kerr-McGee.

However, Anadarko's shares have already surpassed pre-announcement levels. Is the worst over for Anadarko Petroleum's shareholders?

Tronox worries could be already priced in
Anadarko's fourth-quarter report revealed that the company booked $850 million for a Tronox-related loss. This action forced Anadarko to report a non-adjusted fourth-quarter loss, but it looks like the market has already priced in Tronox worries and is focused on Anadarko's operating performance.

The worst-case scenario for Anadarko is to follow BP's (BP 1.25%) fate. In this case, the company would have to deal with years of court battles. BP's troubles with the settlement in the Macondo well spill case seem to have no end. In addition to this, BP shares are under pressure because the U.S. could impose economic sanctions on Russia relating to the tense situation in Ukraine. BP owns a 19.7% stake in Russian oil producer Rosneft, so it has significant interest in the country.

Currently, it looks highly unlikely that Anadarko will have to pay as much as $14.5 billion for the environmental cleanup. Still, if the court's decision forces Anadarko to pay significantly more than the booked $850 million, one could expect a fierce and lengthy battle.

U.S. onshore production continues to drive Anadarko's performance
Apart from the Tronox issue, Anadarko is in good shape. The company recently announced its 2014 capital program, which continues to focus on its U.S. onshore operations. In 2013, nearly 75% of production came from this segment. It plans to dedicate 60% of its $8.1 billion-$8.5 billion capital budget to U.S. onshore operations. The new capital budget reflects a substantial increase from the $7.7 billion spent last year.

Anadarko's cash from operations is likely to exceed its capital spending this year. What's more, the company recently sold its Chinese subsidiary Brightoil Petroleum for approximately $1.1 billion, further strengthening the balance sheet. The company will need excess cash if the Tronox case is resolved unfavorably.

All in all, Anadarko expects to achieve a 6%-7% sales volumes growth in 2014. These are pretty decent numbers given the company's size, and the market responds accordingly; the company's shares are up 8% this year despite Tronox-related worries.

Bottom line
From an investment perspective, the Tronox case is the only worrisome problem for Anadarko. The company's asset base is very solid and includes significant positions in most attractive U.S. unconventional plays like Wattenberg and Eagle Ford.

Even if the case is resolved unfavorably for Anadarko, it could take years of appeals before the final decision is implemented. Until then, the case would not have a major impact on the company's cash flow. What's more, if Anadarko is forced to pay a sum closer to the already-booked $850 million loss, its shares will get a big boost.