The company America loved to hate may now be one investors might like to buy. American International Group (NYSE: AIG), one of the "too big to fail" financial companies the U.S. government bailed out in 2008, has recovered from its near-death experience. It's alive, if not completely independent, and has just reported a second-quarter profit.

Most of the company's gains, however, came from its share of American International Assurance, the Hong Kong-based life insurance company. Other parts of AIG's business didn't fare as well. Chartis, its casualty insurance business, took losses of more than $500 million after paying off claims from natural disasters. Its American life insurance division, SunAmerica Financial, dropped its operating income by more than 18%. And AIG's aircraft leasing business's operating income fell by more than 50%.

Good riddance, Financial Products
But the welcome news came that the company has finally closed down its problem child, AIG Financial Products. That was the unit that wrote credit default swaps (essentially, investment insurance) to cover tens of billions of dollars in collateralized debt obligations, or CDOs. Many of those CDOs covered bundles of subprime mortgages. When AIG couldn't cover all the losses as housing prices fell and many of those CDOs defaulted, the government stepped in with its $182 billion rescue, the biggest U.S. bailout ever.

AIG has been paying off the debt, but we taxpayers still own 77% of the company, down from 92.1 percent originally.

Suing the banks
AIG sued Bank of America (NYSE: BAC) this week to recover $10 billion in losses from its investments in mortgage-backed securities. The company contends that Bank of America, Merrill Lynch, and Countrywide duped the ratings agencies into assigning inaccurate ratings to those investments.

AIG would also like to get some of its money back from the other financial institutions the company says misled it leading up to the financial crisis. It is readying lawsuits against Goldman Sachs (NYSE: GS), JPMorgan Chase (NYSE: JPM), and Deutsche Bank (NYSE: DB).

Is AIG really worth considering?
First of all, I have to agree with fellow Fool Dan Dzombak that AIG is a beckoning contrarian play. A classic out-of-favor, overlooked, tainted, undervalued stock that only someone comfortable with going against the grain would ever consider buying. Sounds like my kind of stock. Right now, AIG is trading at about one-third of its January 2011 price, and its trailing P/E is 6.4.

Next, Financial Products is dead. 'Nuff said about the derivatives unit of AIG that almost sank the company. Don't let the door hit you in the back.

And finally, AIG was once a highly profitable insurance company. I think if it sticks to what it knows best, it will become one again.

Hope for the best...
Despite the mixed second-quarter results, AIG's CEO, Robert H. Benmosche, told The New York Times last week, "AIG is basically back in business. The crisis is over for this company." If it really is, then buyers could be getting a bargain. When my Foolish trading restrictions allow me to buy shares in AIG, I intend to do so.

If you are interested in keeping track of American International Group, too, then click here to put it on your watchlist.