News for hackers. Stuff that matters.
Re:Take-Two Sues Enthusiasts Behind GTA Fan Projects Re3 and... by klodolph on Friday September 03, 2021 @09:04AM (#28403601)
It's decompiled and cleaned up.

I have personally gone through the commit history of this project and read the source code. It is absolutely clear that this is based on the output of decompilers like IDA Pro and Ghidra. You can see how variables are not defined as ordinary variables, but as hard-coded addresses which are then cast to pointers of the appropriate type. The code is littered with unnecessary casts that are not typical of human programmers, but typical for how you get decompiled code to run.

Modern decompilers are a lot better than you might think. Additionally, old compilers produced code that is easier to decompile than you might think. But, here's a sample of code from the re3 repository in question:

    uint8  &CClock::ms_nGameClockHours = *(uint8*)0x95CDA6;
    uint8  &CClock::ms_nGameClockMinutes = *(uint8*)0x95CDC8;
    uint16 &CClock::ms_nGameClockSeconds = *(uint16*)0x95CC7C;
That does not look like code any human would write, if they were reimplementing a game. It looks like the code someone would write if they were cleaning up the output of a decompiler and assigning names to variables and functions which previously looked like "loc_95CC7C" or something similar. Once you figure out the purpose of a function or variable, you hit a button and rename it.

> In such projects, what's distributed is a recreation of the compiled form of the original software, bearing little resemblance to what the original creators worked on. In terms of work and creativity involved, it's more like watching a movie, summarizing the plot, and then plugging back the holes to make another movie that has the same feel.

It's like someone transcribing the screenplay for a movie. The stage directions are going to be different, but it's still the same movie.

Re:Take-Two Sues Enthusiasts Behind GTA Fan Projects Re3 and... by Const-me on Friday September 03, 2021 @10:43AM (#28404852)
> here's a sample of code from the re3 repository in question.

Do you have a link? I have downloaded all 3 branches (master, miami and lcs), searched for these constants and got nothing.

The code you have copy-pasted crashes on Windows with 100% guarantee. You see, lower 2GB (or optionally 1GB with the /3GB kernel switch) of address space is reserved for the OS kernel.

Re:Take-Two Sues Enthusiasts Behind GTA Fan Projects Re3 and... by GranPC on Friday September 03, 2021 @11:09AM (#28405222)
It looks like that's code from a very old commit. re3 was initially built by injecting code into the regular GTA 3 binary, and slowly replacing methods inside the game with drop-in replacements that functionally worked the same. When enough of these replacements were built, it was then converted to a standalone binary.
Re:Take-Two Sues Enthusiasts Behind GTA Fan Projects Re3 and... by Const-me on Friday September 03, 2021 @11:29AM (#28405509)
Indeed, git format-patch found them. The magic numbers were present in the very first commit, and removed on 17 Apr 2020. The readme of the first commit said this:

The aim of this project is to reverse GTA III for PC by replacing parts of the game one by one https://en.wikipedia.org/wiki/Ship_of_Theseus such that we have a working game at all times.

Gonna be interesting to see the 2400 years old thought experiment tested in a modern US court :-)

Re:Take-Two Sues Enthusiasts Behind GTA Fan Projects Re3 and... by rhn_mk1 on Friday September 03, 2021 @12:09PM (#28406055)
If they were caught distributing un-replaced code, the court will have an easier job sidestepping the question.
Re:Take-Two Sues Enthusiasts Behind GTA Fan Projects Re3 and... by yjftsjthsd-h on Friday September 03, 2021 @11:00AM (#28405102)
It's probably an old commit