# Recovering a Legacy Cronos Database with Codex and the Hungarian Algorithm

Original title: Reverse engineering the storage format for an undocumented database

> Hacker News story 49561514 · language: en · submitted 2026-09-04
> Web version: https://zeli.app/story/49561514
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 64 · by [pintprint](<https://news.ycombinator.com/user?id=pintprint>) · 💬 6
[original](<https://blog.glazer.ee/posts/converting-cronos/>) · [HN discussion](<https://news.ycombinator.com/item?id=49561514>)

## Summary

When a client's CronosPro database files (CroBank.dat, CroIndex.dat, CroStru.dat) arrived broken and unparseable by existing tools, the team turned to Codex for analysis. They discovered the schema file was KOD-encoded while the data files were merely compressed, and that the standard cracking heuristics failed due to insufficient evidence. By building a statistical reference from known Cronos structures and framing the KOD table recovery as an assignment problem, they used the Hungarian algorithm to derive a valid key. This post details the full reverse-engineering process, from understanding Cronos's file layout to fixing parser bugs and validating the recovered schema.

## Key quote

> A CSV containing readable values under the wrong headers would be worse than an obvious error because it could look valid while being semantically corrupted.

## HN discussion (6 comments)

### [whsoul](<https://news.ycombinator.com/item?id=49593947>)

> Just leave a comment about experience like this, as I pass by.
>
> during developing Kafka search tool, it have to support many kind of decode formats ( such as Avro + schemaRegistry, protobuf, ConnectJson(json with schema), and so on ).
>
> it recommend a type of deserializer by looking at the leading bytes.
>
> After user select final decision, it is ok if error occurs during first data deserialize,
>
> But many case it’s not occurred error, just pass through with plausibly wrong parsed data.
>
> So my solution was display 10 pre decoded sample to user, and make user select one deserializer by eye.
>
> ConnectJson is reliable, because it has data and schema embedded in every message ( but large ).
>
> In my case using schema-registry, server1 has schema no 10, and server2 has schema no 10 but it’s different.
>
> I make a mistake select wrong server 2, data parsing is progressed but plausibly wrong data
>
> It took me a long time to find and correct some thing wrong.

### [elias1233](<https://news.ycombinator.com/item?id=49592501>)

> I love this new trend of reverse engineering, amplified by AI. Been doing numerous projects like this myself.

### [gotosun1](<https://news.ycombinator.com/item?id=49594979>)

> Where does the KOD key come from? Can it be recovered by reverse engineering CronosPro?

---

## Cite

- Page: https://zeli.app/story/49561514
- Date: 2026-09-04
- Source: blog.glazer.ee (https://blog.glazer.ee/posts/converting-cronos/)
- Hacker News: https://news.ycombinator.com/item?id=49561514

## Other languages

- zh: https://zeli.app/zh/story/49561514 · markdown: https://zeli.app/zh/story/49561514.md
- ja: https://zeli.app/ja/story/49561514 · markdown: https://zeli.app/ja/story/49561514.md
- ko: https://zeli.app/ko/story/49561514 · markdown: https://zeli.app/ko/story/49561514.md
- de: https://zeli.app/de/story/49561514 · markdown: https://zeli.app/de/story/49561514.md
- es: https://zeli.app/es/story/49561514 · markdown: https://zeli.app/es/story/49561514.md
- ru: https://zeli.app/ru/story/49561514 · markdown: https://zeli.app/ru/story/49561514.md
