Índice do artigofaltam 7 min de leitura
Imagine a manufacturer that decides to replace the billing system it has used for twelve years. The example is hypothetical, but the situation is common: the vendor went out of business, the source code was never handed over and the person who knew the sales reps' commission rule has retired. The new system goes live and, at the first month-end close, the commissions come out different from the previous month. No one can say which of the two systems is right, because the old rule was never written down anywhere except in the program itself.
The cost of changing a system without knowing a calculation rule, a file format or an integration shows up after the change: in reconciliation, in the file the bank rejects, in the equipment that stops responding. REA (Reverse Engineer Anything) is an open-source tool that helps investigate this kind of program with the support of artificial intelligence. This article explains what it does, when it is worth using and what remains engineering work.
What REA is and the role of each piece
REA was published on GitHub in April 2026. Reverse engineering is the work of examining a finished program to understand how it works, without starting from the source code, which is the text written by the programmers.
REA does not analyze the program on its own, and it helps to separate three roles:
- The analysis tools do the technical reading. For programs built directly for the machine, these are tools such as Ghidra, Hopper, IDA and Kuna, which translate the executable into readable instructions. REA itself reads JavaScript and .NET applications.
- REA is the bridge. It offers these tools to the artificial intelligence through MCP (Model Context Protocol), the standard that lets an assistant drive external programs, and returns the findings in an organized way.
- The AI agent, the program that runs the task, receives a question in natural language, decides what to examine, interprets what comes back and writes the explanation.
The project states that the results include the evidence and limitations behind each conclusion. An AI model reading the instructions the machine executes easily produces plausible explanations, including wrong ones. When each finding points to the part of the program that supports it, someone can check it before the company makes a decision based on it.
What can be investigated with what the company has on hand
The list of what the project analyzes is long. What matters is what the company can put in front of the tool.
A program installed on the company's own infrastructure is the best scenario. REA returns the program's instructions, the embedded strings and the relationships between functions; for .NET applications, it does this without loading or executing the code. It also reads JavaScript applications, Android apps, SQLite databases and network traffic captures.
For a system accessed through the browser and hosted by the vendor, the reach is partial. REA observes the page, the programs the browser downloads and the data exchanges with the server. Since version 6.9.0, from November 12, 2026, it also reads the document that describes the system's connection to others, when the company has that file. The documentation for this feature warns that the result shows what the document declares, which may differ from what the system does. The code running on the vendor's server is out of reach. Of the rules applied there, you only see the result that comes back.
In either case, it is important not to confuse:
- Information about behavior, which is what the tool returns: pseudocode, instructions, names, calls.
- A specification, the document the AI and the team produce from that information, describing the rule for whoever is going to integrate or rewrite it.
- The original source code, which is not recovered. Comments, variable names, project organization and the reasons behind each decision are not in the finished program.
When it makes sense to use REA
Examining the executable is rarely the first step. Documentation, available code, the database, an official integration and simply observing inputs and outputs usually answer faster and with less risk. In another article we explain where to start when the vendor disappears: with an inventory of what the company can still reach.
REA comes in when those paths are exhausted and what remains is a closed question about a program the company has the right to examine.
| Situation | First path | Where REA helps | What to validate |
|---|---|---|---|
| Calculation rule with no owner | Real cases and the database | Reading the function and generating hypotheses | Rewrite against the original |
| File format with no manual | Comparing real samples | Finding the code that writes the file | New file accepted by the old system |
| Integration with no official interface | Asking the vendor | Listing the calls that already exist | Authorization and error cases |
| Vendor's web system | Exports and official integration | Mapping what the browser exchanges | Real results, case by case |
| Full rebuild | Users, database and screens | Answering specific questions | Every critical rule |
The investigation tends to be worth the effort when the question fits in one sentence, the program is accessible and authorized, and there is a way to check the answer, usually the old system itself, still running. Without that way to check, the result is a well-documented hypothesis. For the integration case, it is worth reading first the options when the management system has no official interface.
What the X-Apps lab test teaches
On November 14, 2026, we published a lab test with REA. The program was written for the experiment, in .NET, and imitates the billing module of a management system: it calculates the amount of an invoice paid late or early. The test was blind. One AI wrote the program and kept the code and the answer key; another, Claude Code running REA 6.9.0, received only the finished file and a closed question about the calculation rule.
- Observe. Without running the program, REA listed the functions and their instructions, without returning ready-made readable code.
- Hypothesize. The AI reassembled the calculation from the instructions and marked each statement as confirmed by the code or as a hypothesis.
- Rebuild. Based only on the written specification, the AI rewrote the rule.
- Validate. A first batch of 4,270 cases ran the original program and the rewrite with the same inputs.
In the first round, 24 cases diverged because of a defect in the rewrite with very large values. After the fix, in a second round with more cases, there was no divergence. The reading also showed that interest is calculated approximately and truncated at the cent, which for some invoices charges one cent less than the exact math; replacing that calculation with the "correct" one made 97 cases in the final batch diverge.
The reading produced a description of the rule; the comparison with the original program showed that the rewrite behaves the same in the cases tested. Even so, reproducing thousands of results from one function does not prove the equivalence of a system. The batch covers the inputs someone thought to test, and a real system has rules that depend on master data, holidays, the database and other modules.
The test has limits. The program was small and built for the experiment, and .NET preserves names and instructions that are easier to read; programs in languages such as C or Delphi, or deliberately obfuscated ones, demand much more. It was a single run, with no comparison against manual work and outside of a client engagement, and the minutes it took are not a project timeline.
There are other paths: at GPSi, from Grupo GPS, X-Apps rebuilt an Android app for iPhone with no source code or documentation by recording the app's calls to the server, without REA.
The deliverables the company should expect
A well-run investigation ends in documents the team can use without needing whoever produced them in the room:
- Identified rules, with the evidence for each one: the part of the program, the file sample or the test case that supports the statement.
- A list of what was not confirmed: hypotheses, parts of the program not examined and external dependencies the analysis did not reach. A report without that list deserves suspicion.
- A specification in language that developers and the business side can read and challenge.
- Test cases with the real output of the old system, which become acceptance criteria for the new system or the integration.
- A recommendation for the next step: integrate, modernize in parts or rebuild, with the risks of each option.
When evaluating an investigation or modernization proposal, these questions help:
- What exact question will be answered, and about which program?
- How will each conclusion be checked, and against what?
- What happens to the points left unconfirmed?
- Do the test cases stay with the company?
- What content from the program will be sent to the AI model provider, and under what contract?
What weighs on feasibility, effort and cost
There is no way to estimate price or timeline without knowing the case. The factors that weigh most are well known:
- Access to the material. Having the executable, the database and an environment where the old system still runs greatly reduces the effort.
- The program's technology and protection. Platforms that preserve names and structure are more readable than native code without names or obfuscated code.
- External dependencies. Rules that query a database, third-party services or equipment cannot be explained by the executable alone.
- Quality of the examples. Real input and output cases, covering exceptions, are what make it possible to check any answer.
- Validation effort. Setting up the comparison with the original system is usually the largest part of the work.
REA's code is distributed under the MIT license, with no licensing cost. That does not make the investigation free. The project warns that it does not grant a license for the commercial tools it uses, such as IDA Pro and Hopper; Ghidra is open source. On top of that come the AI model consumption and, above all, the engineering time to frame the question, check the evidence and build the tests.
Authorization, licenses and data flow
The project's responsible use notice states that the tool is intended for lawful analysis, such as of software the company owns or is authorized to examine, places on the user the responsibility for obtaining authorization and notes that having the file does not mean having permission for every operation. The first document to read is the system's license agreement, looking for clauses about reverse engineering.
In Brazil, computer programs are protected by Law 9,609/1998, Brazil's software law. Article 6 lists the situations that do not infringe the rights holder's rights. Item IV covers integrating a program into another system when the integration is technically indispensable to the user's needs, preserves the program's essential characteristics and is intended for the exclusive use of whoever carried it out. Article 12 provides for detention of six months to two years or a fine for violating a program's copyright. Whether a specific case fits the exceptions is an assessment for the company's legal team, in light of the contract.
According to the project, the analysis runs on the company's computer, but the AI receives the results. In practice, excerpts extracted from the program leave the company whenever the AI uses a model running on the provider's server. What that means depends on the contract with the provider, internal policy and the software's owner. When the program belongs to a third party, that transfer deserves an explicit decision. Real examples used as an answer key often contain personal data and should be handled according to the company's data protection policy.
Some analyses only read the files; others execute the program, with the user's permissions. An unknown program should run in an isolated environment. Connecting an AI assistant to internal systems also carries its own risks, as the flaw Google fixed shows.
The next step: one rule and a set of cases
Before hiring any investigation, the company can do on its own the part that most influences the result. Pick a critical rule in the system, preferably one involving money or tax obligations. Gather real input and output cases, including the exceptions the team remembers. Write down what exists (executable, database, documentation, license agreement) and who has access to each item. This material serves as the answer key for any path that comes next, with or without REA.
If your company depends on a system whose rule, format or integration no one can describe, and needs to decide between integrating, modernizing or rebuilding, X-Apps can help narrow down the question, gather the evidence and turn it into a specification and tests. At X-Apps, this assessment is the diagnosis that kicks off DevOps Operation, the service in which we take over and evolve existing systems, including those built by another team.
Sources: morluto/rea repository (README, responsible use notice, .NET and integration document guides, version 6.9.0 release notes), consulted on November 19, 2026; experiment published by X-Apps on November 14, 2026; Law 9,609/1998 on the Planalto portal (the Brazilian Presidency's official legislation site).





