The use of an offshore company is perfectly legal in Brazil. And if you think that this is stuff for “big guys” only, let me clarify that it is simpler and less expensive than you may think to set up a structure like this, which is especially interesting when you have foreign investors clearly interested in your project, but worried about tax and labor risks here. By investing through an offshore company, they are much less exposed. And on top of it, many of the classic offshore countries apply very low or zero tax rates on profits coming from affiliates abroad.
A practical place for this is Panama, the Hong-Kong of Latin America, with a booming economy and good flight connections. In fact, many big multinational companies are moving their Central American or even Latin American headquarters to Panama! The Seychelles are another interesting option, although far away from Brazil. It is recommendable to open such a company with the assistance of an experienced advisor, and you would be surprised how little all of that can cost (compared to starting a company in Brazil!)