# AI Ran for Six Hours on a DOS Binary and Came Out With Rust: What That Means for Your Old Software

- Canonical: https://www.baristalabs.io/blog/codex-54-dos-reverse-engineer-legacy-code-smb
- Published: 2026-03-07
- Author: Sean McLellan
- Excerpt: OpenAI's Codex 5.4 spent six hours reverse engineering a DOS game from a compiled binary — no source code, no docs. The implications for small businesses sitting on undocumented legacy software are significant.

Industry Insights

Sean McLellan

Lead Architect & Founder

March 7, 2026 3 min read

This weekend, developer Ammaar Reshi gave OpenAI's Codex 5.4 a compiled DOS binary and said: figure it out.

No source code. No documentation. Just the executable.

Six hours later, the agent had unpacked assets, disassembled the EXE, reconstructed the renderer logic, and rebuilt SkyRoads — a beloved 1993 DOS game — from scratch in Rust. The whole thing ran while Ammaar was doing something else. He posted a video. People couldn't look away.

Neither could I.

## What Actually Happened Here

This wasn't a party trick. Walking through what Codex had to do makes the result more impressive, not less:

1. Unpack compressed assets from a 30-year-old binary format
2. Disassemble x86 machine code with no debug symbols
3. Infer game logic from raw CPU instructions
4. Reconstruct the rendering pipeline from memory addresses and draw calls
5. Re-implement the whole thing in a modern language (Rust) that didn't exist when the original was written

Humans do this kind of work — it's called reverse engineering, and it takes experienced engineers days or weeks. Codex did it in six hours, unattended.

## Why This Matters Beyond Nostalgia

Legacy software is not a retro gaming problem. It is one of the most common pain points I hear from small business owners.

The machine shop running scheduling software from 2004 that nobody touches because the guy who wrote it retired. The regional distributor with a custom inventory system built on Access 97. The law firm with a billing tool that only runs on a Windows XP virtual machine because that's the only thing that can open the database. The manufacturing company that depends on a custom ERP that nobody has the source code for anymore.

Every one of these businesses is one hardware failure or OS upgrade away from a serious operational crisis.

Until recently, the options were grim: pay a reverse engineer $200/hour to document the thing, rip and replace with an off-the-shelf product that doesn't quite fit, or keep running the ancient system and hope nothing breaks.

Practical AI Implementation

Want a second pair of eyes on a workflow?

Bring us one everyday process that's eating up your week. We'll help you figure out the smallest sensible first step and what to test before you invest in a bigger build.

- Define the workflow, decision, inputs, review path, and evidence before a larger commitment.

[Talk through a workflow](https://www.baristalabs.io/contact) [View Barista Labs services](https://www.baristalabs.io/services)

We keep the scope clear, the implementation practical, and the next step easy to understand.

## What Changes With Long-Running Agentic Coding

The Codex demonstration points to something that will matter more in the next 12-24 months: AI agents that can work on hard, ambiguous problems for extended periods without supervision.

That's different from "AI that writes code." Writing code from a clear spec is useful. Working autonomously through *undocumented* systems — reading what's there, forming hypotheses, testing them, iterating — is a different capability class.

For small businesses with legacy software, this starts to open up options that weren't cost-effective before:

**Documentation extraction.** Even if you don't rebuild the software, having an AI agent read a legacy binary or database and produce human-readable documentation of what it actually does is valuable. You'd know what you have before something breaks.

**Targeted modernization.** Rather than a full rewrite, an agent can identify specific components — the report generator, the import/export module — and rebuild just those in something maintainable, leaving the rest intact.

**Migration scaffolding.** Moving from an old custom system to a modern platform (QuickBooks, NetSuite, anything else) requires understanding what data you have and how it's structured. An AI agent can work through undocumented schemas and produce migration maps.

None of this is fully automated yet, and the Codex demo was a controlled showcase. But the underlying capability — sustained, autonomous reasoning about complex undocumented systems — is real and improving.

## What to Do With This Today

If you have legacy software you're worried about, the most useful thing you can do right now is create a risk register. What systems are you dependent on? Who built them? Do you have the source code? What happens if it stops working next Tuesday?

That inventory doesn't require any AI tools. But once you have it, you're positioned to have a much more specific conversation about where agentic tools might actually help — and where a human engineer still needs to be in the loop.

The six-hour DOS session was striking because of how autonomous it was. But the more important shift is that these long-running, multi-step, ambiguous tasks are now within reach for organizations that couldn't afford weeks of specialized engineering. That changes the calculus on legacy modernization in a way that matters for small businesses specifically.

---

*Curious whether AI-assisted modernization makes sense for a legacy system you're running? We work through exactly these questions with small business clients. [Reach out](https://www.baristalabs.io/contact) and we'll take a look.*

Practical AI Implementation

## Want a second pair of eyes on a workflow?

Bring us one everyday process that's eating up your week. We'll help you figure out the smallest sensible first step and what to test before you invest in a bigger build.

- Define the workflow, decision, inputs, review path, and evidence before a larger commitment.

[Talk through a workflow](https://www.baristalabs.io/contact)

Turn this idea into a pilot

## Which workflow should go first?

Use the readiness check to compare impact, effort, risk, owner, and next step before requesting a review.

- 3-5 minutes
- Deterministic score
- No sensitive data

[Check workflow readiness](https://www.baristalabs.io/assessment)

Practical AI Workflow Notes

## Enjoyed this? Get our plain-English workflow notes.

We send occasional short notes on putting AI to work in everyday operations, from taming messy documents and customer follow-ups to simple reporting and safety guardrails.

Email address

Send me the notes

A relaxed way to stay in touch if you're still exploring and aren't ready to chat yet.

Occasional emails with practical ideas only. Unsubscribe anytime.

Next step

## Turn this into a practical AI roadmap

Bring the idea from this article into a focused next step for your site, workflow, or team.

[Talk through your AI roadmap](https://www.baristalabs.io/contact?placement=sidebar&source=blog&slug=codex-54-dos-reverse-engineer-legacy-code-smb)

- Define the workflow, decision, inputs, review path, and evidence before a larger commitment.

![Sean McLellan profile photo](https://www.baristalabs.io/profile-sean-mclellan.jpg)

## Sean McLellan

Lead Architect & Founder

Sean McLellan is the founder and lead architect at BaristaLabs. He brings more than two decades of software architecture experience to BaristaLabs products and client work for small teams. Client work starts with an assessment of one workflow. Fixed-scope discovery then defines a bounded pilot, explicit human-review boundaries, and the source-traceable proof needed for the next decision.

[More articles by Sean McLellan](https://www.baristalabs.io/authors/sean-mclellan)

[Twitter](https://twitter.com/seanmclellan) [GitHub](https://github.com/seanmclellan)
