* Listing expected to be largest ever UK tech IPO
* Expected to take place in London in first half of 2018
* Could trade at a discount to rival Sophos due to freemium model (Adds context)
MADRID/LONDON, Nov 7 (Reuters) - The owners of Avast Software have hired Rothschild to prepare the business for a share sale which could value one of the world's most used providers of computer antivirus software at as much as $4 billion, four sources familiar with the matter told Reuters.
CVC Capital Partners, which took control of the Prague-based company in 2014, could seek an initial public offering (IPO) in London for Avast in the first half of next year if market conditions allow, two of the sources said.
CVC and Rothschild declined to comment.
If successful, Avast's IPO would represent the largest ever UK technology IPO. However, it would have to navigate a tough market, which has seen a number of planned London listings pulled in recent weeks.
Interest in cyber security companies has risen as a series of global cyber attacks this year have disrupted businesses and government services worldwide, including the National Health Service (NHS) in England.
WannaCry infected more than 300,000 computers in at least 150 countries in a matter of days, demanding victims pay ransoms to regain access to their machines.
Avast says its software alerts users if their network is vulnerable to being exploited by WannaCry outbreaks.
CVC hired Rothschild after talking to a series of banks as part of a so-called beauty contest in October, the sources said, adding Rothschild will carry out the preliminary work for the deal which includes the selection of global coordinators and bookrunners.
Avast previously filed to go public on Nasdaq in December 2011 but its listing was pulled in July 2012 due to tough market conditions.
CVC and Rothschild declined to comment.
Avast, which makes antivirus software for PC, Mac and Android, was valued at $1 billion when CVC bought a majority stake three years ago.
The business protects more than 400 million users in the world from online threats and relies on a so-called freemium model whereby online users can download its core product for free and only pay for additional services.
It says it handles about 3.5 billion virus attacks per month in over 150 countries.
Avast's enterprise value has more than tripled in recent years following a series of bolt-on acquisitions including a $1.3 billion swoop on U.S. rival AVG Technologies in 2016 and the purchase of London-based optimization software firm Piriform in July for an undisclosed amount.
Chief executive Vincent Steckler told Reuters in 2015 that the company was then worth "upwards of $2 billion" and it would take a few more years before the business was ready to go public.
Summit Partners, which has invested since 2010, remains one of Avast's minority investors alongside Czech entrepreneurs Pavel Baudi and Eduard Kuera who founded the company in 1991.
Avast, which has former SAP Chief Operating Officer Erwin Gunst on its board, posted revenues of $714 million in 2016 with core earnings of $353 million.
Its float is expected to surpass the record 1 billion pound IPO of Sophos, another private equity-backed security software business which was floated in London two years ago.
Sophos, which has a market value of 2.8 billion pounds, has seen its shares soaring from an IPO price of 225 pence in 2015 to 615 pence on Nov. 7.
But Avast is expected to trade at a discount to Sophos since it mainly serves private individuals and its software can be downloaded for free, one of the sources said.
So far in 2017 British IPOs have raised $5.2 billion, a 13 percent drop on the year.
Hopes for a revival before the end of the year were dashed on Friday after broadcasting masts firm Arqiva and ready meals supplier Bakkavor pulled the plug on two of London's biggest deals, blaming market uncertainty.
That came a week after business services firm TMF abruptly ended plans to list in London, opting instead for a 1.75 billion euro sale to CVC. (Editing by Rachel Armstrong and Louise Heavens)