maybe I'd be better at getting back into my reverse engineering projects if getting back into them didn't involve first figuring out which of the 13 Ghidra versions I have installed is for that project
-
@nex yeah I've played it on DOS computers! that's relatively normal, if just anachronistic
-
@cr1901 yeah, they're java.
-
okay now I can see why may2023!foone got stuck here. this is so fucking complicated.
-
I'm trying to decode a scripting language for a video game, but the problem it's not just a bytecode file, it's more like an EXE file. It's got multiple sorts of metadata that has to be properly parsed, and linking that needs to be done, and that task is proving to be a little too hard for my tiny brain
-
especially because it's doing this kind of... in-place relocation thing?
-
<?xml version="2.0"?>replied to Foone🏳️⚧️ last edited by
-
like the bytecode will be:
pvm_Call 0, 0
and then the relocations will kick in and that'll turn into:
pvm_Call Vanna.revealTile
-
Foone🏳️⚧️replied to <?xml version="2.0"?> last edited by
@overanalytcl @cr1901 Yes. unless you also had an extension that only worked on version X
-
but because this is all done in an in-place loading style, it's really a pain to understand, so I've not yet been able to write a disassembler
-
it's also a typed VM, so that makes it even more complicated. (Because the types are stored in the executable metadata)
-
Graham Sutherland / Polynomialreplied to Foone🏳️⚧️ last edited by
@foone heh, this sounds like .NET
-
Foone🏳️⚧️replied to Graham Sutherland / Polynomial last edited by
@gsuberland yeah, but the weird thing is that .net is a whole professional programming language thing, and this is a scripting language for a Wii game
-
Graham Sutherland / Polynomialreplied to Foone🏳️⚧️ last edited by
@foone yeah, certainly seems like they put a ton of effort into it. any evidence that it might be a licensed library?
-
huh. this game has a "SILENCE LOADING ERRORS" flag. there's no way to turn it on, so loading errors will always be reported.
normally games have a verbose/debug flag that devs turn on, not a "be quiet" flag that never gets turned on
-
Foone🏳️⚧️replied to Graham Sutherland / Polynomial last edited by
@gsuberland Nope. All I can tell is that it's in-house, but they seem to have used it across several games
-
oh god. I thought I'd fill out the resolveTypes function of module loading but it turns out it's a five-pass loader that loads data in place
-
oh god
if( fixup_passes>=64 ){
btype_failure = true;
} -
SIXTY FOUR FUCKING FIXUP PASSES?
-
Alexander The 1streplied to Foone🏳️⚧️ last edited by
@foone The HD-rerelease will have 128 fixup passes.
-
I think these guys wrote their scripting language so that array types have a declared length, but then neglected to actually tell the script executor about that. it doesn't seem to save that information anywhere or compare it to anything