News for hackers. Stuff that matters.
Re:Metal Gear Solid 2's source code has been leaked on 4chan by jamesu on Sunday May 03, 2026 @02:36PM (#47999963)
There is no way you could recreate a convincing enough 90s era codebase of a japanese videogame + its associated tools + scripts and commented out codepaths with current ai tools.
Re:Metal Gear Solid 2's source code has been leaked on 4chan by sigmoid10 on Sunday May 03, 2026 @02:47PM (#48000070)
I wouldn't be too sure about that. The original decompilations of Mario 64 and Ocarina of Time were done mostly by hand because LLMs weren't really around yet, but these kinds of projects seem perfectly suited for handing the gritty work off to AI: There is a clear output (exact binary recreation) and a straightforward path to get there (look at this assembly code and produce some C code from it). The decompilation of Twilight Princess jumped from very little to basically 100% of core code in the past year alone: https://github.com/zeldaret/tp

I have no doubt that this would be possible for MGS2 as well.

Re:Metal Gear Solid 2's source code has been leaked on 4chan by paavohtl on Sunday May 03, 2026 @04:15PM (#48000939)
I don't think it's impossible, but it would take a lot of time and a lot of money; likely more time than good enough models have been commercially available.

I have been working on an incremental decompilation-based reimplementation (basically how OpenRCT2 was done) of Worms Armageddon for the past 2 months with a lot of help from LLM tools; primarily Claude Code and Ghidra MCP. I've worked on it almost every day, reaching Claude Code Max 5x's 5 hour session limit multiple times every day. Suffice to say as a software rendered, sprite-based 90s PC game, Worms Armageddon is several orders of magnitude simpler than MGS2. Despite that, I think it will be 2-3 more months of work before I can compile a fully independent version of the game.

This is despite the game being an almost ideal candidate for automated RE, as it uses deterministic game logic with built-in checksum checks in replays and multiplayer. I've downloaded all the speedruns I could find for the game (as replay files) and I've retrofitted the replay system into a massively parallel test framework, which simulates over 600 games in about 30 seconds. So Claude can port all game logic independently without much need for manual testing; the replay tests can almost guarantee perfect correctness.

MGS2 doesn't have anything like that, so every ported function requires extensive manual testing. Even with LLM tools, an accurate decomp could take years (unless you're willing spend thousands of $currency per month on it).

Re:Metal Gear Solid 2's source code has been leaked on 4chan by networked on Sunday May 03, 2026 @04:40PM (#48001236)
This is really cool! Your process is compelling, and your choice of game is excellent. I'd like to read a long blog post about your entire journey from the beginning to a working binary once you get there.

For those wondering, there is a public Git repository at https://github.com/paavohuhtala/OpenWA.

Re:Metal Gear Solid 2's source code has been leaked on 4chan by paavohtl on Sunday May 03, 2026 @04:47PM (#48001310)
As it happens I do have the habit of writing very long blog posts - though none on OpenWA so far. The OpenWA readme file serves as a bit of an introduction, though it's already a month old.
Re:Metal Gear Solid 2's source code has been leaked on 4chan by raouldukelives on Thursday May 14, 2026 @11:35PM (#48144264)
Can you point me to any books or online guides to getting set up with Claude Code + Ghidra MCP? I've looked into it a little and am definitely interested in trying it for a few PS1 games that have been overlooked in the hacking community. I started working on Clock Tower US manually with Ghidra and have made some progress but nothing impressive - I've got some years programming professionally but never in C and definitely not with hardware like MIPS lol
Re:Metal Gear Solid 2's source code has been leaked on 4chan by AshamedCaptain on Sunday May 03, 2026 @03:53PM (#48000736)
Decompilation to C (and even C++!) has been done automatically for 2-3 decades at least. I am not sure what has changed in recent years other than people playing fast and loose with copyright (and GitHub allowing it, likely because their LLMs also stand to benefit). Introducing LLMs here is only going to introduce errors, delays and likely push you away from a reliable result.

The challenge here is readability. Reading the TP source leak you link I think it's even behind the current state of the art, as it's barely above assembly. This is where I suspect even the smallest of LLMs may help, since you don't care that much if it introduces errors.

