by Jasper_ · 6y ago · 0 comments
A very common trick that I've seen in a lot of Japanese games, for offline material, is to combine a hashing system and encryption. That is, the game will attempt to load "main.script", which is a custom bytecode scripting language. The file stored on disk would have the filename of a SHA1 hash of "main.script", but the contents would be encrypted with a private key like "tprics.niam". "main.script" then loads a number of other files using its scripting system, so it's a very annoying process to take the whole thing apart, as you need to hunt down the original filename through the scripting system. Either that or you guess at filenames.
You tend to see some really high-level effort put into systems, like the one game I took apart that had its own custom scripting language with classes and coroutines.
https://gist.github.com/magcius/bff948b13128b70695e3841e2084...
One game I found had a custom bytecode system that drove me nuts for weeks. The opcodes were specifically picked so that a large number of the popular ones were reflections of each other in dec, hex and binary. So you'd go "I've seen opcode 0x0353 before", but alas, you had actually seen opcode decimal 353. Similarly, there were opcodes 101 and 0x101 and 0b101 and they all did slightly different things. You think you could stick to hex, but there's enough slop in the process and your brain is so used to pattern-matching that it was pretty effective.
They really are much closer disciplines than most people might imagine.
Or, like people do in RE, you fall back to things you know (OP knew hex, decimal and binary before he encountered the reflected codes he talks about) and you try to force the paper through your personal veil. I guess when people reverse engineer hardware you follow the routes you took (maybe taking months) the first time you took something apart.
Usually, it makes sense to do so because the reason why you read the paper in the first place is because you think that it has some connection with your own work.
In Quantum Mechanics circles, many authors have different mathematical backgrounds, so just translating what they are doing and thinking is already RE. A good example of this is logical semantics: There are countless flavours of how to write logic down, each with their own symbols and motivations. I would prefer if any logic that you end up with is the internal logic of a category, but analogously this would be like Apple forcing everyone to use their hardware connector pins.
A paper usually does have a path that is chosen by the author, but the RE component is inevitable if you want the paper to be in context with your own reasearch. Otherwise I guess it would be more like a class or university module, where you are following along, but you don't really have an intention of building on the subject matter in your own time. Science also has the disadvantage to newcomers that you don't know how much has already been done, and hence you are forced to have endless lectures to just bring you up to speed.
Often it seems rather paradoxical in nature because the main reason they don't open-source it is that they're waiting for a time in the future when the demand rises and it will be worth something again, and yet the increased demand only happens because of the efforts of reverse engineers keeping the community alive. It's almost always impossible for the reverse engineers to legally get paid for this work too. The only hopes for that is either for the copyright holders to raise enough money and decide to hire them, or to do an anonymous patreon and hope it doesn't attract the wrong kind of attention.
One of the reasons I was attracted to computers when I was a kid was figuring out Windows secrets.
See [0] and page 25 of [1]
[0] (PDF) https://cs.oberlin.edu/~ctaylor/classes/341F2012/xbox.pdf
[1] (PDF) https://events.ccc.de/congress/2005/fahrplan/attachments/674...
while(true) {
Animate(image);
wait 200;
}
implies there are multiple synchronous execution stacks. It's not threading, as the synchronization points are explicit.Hmmm, I'd have just called it cooperative threading/multitasking then. Or do you think that would be wrong?
What kind of games are we talking about? Computer games or mobile ones?