* Volume picks up on end-of month trading
* Ford, GM among the biggest gainers
* Dow off 0.1 pct, S&P 500 up 0.04 pct, Nasdaq off 0.3 pct
NEW YORK, Oct 31 (Reuters) - The U.S. stock market slowly returned to life on Wednesday after two days in the dark, in the wake of the massive storm Sandy that caused the market's first weather-related two-day closure since the late 19th century.
The major stock indexes' early gains were short-lived as buying receded quickly. The S&P 500 was mostly flat in a session that is on track to be busier than the average day in U.S. markets, in part because of pent-up demand after the two-day closure.
Traders made it through the darkened streets of downtown Manhattan before sunrise to the New York Stock Exchange at 11 Wall Street, one of the only buildings with any electricity in that area after Sandy crippled power supply and disrupted mass transit throughout the New York metropolitan region.
``I was driving in at 5:45 this morning in the dark, but the red and blue lights of the exchange were on, and it was clear that ours was the only building down here that was functional,'' said Jonathan Corpina, senior managing partner at Meridian Equity Partners, in New York.
The two-day weather-related break was the stock market's first multi-day closure for weather since 1888. It was a rare occurrence that affected long-time floor traders, the small corner of human element still left in a market that has become mostly electronic. Floor traders have opened after adverse events in the past, with the last weather-related closure resulting from Hurricane Gloria in September 1985.
``Sometimes we closed early, and sometimes we opened late, but it's always been open,'' said Ted Weisberg, president and trader at Seaport Securities, a veteran of the trading floor for 43 years. ``That's the psyche that the people on the floor operate with.''
Trading volume was average, with more than 3 billion shares exchanging hands before midday on the NYSE, Nasdaq and NYSE MKT. The Dow and the Nasdaq were trading slightly lower and the Nasdaq had inched higher by late afternoon, with a pick-up in volume expected ahead of the market's close on the last trading day of the month.
``The open was a positive relief after four days of sitting on edge,'' said Larry Leibowitz, the chief operating officer at NYSE operator NYSE/Euronext. ``No matter how much planning you do, you can't foresee that kind of flooding.''
Not everything was working as usual. Cell phone reception was sketchy on the floor of the NYSE, so traders were mulling around outside the exchange building making calls, texting and emailing on their phones.
Market participants on locations outside Manhattan also reported some normalcy, though the lack of electric power in the region was a hurdle, and forced many to rush to the pump to keep generators running.
``The biggest concern is getting gas. We were getting an extra bunch of gas to make sure our generator goes on,'' said Joe Saluzzi, co-manager of trading at Themis Trading in Chatham, New Jersey, some 25 miles west of Wall Street.
``It's like 'Mad Max,' the movie,'' he said. ``Everyone's looking for gas, and protecting their gas when they buy it.''
Knight Capital, the nation's largest market maker - which buys and sells stocks on behalf of clients - told clients to send orders to other brokerages due to power issues. The Jersey City-based company said its backup generators failed, hurting its ability to take orders and trade stocks and options, and its stock fell 3.4 percent to $2.53.
Unsurprisingly, investors made a knee-jerk move to buy companies that stand to benefit from home repairs. Home Depot climbed 2.4 percent to $61.48 while rival Lowe's rose 3.1 percent to $32.34.
Generator manufacturer Generac Holdings shares surged 18.6 percent to $33.60, building on a rally that started before Sandy. The company reported earnings Tuesday evening and said the rest of the year would be better than expected because of increased demand for home generators.
``We're seeing reactions from Home Depot and the insurers. But I think these will be relatively short-lived. What matters is the election and the fiscal cliff,'' Weisberg said.
The Dow Jones industrial average dipped 8.86 points, or 0.07 percent, to 13,098.35. The S&P 500 edged up 0.56 of a point, or 0.04 percent, to 1,412.50. The Nasdaq Composite fell 9.87 points, or 0.33 percent, to 2,978.08.
Ford Motor Co rallied 6.9 percent to $11.02 as the NYSE's most-active stock after the automaker reported strong results while the market was closed. General Motors reported earnings that beat expectations, driving its shares up 9.5 percent to $25.49.
Weakness in Apple Inc, which announced management changes earlier in the week, weighed on the Nasdaq but was off its session low. The stock fell 0.8 percent to $599.47.
Facebook shares slid 4.2 percent to $21.03 after the expiration of a lockup period that had prevented some employees from selling stock.
Walt Disney Co agreed to buy filmmaker George Lucas's Lucas film Ltd and its ``Star Wars'' franchise for $4.05 billion in cash and stock, a blockbuster deal that includes the surprising promise of a new film in the series in 2015. Disney, a Dow component, fell 2.3 percent to $48.96.