Staying in the neighborhood, Malvern-based Endo Health Solutions Inc. said Monday that it would buy NuPathe Inc. for $105 million, with additional payments possible if NuPathe's drug to treat migraine headaches pans out.

Endo is trying to reorganize and build on its pain-management business while dealing with setbacks on a 2011 corporate acquisition and thousands of pending lawsuits on vaginal-mesh implants.

Since chief executive officer Rajiv De Silva took over in March, he has added small companies that can quickly - by pharmaceutical-industry standards - generate revenue.

NuPathe's Zecuity was approved by the U.S. Food and Drug Administration in January for acute treatment of migraine with or without aura in adults. Auras are symptoms that sometimes precede migraine headaches, including flashing lights, tingling in hands or feet, and a disturbed sense of smell. Nausea can also be a big factor for migraine sufferers.

Zecuity is a disposable, single-use, battery-powered patch that transmits the active ingredient sumatriptan through skin.

Endo will pay $2.85 per share in cash and up to $3.15 per share if Zecuity sales meet milestones.

NuPathe needed to find other funding or a larger company to buy it to survive and start selling Zecuity. According to a filing with the Securities and Exchange Commission, the company had 14 employees and just $22.5 million in cash and cash equivalents at the end of 2012.

The third-quarter financial report, filed Nov. 14, said that staff had been trimmed, that sales of Zecuity were put off, and that management estimated it had funds to operate and service debt only through January.

It is unclear how many, if any, employees will migrate to Endo. Armando Anido became CEO of NuPathe in July 2012, after time at GlaxoWellcome, a predecessor to GlaxoSmithKline, and Auxilium Pharmaceuticals.

"Our team has worked very hard to develop products that we believe will provide significant clinical advantages over current treatments for patient populations facing diseases of the central nervous system," Anido said in a statement.

He did not return a call left at his office.

Endo said it plans to start selling Zecuity after the deal closes early next year.

"The acquisition of NuPathe enhances our branded pharmaceutical portfolio and is well aligned with our strategy of acquiring late-stage products for commercialization," De Silva said in a statement.