Actually the Federal Police don't just find them. In most cases, since here police have the legal right to demand ID from anyone and law requires all foreigners not only to carry ID but also their travel documents and present those for inspection upon demand it is usually a case where the Military Police ID you because you were somewhere when something happened. You don't even need to be involved, here in Brazil when it all hits the fan the police show up, nobody enters and nobody leaves until everybody has been identified. If you're a foreigner and you don't produce travel documents or your visa is expired they are obligated to take you directly to the Feds, that's standard proceedure. At that time you're processed, and given a slip that demands you leave within 8 days (sometimes even less depending on the circumstances). Should you refuse to do so they then institute deportation proceedings, of course at that time you have the legal right to representation and to present a defense.
Since you've still got almost two weeks before your visa actually expires it won't hurt you to go to the Federal Police and ask what to do (MAKE ABSOLUTELY SURE TO TALK TO A POLICE AGENT AND NOT A CIVILIAN EMPLOYEE). If you don't speak Portuguese fluently then be sure to take somebody with you who does. Explain your situation in detail, that you're only waiting for the legalization of documents and see if they can offer you some help or suggestions. Who knows, if you run into a really sympathetic agent, they might even accept your application now, take photocopies of the documents that require legalization, with the condition that you send them off for legalization immediately and return once they've come back to you from the Consulado. You never know until you ask. The trick is to ask now, while you're still legal in the country and they can't just tell you you've got to leave on the spot.
Cheers,
William James Woodward, Expat-blog Experts Team