Live data from Hacker News

Bringing a decade old vector editor back to life

github.com

11–20 of 89 posts

Re: Bringing a decade old vector editor back to life

#12
I've reverse engineered a number of content encryption schemes. It's always a ton of fun, and you get to see the large amount of psychological warfare at play at the higher tiers.

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.

Re: Bringing a decade old vector editor back to life

#13

This is part of a larger pattern of fairly weak attempts to confuse a reverse engineer that made it frustrating to figure out what all the opcodes did, and there were many duplicate opcodes that were just implemented in different ways. Since the code presented in the article didn't look like handwritten Asm (and if it was, it would've probably been even more insanely obfuscated and greatly confused IDA's decompilatio…

A lot of obfuscators out there use VMs with convoluted pieces of assembly implementing each opcode of the VM. Pushing, popping, swapping register values, etc, etc. In many cases the opcodes are microinstructions that can be used to implement x86 instructions making the VM an x86 emulator. It's super satisfying when you finally get x86 opcodes out of the other end and then patch those back into the program.

Re: Bringing a decade old vector editor back to life

#14

This was amazing to read. Reading stories of reverse engineering and cracking long-dead programs are interesting enough, but then being able to buy the domain and re-implement the authentication servers from just what the client expects?! I'm staggered at the skills needed to do that.

It's amazing what people can accomplish... Gives me hope that old video games will one day receive the same treatment. Way too many of them lost online multiplayer after the game company moved on.

Re: Bringing a decade old vector editor back to life

#15

This is part of a larger pattern of fairly weak attempts to confuse a reverse engineer that made it frustrating to figure out what all the opcodes did, and there were many duplicate opcodes that were just implemented in different ways. Since the code presented in the article didn't look like handwritten Asm (and if it was, it would've probably been even more insanely obfuscated and greatly confused IDA's decompilatio…

Pure speculation, but it's quite possible that it was written in Delphi (the last iteration of Borland's Turbo Pascal lineage), which had a fast single-pass compiler that did very little optimization. Delphi was very popular in Germany in the late 1990s and early 2000s.

Re: Bringing a decade old vector editor back to life

#18
post #12

I've reverse engineered a number of content encryption schemes. It's always a ton of fun, and you get to see the large amount of psychological warfare at play at the higher tiers. 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 fil…

Indeed, it's often more fun than playing the game itself; but then again, I'm someone who has been taking things apart since I was very young (and not surprisingly, got into trouble a few times for it...) I suspect RE is something that's closer to what those in the other sciences do, i.e. analysis and thinking more about how/why things are the way they are, rather than what they can build; which is why not a lot of developers (who almost always build, except when they have to debug) seem to have any interest/skills of RE much if at all.

Re: Bringing a decade old vector editor back to life

#19
post #16

I though it was FreeHand. Maybe someday

Oh that brings me way back. Got my start in dev idly editing websites in Macromedia Homesite and Freehand and Firesomething. I figured Adobe already killed off the MM stuff.

Macromedia Fireworks, I liked that one!

Re: Bringing a decade old vector editor back to life

#20
post #16

Earlier quoted context omitted.

Oh that brings me way back. Got my start in dev idly editing websites in Macromedia Homesite and Freehand and Firesomething. I figured Adobe already killed off the MM stuff.

Macromedia Fireworks, I liked that one!

I still use the final version Adobe released - it's a damn shame as it is the perfect mix of pixel and vector for quick day to day editing and web layout design.
Post reply on HN