"Basically, we started with three companies and what we do is: One company bills to Gowex, Gowex bills to another company and the third company bills to the previous one. It is a triangle," Garcia Martin told the court. "Basically, the structure enabled us to make capital increases."
By 2010, the year Gowex made its much-touted debut on Spain's alternative market, the Mercado Alternativo Bursatil (MAB), the web of shell companies had grown substantially.
The previous year Gowex had reported revenues of 35 million euros and a net income of 2.9 million. But Spain's property bust and the growing eurozone debt crisis were hurting the wider economy. As Gowex prepared to go public, its international competitors Boingo, Towerstream and iPass turned losses.
Gowex pushed on, selling 18 percent of the company for 6 million euros. The shares jumped 20 percent on their first day of trading.
Read MoreMiami, third GOWEX WiFi City in the United States and newstrategic city at the US market
Some investors and analysts later expressed skepticism about the company's performance. In a note in March 2013, NFinance Securities analyst Pierre Schang said he was "disturbed" that Gowex was turning big profits while competitors were registering losses or much smaller profits. Schang did not answer a request to comment further.
Others questioned the firm's amateurish corporate structure, with a board composed of Garcia Martin, his wife, Florencia Mate, and CFO Marugan.
"My wife did not come to the board meetings," Garcia Martin told the court; he said he used her to sign for shell companies that he bought in Wyoming.
Mate and Marugan have both been charged in relation with the accounting deception. Florencia Mate told the High Court she was unaware of the scheme, while Marugan said he was part of it but had no other option than to execute orders because he feared Garcia Martin. Both ignored multiple requests for comment.
Read MoreShorting vigilanteGotham City pulls no punches
Despite the general economic gloom in Spain, Gowex appeared to grow fast. Its reported revenues jumped more than five-fold, profits rose 10 times to 29 million euros, and its market value skyrocketed as Garcia Martin traveled the world. He attended conferences, met investors in France, Britain, the United States and China, and won investments from funds such as JP Morgan Asset Management, Lazard Asset Management, Santander Asset Management and The Vanguard Group.
At his court hearing, former CFO Marugan said only about 10 percent of the company's revenues were real.
In its IPO documents, Gowex said its nine biggest clients accounted for revenue of 26.3 million euros – 91 percent of the total. Six of those firms – worth a combined 24.5 million euros in revenue – were actually linked to Marugan or trustees used by Garcia Martin.
The lies continued after the listing. Garcia Martin and Marugan would routinely misrepresent the size – and in one case even the existence – of business deals, they said in their court testimony.
Read MoreHot company declares bankruptcy, admits fraud
For example, Gowex said in 2011 it had signed a 12 million euro contract to provide wi-fi in public places in Buenos Aires, including the city's underground network. While Gowex and Buenos Aires authorities did have talks over a potential deal, the transaction was never agreed and both the municipality and the Subte metro company told Reuters they never signed any deal and had no knowledge of Gowex's announcement.
Gowex also claimed to have contracts in Paris, Madrid and the Spanish cities of Gerona and Aviles. There were deals, but officials in the municipalities and public transport authorities of these four cities say that it was Gowex that paid them, either a fee in order to be allowed to promote its name on trains and buses (Paris and Madrid), or for the right to run a wi-fi service and charge for advertising on it (Gerona and Aviles).
The firm said in 2013 that it had installed 1,953 free wi-fi hotspots in New York City in what it called a landmark deal in its expansion. But the New York City Economic Development Corporation said the agreement to provide coverage in areas of the city such as Flatiron and Roosevelt Island was worth just $245,000, a fraction of Gowex's overall reported revenue that year.