Jump to content

Tricky extraction of XP3 embedded in KiriKiri EXE. Ideas?


Darbury

Recommended Posts

Hey all! I'm dealing with a particularly tricky asset extraction for a very old, very short KiriKiri-based VN, and was hoping someone might be able to shed some light on it.

As is sometimes the case with these old KiriKiri games, there are no separate .XP3 files; they're embedded right into the .EXE. I've used KrkrExtract to handle extraction on titles like this before. But this time, it just silently fails.

Digging into the hex code, I see the author has obfuscated/compressed the .EXE using a command line tool called UPX (Ultimate Packer for eXecutables). Great ! I grab that and successfully unpack the .EXE. Progress! But nope, KrkrExtract still silently fails.

Okay, then how about manual .XP3 extraction via hex editor, which is something I've had to do once or twice? I know the signature string I'm looking for (58 50 33 0D 0A 20 0A 1A 8B 67 01), but unlike in most cases, I only find the first part (58 50 33 -- i.e. "XP3"). The rest is an unfamiliar set of values. I manually extract the data anyway and give it a whirl, but it doesn't function like a proper .XP3 file. So no luck there.

So is the embedded .XP3 encrypted? I guess anything is possible, but I'm thinking probably not, since I can see bits and pieces of plaintext script here and there via the hex editor.

I'm temporarily stumped. Any other approaches I'm not thinking of here? Should I just beat it like a piñata until all the delicious assets fall out? Is that how computers work?

Link to comment
Share on other sites

One step forward, two steps back.

I ended up having to laboriously hex edit assets out of the .EXE one file at a time, rather than as the usual nice-n-tidy XP3 package. So now I have media and scripts. (One step forward!)

But once I look at the file manifest, I discover that the old KiriKiri game in question doesn't seem to have an Initialize.tjs file, which means it lacks the standard structure to even accept patches to begin with. (One step back!) And moreover, making hex edit revisions to the file doesn't seem to work either, since changing even a single byte results in KiriKiri throwing an "Uncompression failed" error on launch. (Another step back!)

Looks like this one goes on the back burner for a while. Because you know what's easier than wrestling with old KiriKiri games? Scotch. Scotch is easier. Especially on Fridays.

This message brought to you by the National Council on Scotch.

Link to comment
Share on other sites

To be honest, at this point it might be wiser to just see if you can get an old krkr engine exe and run it with the extracted scripts rather than try to reproduce whatever the original author did. I guess it depends on whether it's freeware or not, but if it's really short and old, then maybe...?

Link to comment
Share on other sites

  • 2 months later...

So hey! This eventually became a thing. Two things, actually.

Does Anybody Really Know What Time It Is? / The Girl in the Glass: Short horror-tinged VN that's part medical drama, part psychological thriller, part murder-mystery.
https://www.thejulysociety.com/projects/the-girl-in-the-glass

The End of the Summer: Very short VN about the disappearance of a family's pet cat... among other things.
https://www.thejulysociety.com/projects/the-end-of-the-summer

Ended up ditching KiriKiri entirely for these and just rebuilt from the ground up in Ren'Py. The originals haven't been officially available for years now, so the engine switch makes some amount of sense.

Super old, super doujin, and I'm super okay with that.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...