Working for a bankrupt retailer still has it perks -- at least if you're among hundreds of high-level employees at Sears Holdings.

The company behind the Sears and Kmart chains on Friday obtained a U.S. bankruptcy court's permission to pay as much as $25.3 million in bonuses to top executives and other high-ranking employees at Sears, which filed for Chapter 11 bankruptcy protection in October.

The retailer successfully made the case that it needs to give employees a financial reason to stick around, even as it reported losses of almost $1.9 billion in the first three quarters this year.

"Under these circumstances, it would be understandable if many key employees are asking themselves whether they should be seeking other opportunities," Sears said in a court filing last month. However, the retailer "cannot afford this uncertainty — however understandable it may be," the company said.

Get Breaking News Delivered to Your Inbox Click here to view related media. click to expand

Sears faces financial troubles

The judge gave the green light to Sears' proposal that it offer bonuses up to $8.4 million to 19 executives if Sears meets some financial targets during the next six months. Those workers would be eligible for the extra money if Sears is positioned to reach those targets when sold, a lawyer for Sears said at the hearing, according to the Chicago Tribune.

Sears also received approval to earmark up to $16.9 million in retention bonuses for another group of 315 senior employees, with each eligible for the equivalent of 30 percent to 40 percent of their salary, to be divided into quarterly payments during the next year.

Former CEO Eddie Lampert is still chairman of Sears, and his hedge fund, ESL Investments, recently offered to acquire what's left of the company, which is currently headed toward liquidation. The once dominant retailer has been shuttering stores and laying off employees, with roughly 500 stores still in operation.

In a silver lining of sorts, Sears reported a 4.3 percent increase in sales during the last quarter at Sears and Kmart stores still open at least a year, with the boost in sales "driven by liquidation sales in the stores that were announced for closure," Sears said Thursday in a regulatory filing.