Re:Metal Gear Solid 2's source code has been leaked on 4chan by sigmoid10 on Sunday May 03, 2026 @05:22PM (#48001653)
>Decompilation to C (and even C++!) has been done automatically for 2-3 decades at least.

Only in a very rudimentary sense and definitely not in a working compilation (much less binary equivalent) sense. LLMs have turned this from a gimmick for static analysis into something that actually works pretty well for recompilation projects.

Re:Metal Gear Solid 2's source code has been leaked on 4chan by AshamedCaptain on Sunday May 03, 2026 @07:38PM (#48002790)
> Only in a very rudimentary sense and definitely not in a working compilation (much less binary equivalent) sense.

Binary equivalence is the easy part; the hard part is getting something that classifies as readable C. LLMs do not really help reach the "working compilation" part but benefit from it.

Re:Metal Gear Solid 2's source code has been leaked on 4chan by sigmoid10 on Monday May 04, 2026 @03:44AM (#48005801)
We are way past "working compilation" when it comes to LLMs. They are already really good at writing readable, compliable code. The big problem with LLMs is making sure the output binary actually does what you wanted it to do. But if you define the goal not merely as instructions in a vague, unspecific human language and rather as recreating a given set of binary instructions after compilation, this big drawback goes away. So in a sense they are better suited for recompilation projects than for developing new applications.
Re:Metal Gear Solid 2's source code has been leaked on 4chan by AshamedCaptain on Monday May 04, 2026 @06:11AM (#48006681)
My point is that we have been past the "working compilation" way before LLMs, and I do not think anything in LLMs help with it, at best agents use these tools with the same efficiency. I disagree that they're good at writing compilable code, but agree on the readable part.
Re:Metal Gear Solid 2's source code has been leaked on 4chan by sigmoid10 on Tuesday May 05, 2026 @05:21AM (#48020000)
Which decompiler reliably produced working, high level C/C++ from assembly? I would have loved to use this thing you are describing here 15 years ago. Compilation is inherently lossy, so any system that could have given you this would have needed pretty heavy LLM-like features anyways.

>I disagree that they're good at writing compilable code

That was never part of the discussion, because as explained several times now it is irrelevant in this case. The existence of the original binary means all you need to do is match up things, which can be automated completely.

Re:Metal Gear Solid 2's source code has been leaked on 4chan by AshamedCaptain on Friday May 08, 2026 @07:14AM (#48061497)
I do not understand what do you find so hard from "generating working code". Even the free version of Hexrays was doing it 15 years ago, and I have written one in my company that I have used for over 30 years. It's actually ... trivial? I really think you're overthinking this.

The problem is readability. No one in his right mind would call what they generate "C++". Mine still interjects assembler from time to time (and not the new version that GCC supports, but the older MSVC style) .

LLMs absolutely do not help with the generate working code part, because this is an exact problem that doesn't need nor benefit from an LLM. They can help with the readability part, because here _once you already have a working skeleton_ it doesn't matter that much if they make mistakes, as it is easy to detect.

Re:Metal Gear Solid 2's source code has been leaked on 4chan by sigmoid10 on Saturday May 09, 2026 @06:52AM (#48073875)
I already asked, but I guess I'll need to ask again: Please show me this tool. Hex-rays is certainly the wrong answer, because the decompiled C code usually needs tons of manual cleaning, fixing datatypes and reconstructing function prototypes before you can compile. And even then you can't be sure about functional (much less binary) equivalence. If anything, all these traditional decompilers focused on readability, not recompilability. But even there they were much worse than LLMs.

If what you said was true, the projects mentioned above wouldn't have needed years of arduous work before the age of LLMs came to be.

