Decompiling Xbox games using PDB debug info

Posted by orange_redditor 3 days ago

Counter97Comment17OpenOriginal

Comments

Comment by tomaytotomato 9 hours ago

Over the last year I have seen some really nice exploration posts on HN with people poking around on:

- Splinter Cell

- Deus Ex

- Thief

- Civ

This is great work and will help tell the story of how these games were made.

It would be great if all games after a certain period of time were opensourced like some companies are doing:

https://github.com/electronicarts

https://github.com/bobeff/open-source-games?tab=readme-ov-fi...

Comment by anonymous908213 8 hours ago

> It would be great if all games after a certain period of time were opensourced

I would settle for simple copyright expiration in a reasonable amount of time. 70 years after death of author is so wholly unreasonable. Even though so many IPs are now part of the collective cultural consciousness, people can't explore their creativity using them without threat of getting Nintendo'd (even for non-commercial projects!), and entire generations that grew up experiencing them will be dead and gone by the time they enter public domain. It is a travesty that we impose such heavy shackles on human creativity.

Comment by direwolf20 6 hours ago

You can do whatever if you don't get caught doing it

Comment by account42 7 hours ago

Software copyright without mandatory source code escrow was always an insanely bad deal for society.

Comment by nucleardog 5 hours ago

When I look back, seems to me the default was sort of "anything can copy and modify anything" because without additional measures or rules... what's stopping them? We added copyright as a time-limited exclusivity available to the creator to encourage people to create things (knowing they would have time to recoup some of their effort commercially).

With anything else (books or stories, pictures or movies, etc) the ability to modify or extend the work was the default. Copyright was a carve-out in this.

With software it's actually the reverse--the ability to modify or extend the work is _not_ the default. It takes explicit action by the creator to make that reasonable without substantial effort in most cases. We're actually dealing with an entirely different situation here, and providing that exclusivity on top really does seem like a bad deal for society in a lot of ways.

Is there anything else that's covered by copyright that's in a similar sort of situation as software? Where the thing that's covered by copyright _isn't_ really modifiable to begin with?

Which is a lot of words to say--on the surface, yeah, I agree with you. Besides shorter terms, I think if you want that exclusivity from society you should be required to give something back in return... like the source code so everyone can benefit from and build off of your work after your period of exclusivity expires.

Comment by ndiddy 3 hours ago

> Is there anything else that's covered by copyright that's in a similar sort of situation as software? Where the thing that's covered by copyright _isn't_ really modifiable to begin with?

I don't see how software is unique here. You can modify a compiled executable, just like you can modify a finished graphic, or a produced movie, or a piece of music from an album. It takes additional effort, but so does modifying the graphic without the PSD file, the movie without the editor project files, and the music without the stems.

Comment by mikepurvis 3 hours ago

The original copyright laws date from the 1700s; at the time the only thing being protected was text: stories, essays, reference volumes, etc. Basically, stuff for which there was no "source code" to conceal, the whole thing was right there on the page.

It's only been in the 20th century that we've increasingly seen classes of copyrightable works for which the source code dwarfs the final released product: music, digital visual arts, film, and software

To make matters even worse, the commercial interest in copyright doesn't care about any of this, because pirates only duplicate and distribute the end product anyway. So it's only the creative side wanting to remix and extend that is shut out by a lack of source escrow.

Comment by kg 4 hours ago

It's even a bad deal for the rightsholder. There are lots of stories in video games of how a studio or publisher lost the original source code or assets for a game, then 5, 10 or 20 years later they want to remaster it and they can't do so without jumping through really elaborate hoops involving binary recompilation, emulation, repainting assets from scratch, etc.

If the code and assets were escrowed, the rightsholder could just go claim that stuff whenever they need it.

Comment by phendrenad2 1 hour ago

Oh how would that work? Who keeps the software in escrow? And what happens when Trump and Elon defund that department?

Comment by RandomTeaParty 7 hours ago

My general experience with decompilation has been very negative (rough and not ready for use)

It feels like tool devs target byte editting more than refactoring decompiled code into something readable - you can't move lines of code, can't flip statement checked in if() for early return

Author of this article mentioned "byte euivalence", and while I'd be fine with functional sameness, I imagine provably-reversible refactor steps would be of great help for everyone

Comment by peder 2 hours ago

Not sure if you're a .NET/C# person, but PDBs are a bit different tho in that they contain full debug information and you can absolutely decompile a .DLL + .PDB combo. Very successfully even in the case of obfuscation.

Comment by RandomTeaParty 1 hour ago

Fight against obfuscation is different from fighting for readability

I've tried Ghidra, IDA and BinaryNinja, and all of them display code on the level of "C with classes" from early 00s (and declaration of variables at the beginning of function in style of structured programming of the 90s)

I'd be perfectly fine with that output, had there been good way to interactively fix it (refactor without changing behaviour)

Comment by direwolf20 6 hours ago

Hm, I wrote a decompiler that does this. Maybe I should work on it more.

Comment by starkrights 2 hours ago

This site never ceases to surprise me with new username jumpscares (no negative connotation intended)

I had no idea you were an (ex?) sysadmin! Apologies for the offtopic driveby reply, but what a small world we live in.

Comment by RandomTeaParty 1 hour ago

Is it available somewhere?

Comment by 5 hours ago

Comment by 01hman 8 hours ago

Do you think it is possible/easy to de-compile MCLA?

Comment by orange_redditor 8 hours ago

It's possible and made a lot easier if you have a debug build of the game or any build that doesn't use LTO. If you targetted the Xbox 360 version of the game in particular you could use this fork of decomp-toolkit but it's still a work in progress https://github.com/rjkiv/jeff