About the INPI:
A) The trademark registration will protect only the NAME or LOGO, which you register.
B) The software registry will protect only the source code, which you must burn to CD/DVD and send in PDF format. However, if someone writes (or rewrites) the code differently, there will be no copy of your code.
C) The patent may be useful if: "[...] you have invented a new technology, whether for product or process".
I would register the software and if possible I would also do the patent (the idea - if it’s really original).
Below is the relevant legislation: important to remember that most of the laws govern industrial/intellectual property in Brazil are REALLY very old, because our legislators are "very busy with other activities":
Law 9.609 of 1998 - It provides on the protection of the intellectual property of computer program, its commercialization in the Country, and gives other provisions.
Law 9.279 of 1996. Regulates industrial property rights and obligations.
Good luck in your endeavor and I hope I’ve helped!