SEOUL (Reuters) - Record earnings at Samsung Electronics Co Ltd's 005930.KS chip division are set to propel the tech giant's first-quarter profit to a three-and-a-half-year high, and the quarters ahead could be even better if its newest smartphone, Galaxy S8, is a success.

Shareholders walk past the logo of Samsung Electronics before their general meeting at a company's building in Seoul, South Korea, March 24, 2017. REUTERS/Kim Hong-Ji

A boom in memory chips spurred by demand from smartphones and servers has helped Samsung tide over the costly failure last year of its Galaxy Note 7 smartphone and management turmoil. Vice Chairman Jay Y. Lee is on trial for bribery and other charges linked to a corruption scandal that led to the ouster and arrest of South Korean President Park Geun-hye.

Shares of Samsung, Asia’s biggest company by market capitalization and the world’s largest memory chip maker, are near record highs after gaining nearly 17 percent so far this year, on top of the 43 percent surge in 2016.

A Thomson Reuters survey of 18 analysts has on average estimated Samsung’s January-March operating profit to have risen 41 percent from a year earlier to 9.4 trillion won ($8.44 billion), driven by record chip division profit of 5.8 trillion won. That’s its highest profit since the best-ever 10.2 trillion won profit clocked in the third quarter of 2013.

And as Samsung prepares to start selling its revamped Galaxy S8 from April 21, the average forecast from the same survey tips Samsung to report a record 11.9 trillion won profit in the second quarter.

“Right now it’s about as good as it gets for Samsung,” said Park Jung-hoon, fund manager at Samsung shareholder HDC Asset Management.

Samsung will issue its earnings guidance early on Friday.

Analysts expect tight supply conditions for memory chips to continue this year, particularly in NAND flash chips used for long-term data storage, keeping Samsung’s margins padded. That leaves the mobile division as the key earnings variable, they said.

Samsung ceded the smartphone crown to arch-rival Apple Inc AAPL.O for the fourth quarter of 2016 after being forced to pull the fire-prone Note 7s from the market in October. The hope is the S8 will help Samsung regain its lead.

The S8, sporting the largest screens to date among all of Samsung’s flagship phones as part of a design revamp, has been praised following the March 29 launch in New York.

Some analysts and Samsung’s head of smartphone business expect the phone’s first-year sales to beat that of predecessor S7, setting a new record for the South Korean company.

“We think the S8 series will definitely be a strong flagship for Samsung and help it gain back market share,” Counterpoint analyst Tom Kang said.

“The launch of the fully revamped iPhone 8 will also be threatening. But there is also pent up demand for Samsung devices rolling over from last year due to the disappearance of the Note 7,” he said. “So those 2 factors will balance out.”

Samsung will only provide estimates for January-March revenue and operating profit on Friday and will disclose detailed results in late April.

(Click here for a graphic on 'Samsung earnings' here)