Dennis B. Levine made a big killing a year ago on American Natural Resources Co. stock, secretly buying and selling 145,500 shares with advance word about a takeover bid that would send ANR's price shooting upward.

There were losers too -- the hundreds of unknowing investors who sold ANR stock when Levine was buying.

Those losers, and others who sold when Levine was making scores of secret purchases during the past five years, might be able to claim some of Levine's $12.6 million in illegal insider-trading profits.

Just who is entitled to a piece of Levine's stash will not be known for months, at least. A distribution plan has to be approved by the Securities and Exchange Commission and by U.S. District Judge Richard Owen, who is handling the SEC's civil case against Levine.

Sheldon Goldfarb, a Manhattan attorney, is the court-appointed receiver responsible for rounding up Levine's assets, from the disguised accounts in a Bahamian bank to Levine's Ferrari sports car. The SEC expects at least $11.6 million will be collected.

But it is too early for victims to be ordering champagne, SEC officials caution. "There won't be a distribution plan for some time," said Goldfarb. Other legal issues -- about who is first and last in line for repayment -- might take even longer to resolve.

This is new territory for the SEC and the courts because, until recently, there had been no multimillion-dollar recoveries from inside traders with which to repay victims, noted John H. Sturc, associate director for enforcement at the SEC.

In fact, the only real model for a recovery plan in the Levine case comes from the Santa Fe International Corp. case, in which defendants agreed in February to surrender $7.8 million in illegal insider-trading profits to the government.

The Santa Fe case held the record until Levine was arrested in May and the details of his insider-trading exploits were revealed.

In the fall of 1981, Santa Fe, a major California oil-drilling contractor, was holding confidential merger discussions with Kuwait Petroleum Corp. Foreign investors, allegedly tipped off to the merger plans by a Santa Fe director, invested in Santa Fe stock and in stock options -- contracts that assured them the right to buy Santa Fe stock at a guaranteed price.

The merger was announced Oct. 5, 1981, at a price per share that was double the amount for which Santa Fe stock recently had been selling. The defendants' $750,000 investment in the Santa Fe options turned into a $6.2 million profit. Accumulated interest increased their obligation under the February agreement to $7.8 million.

A lengthy investigation uncovered the identities of the defendants, and they agreed to surrender profits from the Santa Fe securities trading without admitting or denying the SEC's charges.

Irwin B. Schumer, a Manhattan accountant, is the court-appointed master who is receiving claims by investors and traders who say they were victimized in the Santa Fe case. They have until July 28 to file their claims, unless the court extends the deadline. Schumer then has until November to review claims and recommend a payment plan to the court.

"We have a large number of people who had lost millions of dollars trading Santa Fe options just before the announcement of the merger . The settlement is designed to try to compensate them for their losses," said the SEC's Michael D. Mann, chief of the office of international legal assistance.

The Santa Fe recovery fund is divided into several categories: about $500,000 for people who sold Santa Fe common stock during the period when the defendants were buying, and the rest for investors or traders who were selling Santa Fe options during that period. (The options traders are subdivided further.)

Investors whose claims are accepted are entitled to get the difference between the closing price of Santa Fe on Oct. 1, just before the Kuwait offer was announced, and the higher opening price on Oct. 6, when the offer was public. That turns out to be $19 a share, said Schumer. The theory is that the investors are entitled to the same price the insiders got.

If, as expected, the amount of claims exceeds the money available in each category, the payments will be made on a pro-rata basis.

To avoid giving investors a windfall, the SEC requires them to limit their claims to their net losses on Santa Fe stock or options trading during the period when the defendants were in the market, roughly late September until early Oct. 1, 1981. The recovery rules aren't quite simple enough for McGuffey's Reader, but anyone who is clever enough to invest in stock options can understand them, the SEC said.

But the payment to Santa Fe victims is complicated by a dispute over whether the Internal Revenue Service has first call on some of the illegal-trading profits.

Gary L. Martin, now deceased, was a Seattle accountant and tax adviser of a Santa Fe director. The SEC said Martin made more than $1 million in illegal insider-trading profits in 1981 after being tipped off about the forthcoming takeover bid for Santa Fe.

Martin's remaining assets are in the hands of a receiver. However, because Martin never paid federal income tax on his insider-trading profits, the IRS wants its cut. The amount would exceed the amount of money recovered by the receiver, leaving nothing for Martin's victims.

The SEC says that a court might conclude that Martin never had true possession of those Santa Fe profits -- the money legally remained the property of his victims. Thus, if there is any tax due, it would have to be paid by the victims, not Martin. The Justice Department says that doctrine doesn't apply, and a federal judge in Seattle will hear arguments in September.

Other complicated issues might arise in the distribution of Levine's gains.

The plan in the Santa Fe case was simplified somewhat because so much of the inside trading involved stock options. Each option transaction links a seller and a buyer -- the buyer might say, "I want to buy 100 shares of XYZ Corp. at $100 a share," for example, and the seller agrees to sell 100 shares at that price. The buyer pays a price for that option contract, which is a small fraction of the price of the stock itself.

The buyer and seller don't know one another because the trades are handled by professionals on the floor of an options exchange. But the names of buyers and sellers are recorded by their brokerage firms; thus it is possible to pinpoint precisely whom the Santa Fe defendants had taken advantage of.

"It's sometimes harder to identify people on the other side of stock transactions," said Mann. "The stock may trade many thousands of shares a day, and transactions aren't always done in neat bundles." Looking later at trading records, it's much harder to determine who was on the other side of the deals, selling the stock that Levine bought.

In the ANR example, Levine bought 145,500 shares of the company's stock, starting on Feb. 14, 1985, under his code name Mr. Diamond. He paid an average of $49.93 per share, the SEC said.

By then, he knew that Coastal Corp. was soon going to make a public offer for ANR stock because his employer, Drexel Burnham Lambert Inc., was representing Coastal.

On March 1, Coastal announced its bid, offering $60 a share for ANR stock. That news bumped ANR's stock price up sharply and Levine was able to sell his shares by March 4 for an average price of $59.35, or a total profit of $1.3 million, the SEC said.

In theory, investors who were selling ANR between Feb. 14 and the March 1 date of Coastal's announcement might have a claim on Levine's fund, even if Levine wasn't buying their shares directly, said Sturc. But sorting out that puzzle might take as long as the two-year hunt it took to uncover Levine and his secret Bahamian bank accounts.