What Happens When AI Writes Your Decompiler: The Kuna Experiment and the Future of AI-Assisted Development
markdown formatted blog content
When Machines Teach Machines to Reverse Engineer Code
Here's something that would have seemed like science fiction a few years ago: a decompiler—a tool that transforms binary machine code back into readable source code—has been built almost entirely by an AI. And it's good. Really good.
Meet Kuna, a new experimental decompiler that recently dropped, and it's already rivaling IDA Pro in one critical area: control flow structuring. In benchmark testing, Kuna achieved perfect structuring on 44.4% of functions, compared to IDA Pro's 45.7%. For context, IDA Pro is the gold standard that decades of engineering have refined.
The kicker? An LLM wrote nearly every line of Kuna.
But before you dismiss this as another "AI slop" project, consider how it got there. The system didn't just generate code and call it done. It studied examples where it performed worse than IDA Pro, learned from those failures, and iteratively improved. In essence, the LLM taught itself to reverse engineer by comparing its output against established tools—Ghidra, angr, and IDA Pro included.
This is autonomous refinement at work: the machine studies the competition, identifies weaknesses, and self-corrects. Over time, it reimplemented more than 20 fundamental decompilation features from angr—a project that took human researchers years to develop through careful scientific advancement.
What's Actually Happening Here
Let's break this down, because the implications go far beyond reverse engineering.
Kuna is built on a Rust port of Ghidra (the NSA's open-source reverse engineering suite), reworked to follow angr's pipeline architecture. So it's not emerging from a vacuum—it's standing on the shoulders of giants. The researcher's PhD work as a core angr developer made this possible.
But here's what makes this genuinely interesting: the AI didn't just reproduce existing solutions. It learned from them. By studying where it fell short compared to established tools, the system developed approaches that, in some cases, paralleled human-designed solutions—without being explicitly programmed to do so.
The Human Element Nobody's Talking About
Here's where the narrative gets more nuanced.
The researcher is quick to point out that this isn't "automatic research." Getting to this point required discovering new fundamental metrics, understanding what aligns with human reversing values, and gathering insights over years. Someone had to ask the right questions, design meaningful benchmarks, and interpret the results.
In other words, the LLM is a powerful tool, but it's not replacing the scientific mind—it's amplifying it. The human provided the framework, the goals, and the judgment to determine what "better" actually means.
This is the pattern we're seeing across AI-assisted development: AI handles the implementation labor, but humans provide the strategic direction. The question isn't whether AI will replace developers—it's how the division of labor will evolve.
What This Means for Developers and Startups
You might be thinking: "Great, but I don't reverse engineer malware or analyze binaries. Why should I care?"
Because this is a glimpse into where all of software development is heading.
The same principles powering Kuna—autonomous refinement, iterative improvement through feedback, AI-driven code generation guided by human-defined metrics—are reshaping how we build everything from web apps to cloud infrastructure. Tools that once required deep expertise and months of development are being iterated on at machine speed.
For developers, this means leveling up your skills in directing AI rather than doing everything manually. The competitive advantage shifts to understanding what you want to build and how to evaluate whether it's done well—not just knowing how to write the code yourself.
For startups, especially in competitive markets, this changes the economics of development. Features that once required dedicated teams of specialists can now be iterated on continuously. The bottleneck isn't writing code anymore; it's understanding what to build and how to measure success.
The Road Ahead
Kuna still has significant limitations. It's strong on control flow structuring, but decompilation involves types, optimizations, recompilability, variable identification—the list goes on. The researcher openly acknowledges this is an experiment to see what's even possible within this framework.
And that's the point. This isn't a finished product; it's a proof of concept for a new development paradigm.
The experiment requires open-source research (ankr, Ghidra) to work. It requires human scientific insight to frame the problems correctly. And it requires continued collaboration between AI capabilities and human judgment.
The Bottom Line
We're entering an era where AI can meaningfully accelerate software development—not by replacing human expertise, but by amplifying it. Kuna demonstrates what's possible when you combine decades of open-source research, modern AI capabilities, and human-guided refinement.
Whether you're a developer curious about the future of coding tools, a startup exploring how to move faster, or just someone fascinated by what AI can do, this experiment is worth watching.
The question isn't whether AI will write your code. It's: what will you do with the time you save?
What do you think about AI-assisted development tools? Is autonomous refinement the future, or are there fundamental limitations we're not seeing? Drop your thoughts in the comments.
Read in other languages: