Residential Capital LLC, the mortgage company liquidating assets in bankruptcy, agreed to pay $297.6 million to end opposition by government-run loan investor Fannie Mae to the sale of ResCap’s main business, Bloomberg News reported yesterday. The Federal National Mortgage Association agreed to drop its objection to the $3 billion sale of ResCap’s mortgage servicing unit to Ocwen Financial Corp., according to a court filing on Wednesday. Fannie Mae, as Federal National is known, is the biggest owner of loans generated by ResCap. Fannie Mae had demanded the so-called cure payment as compensation for any losses that may be caused by ResCap’s bankruptcy filing.