Drugmaker Endo International has agreed to pay as much as $465 million to resolve criminal and civil claims stemming from its sale and marketing of a powerful opioid, and will turn over its assets to a group of secured lenders who will operate the company under a new corporate structure.