A Manhattan law firm that represents creditors has agreed to pay more than $650,000 to settle a New York investigation that it filed frivolous lawsuits in housing court matters that were already resolved, the state attorney general's office said Wednesday.