News for hackers. Stuff that matters.
Re:Take-Two Sues Enthusiasts Behind GTA Fan Projects Re3 and... by klodolph on Friday September 03, 2021 @08:28AM (#28403239)
> I think the opposite is true, what they did was fair use. The defendants are outside US, pretty sure everything they did was 100% legal in their jurisdictions.

There's just no way that it's fair use to distribute a decompiled copy of a game. Reverse engineering and decompiling are generally legal, but they don't strip away copyrights from the code.

Think about it this way... compiling source code does not change who has the copyright on the code. Decompiling source code does not change it either. Cleaning up the output from IDA or Ghidra does not magically strip away copyright.

If I went to a Broadway show and sat down with a pad of staff paper so I could transcribe all the songs, and then put my transcriptions up on GitHub, I could get sued by the composer and the composer would win.

Re:Take-Two Sues Enthusiasts Behind GTA Fan Projects Re3 and... by dognotdog on Friday September 03, 2021 @11:17AM (#28405350)
It seems like using something that's reverse engineering to achieve "interoperability", in this case playing the games on modern hardware, is generally legal in the US/EU, as long as you also own a license to the original, which seems like is a requirement to use the Re* versions, as you need the original game assets.

Decompilation / reverse engineering is very different from "transcribing" a play. Transcribing a play, you would get back an almost exact copy of the source material, whereas decompiling is more akin to taking a car and measuring all the bits of it. You would certainly not get the original drawings or CAD files back out of it. You do not decompile "source code", but machine code, and the source code you get back is not a recreation of the original copyrighted code, but the decompiler's analysis of the machine instructions, stripped of the original design and intent (the creative work part which makes source code copyrightable in the first place).

Measurements (or information) in general is not copyrightable, despite what IP protectionism claims, and in this analogy the machine code is much closer to the mechanical pieces of the car that make it work than the original designs. Either way, the fair use / reverse engineering provisions already create an exemption.

The questions is wether there are enough legal loopholes to squash these generally allowed uses through some other parts of the law or licensing terms, eg. by claiming that some IP (patents, trade secrets) are infringed some other way by publishing the reverse engineered code.

Re:Take-Two Sues Enthusiasts Behind GTA Fan Projects Re3 and... by klodolph on Friday September 03, 2021 @01:38PM (#28407096)
I think people are hung up here on the question of whether reverse engineering is legal or whether it is considered fair use to reverse engineer something. However, I don't think that's the relevant question.

The question here is whether you are allowed to publish the results of your reverse engineering and decompilation efforts on GitHub. In this case, the answer seems like a very clear and obvious "no".

1. It's a derivative work of the original.

2. It's the entire executable, not just a portion.

3. It's not transformative.

4. The original work is creative.

5. It competes with demand for the original work (remasters).

With so many different factors stacked against it, I just don't see any kind of plausible defense here.

> Transcribing a play, you would get back an almost exact copy of the source material, whereas decompiling is more akin to taking a car and measuring all the bits of it.

Another red herring here... it is irrelevant how superficially close this is to the original source code.

When you compile a program, the result is not a copy of the original source code either. However, the compiled version of a program retains the copyright of the original source code. Likewise, a decompiled program would retain the copyright.

> The questions is wether there are enough legal loopholes to squash these generally allowed uses...

"Legal loopholes" kind of presumes that this sort of effort is permitted by default, but might be illegal through some kind of technicality. These people are distributing the results of IDA Pro / Ghidra decompilation efforts of an entire executable program on GitHub. Seems like very crystal-clear case of copyright infringement.

Again, to clarify things because people are hung up on this point--it is not about whether reverse engineering is legal. It is about whether you are permitted to distribute the results of reverse engineering. Kind of like asking whether it's legal to rip a CD... yes, ripping a CD is legal. Posting a ripped CD online is not.

Re:Take-Two Sues Enthusiasts Behind GTA Fan Projects Re3 and... by dognotdog on Friday September 03, 2021 @06:13PM (#28410007)
Interesting points! I am not sure which is right, or legal, but there seem to be grey zones, yet.

> Another red herring here... it is irrelevant how superficially close this is to the original source code.

It wasn't until Apple vs. Franklin that object code became copyrightable, prior to that the USPTO held the analogy of "design drawings vs. actual bridge" as the relation of "source vs. object code", and as far as I am aware that case still left some questions open.

There's also the first sale doctrine. So, once I buy a (mechanical, haha) car, I can modify it, take measurements of it, in fact describe and publish every bit of information I can think up of, right, because once it was given to me, I can do with it as I please, unimpeded by the manufacturer. This is, of course, where things get murky.

Now, a binary has elements of literal nature that copyright protects, but a decompilation results in a completely different information stream, so that seems like a non issue. Thus, we are left with the non-literal copyrightable elements of structure, sequence, organization. Copyright protects expression, but not ideas. So, the binary code is an expression of the author's ideas, and thus it seems sensible that the decompiled version is, too, BUT: only creative expression, not things that are necessary and utilitarian to perform a given function, and this is where it get's less well-defined. So if there are decompiled portions, that might not be enough for a copyright claim, provided they are utilitarian in nature. Of course, just decompiling the whole thing and publishing that looks very much like infringemen, indeed.

I do think this nicely embodies the difficulty of dealing with IP vs. actual, tangible things, though. With the car or bridge analogs, copyright would not prevent anyone from replicating them, but it would be patents and trademarks that put restrictions on how and what can be reproduced, instead of the much stronger restrictions of copyright on software.

I'd personally much more comfortably equate binary code with mechanical elements than works of creative authorship (though much of my livelyhood relies on the latter, in lieu of other mechanisms), but this view isn't universally shared, and possibly not even universally applicable.

Re:Take-Two Sues Enthusiasts Behind GTA Fan Projects Re3 and... by klodolph on Saturday September 04, 2021 @03:12PM (#28418132)
> I do think this nicely embodies the difficulty of dealing with IP vs. actual, tangible things, though. With the car or bridge analogs, copyright would not prevent anyone from replicating them, but it would be patents and trademarks that put restrictions on how and what can be reproduced, instead of the much stronger restrictions of copyright on software.

Photographs of artwork such as paintings or statues are routinely seen to be infringements of the original work. So it is not unique to software. There are lots of demarcations and corner cases for this... for example, if you install your statue in public, you no longer have grounds to sue people for photographing it. If the statue is a minor part of a photograph, then it's not infringement.

Same applies to software. This is well-tread ground, by this point. People have been reverse engineering and copying software for a long time.

> Now, a binary has elements of literal nature that copyright protects, but a decompilation results in a completely different information stream, so that seems like a non issue.

Copyright protects original works of authorship. There is nothing in copyright law that talks about something's "literal nature" or different "information streams". For example, if I write a song, I am still the author of the song even when that song is performed--even though that requires a significant amount of interpretation, transformation, and creativity on the part of the musicians. I am still the author.

Likewise, if I write a book about a character named Jean-Luc Picard, who is the bald captain of a captain of a spaceship in my made-up universe, Paramount has grounds to sue for copyright infringement.

Copyright law talks mostly about very ordinary terms like authorship. Authorship survives all sorts of transformations... not infinitely so, but neither decompilation nor refactoring will change who the author of a program is.

Re:Take-Two Sues Enthusiasts Behind GTA Fan Projects Re3 and... by Const-me on Friday September 03, 2021 @08:43AM (#28403386)
> no way that it's fair use to distribute a decompiled copy of a game

That’s not what these people did. A source code of a re-implementation of a game engine is not a copy of the game. I have compiled and tested that thing, but it was only legal for me to do so because I had the original one bought on Steam.

> I could get sued by the composer

Right. “The great thing about this country is you can sue anyone for pretty much anything, and you probably win. Or at least, get a settlement.” https://gta.fandom.com/wiki/Rakin_and_Ponzer

Re:Take-Two Sues Enthusiasts Behind GTA Fan Projects Re3 and... by klodolph on Friday September 03, 2021 @08:55AM (#28403500)
> That’s not what these people did.

Yes, it is. They decompiled it with tools like IDA Pro and Ghidra, and then they cleaned up and refactored the results.

> ... but it was only legal for me to do so because I had the original one bought on Steam.

Whether it's legal for you to run the program is a separate issue. The fact is: the code is distributed to anyone who can access GitHub, not only people who have legitimate copies of GTA3.

> “The great thing about this country is you can sue anyone for pretty much anything, and you probably win.

It should have been clear that I was saying that the composer would have legal grounds to sue and win.

Re:Take-Two Sues Enthusiasts Behind GTA Fan Projects Re3 and... by Const-me on Friday September 03, 2021 @09:10AM (#28403679)
> the composer would have legal grounds to sue and win

I wonder was that tested in a court? In a case where the person who transcribed the song has not profited in any way from that, neither selling the transcription, not selling ads on the web?

Re:Take-Two Sues Enthusiasts Behind GTA Fan Projects Re3 and... by bigwavedave on Friday September 03, 2021 @10:17AM (#28404536)
> the composer would have legal grounds to sue and win

>> I wonder was that tested in a court? In a case where the person who transcribed the song has not profited in any way from that, neither selling the transcription, not selling ads on the web?

N=1, but when I was in high school, I remember that several friends in the drama/theatre department were really disappointed one year because they'd performed a copyrighted play the year before for our school (at no charge; our principal firmly believed that charging the $1 admission they typically charged separated the "haves" from the "have-nots"), the board of education received a letter from the copyright holder, and now they were no longer able to do any plays for the school.

I guess this doesn't touch whether or not this has been tested in court, but it certainly scared the pants off our board of education.

Re:Take-Two Sues Enthusiasts Behind GTA Fan Projects Re3 and... by klodolph on Friday September 03, 2021 @09:36AM (#28404018)
> I wonder was that tested in a court?

Yes, over and over again I'm sure. I remember hearing about some specific cases involving Broadway composers but I can't remember the details. This is not some kind of weird edge case, it's an entire industry. You have people who write music, people who perform music, people who transcribe records, and then companies which sell books of transcriptions / arrangements. This is what most of the rock/pop music books at your local music store contain.

There's a market for people who want to learn to play The Beatles, so a skilled musician will listen to a Beatles record and transcribe all of the parts, an engraver will lay it out on the page, and a publishing company will negotiate with the rightsholders for a license.

You'll see many different versions of the same song, if you go down to the store. Some of the differences are due to different transcription choices, and other differences are simplifications or arrangements for different skill levels, different instruments, or other reasons. All of them are different, but the composer credit will be the same.

Re:Take-Two Sues Enthusiasts Behind GTA Fan Projects Re3 and... by Const-me on Friday September 03, 2021 @10:25AM (#28404620)
On the high level, copyright is a mechanism allowing to make profits from intellectual property. Take Two should demonstrate in the court how the defendants interfered with their ability to extract profit. I don’t think they can do that.

Selling transcriptions = making profit from copyrighted work. Obviously illegal unless the seller has an agreement with the copyright holder.

Giving transcriptions for free and not even making money with advertisements on the web is not, and I would be interested to see a court case against a person doing that. Even if that’s a copyright violation that’s still reasonable. The copyright owner can assume that at least some of the people who have download free transcriptions would otherwise go to a music store and pay them for the license. The transcriber has caused monetary losses to copyright holder.

But with GTA3 it’s different. People like me who built and run the game from that github repository still need to own the original games. Therefore, people who developed that code have not caused any monetary losses to the developer selling original games.

Re:Take-Two Sues Enthusiasts Behind GTA Fan Projects Re3 and... by klodolph on Friday September 03, 2021 @10:34AM (#28404724)
> Take Two should demonstrate in the court how the defendants interfered with their ability to extract profit. I don’t think they can do that.

Maybe the law should work that way, but it definitely doesn't work that way.

> Selling transcriptions = making profit from copyrighted work. Obviously illegal unless the seller has an agreement with the copyright holder.

Fair use has four factors, and whether the infringing party is making profit is only one of the four factors.

You can also get sued for photocopying sheet music you legally purchased, when you're not making any money from the copies or from the performances. It has happened because selling sheet music is the primary way some composers make money in the first place, and so much of the case law around music dates back to an era where that was just how music was published.

> But with GTA3 it’s different. People like me who built and run the game from that github repository still need to own the original games. Therefore, people who developed that code have not caused any monetary losses to the developer selling original games.

These kinds of arguments don't have any legal basis. You can argue for changes in copyright law all you like. Your original comment was about the legality, and that's what I'm responding to.

Re:Take-Two Sues Enthusiasts Behind GTA Fan Projects Re3 and... by realusername on Friday September 03, 2021 @11:45AM (#28405700)
> There's just no way that it's fair use to distribute a decompiled copy of a game. Reverse engineering and decompiling are generally legal, but they don't strip away copyrights from the code.

In France it's legal to redistribute it if it's for "interopability purposes" which is very easy to defend in this case since RE3 is primarly used to make a massive amount of ports (Switch, Vita...) which would not exist without this project.

Re:Take-Two Sues Enthusiasts Behind GTA Fan Projects Re3 and... by rhn_mk1 on Friday September 03, 2021 @08:53AM (#28403478)
It's not a decompiled copy. A decompiled copy is not useful for anything, as it would have to be recompiled. State of the art decompiles produce incomprehensible garbage, rarely even possible to compile.

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.

I don't know about fair use, but if the defendants are not in the US, then the concept of fair use is not even necessarily in play.

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
Re:Take-Two Sues Enthusiasts Behind GTA Fan Projects Re3 and... by Hamuko on Friday September 03, 2021 @08:56AM (#28403512)
>I don't know about fair use, but if the defendants are not in the US, then the concept of fair use is not even necessarily in play.

The suit is filed in California so I imagine that Fair Use, and the rest of the US legal code, is in play.