Re:Metal Gear Solid 2's source code has been leaked on 4chan by AshamedCaptain on Saturday May 09, 2026 @03:27PM (#48077517)
I get the point, but note that (custom) datatypes and function prototypes are for readability. They are not required for working nor functionally-equivalent code.
Re:Metal Gear Solid 2's source code has been leaked on 4chan by SpecialistK on Sunday May 03, 2026 @03:01PM (#48000211)
Keep your eyes open for Sonic R too. Sadly a lot of the online Sonic community has been toxic to the dev for being transparent about using Claude for the majority of the disassembly. Even though he's a very talented developer with lots of credit to his name, and only took a few weeks compared to a year+ if fully manual.
Re:Metal Gear Solid 2's source code has been leaked on 4chan by InvisibleUp on Sunday May 03, 2026 @03:51PM (#48000721)
Having followed his bsky during his announcement, he started off per-emptively dissing on his haters that... didn't even exist yet. Constantly posting memes about how everyone was dissing him and how AI was totally superior (and then posting his angry sessions with Claude when it got something wrong) when most other users were just "that's cool man". The thing that made him quit bsky was a (now-deleted) thread someone posted criticizing the weird crash-outs. I think he was more... normal about the whole thing, people would have received the project quite a bit more positively.
Re:Metal Gear Solid 2's source code has been leaked on 4chan by Andrex on Sunday May 03, 2026 @03:46PM (#48000666)
Does the TP decomp use AI to achieve their speed?
Re:Metal Gear Solid 2's source code has been leaked on 4chan by jamesu on Sunday May 03, 2026 @03:13PM (#48000318)
My take was more along the lines of: it wouldn't be convincing enough, if anything it would be too clean and perfect.
Re:Metal Gear Solid 2's source code has been leaked on 4chan by CamperBob2 on Sunday May 03, 2026 @02:50PM (#48000112)
That's pre-2026 thinking. At this point, with the ability to lash IDA or similar tools to an agentic harness, there is no longer any such thing as a closed-source binary.
Re:Metal Gear Solid 2's source code has been leaked on 4chan by wuschel on Sunday May 03, 2026 @03:01PM (#48000209)
What is the state of the art of compilers here? What size of project are we speaking here?

What is the experience faulty decompilation, and the existence of bugs in the binary?

Could one decompile a binary to a more modern language than C?

Re:Metal Gear Solid 2's source code has been leaked on 4chan by not_a9 on Sunday May 03, 2026 @06:56PM (#48002472)
I’m interested in how LLMs handle obfuscated code. Throw LLM with IDA MCP at EasyAntiCheat_EOS.sys or the like (as the most common examples of heavily obfuscated software) and see how far they can get.
Re:Metal Gear Solid 2's source code has been leaked on 4chan by diath on Sunday May 03, 2026 @03:15PM (#48000336)
Absolutely. This is just some delusions of a vibe coder at best. Not with just current generation of AI tools but essentially never. The conversion from C, C++, Rust or whatever, through post-processing (macros etc), through IR generation, through compile time optimizations, through link time optimizations, to the generated machine code is a one way street for low level languages. You can get a pretty close higher level approximation that matches the flow/logic/structure - but the code will never be anywhere near close to the original source code. I could write the same C++ program in 3 different ways and get identical assembly, how do you go back to the exact source? The answer is that you don't.

Here's the same simple program, written in 3 different ways, producing identical binary compatible code: https://godbolt.org/z/qWrc8fEnn

How does the AI know whether it should produce back the snippet #1, #2 or #3? It does not. It cannot.

Re:Metal Gear Solid 2's source code has been leaked on 4chan by CamperBob2 on Sunday May 03, 2026 @04:26PM (#48001083)
Who cares? Who said anything about recreating the exact code? You will get usable, compilable, and surprisingly readable source code, in your language of choice, that yields the functional equivalent of the binary.

Barring obvious edge cases that could show up but don't usually, like intentional race conditions. Timing is the one area where things get iffy.

Re:Metal Gear Solid 2's source code has been leaked on 4chan by wuschel on Sunday May 03, 2026 @05:33PM (#48001745)
That is quite incredible if that is true. Need to read a bit into that. Can you point towards relevant literature/examples? Also: please see my questions in the comment to your other reply
Re:Metal Gear Solid 2's source code has been leaked on 4chan by MarioMan on Monday May 04, 2026 @02:18AM (#48005242)
This blog post is a great starting point: https://blog.chrislewis.au/the-unexpected-effectiveness-of-o...
Re:Metal Gear Solid 2's source code has been leaked on 4chan by diath on Sunday May 03, 2026 @04:41PM (#48001252)
> Who said anything about recreating the exact code?

The person I'm replying to? Who said you will get the same code as if it were the original source?

Re:Metal Gear Solid 2's source code has been leaked on 4chan by red-iron-pine on Monday May 04, 2026 @08:58AM (#48008138)
if this leak is real... you probably could now. and as others have mentioned, similar code has been leaked before.