Coder Social home page Coder Social logo

Comments (6)

rr- avatar rr- commented on August 29, 2024

XP3 should be easy to work with - I'll take a look tomorrow or at Thursday. It probably uses CXDEC, which changes from game to game.

from arc_unpacker.

rr- avatar rr- commented on August 29, 2024

Unfortunately it's not CXDEC == it isn't trivial == needs a good number of hours to reverse fully. Since I'm short of time these days, maybe you could ask GARbro's maintainer to support this game faster?

If you do, here's some info I've collected in preliminary analysis, which should save them a bit of work:

  1. The entry point to the whole thing seems to be located at lavender.tpm+0xE70. Specifically, it can be reached by analyzing references to zlib's uncompress function, and comparing it to kirikiri source code by tracking down usages of TVPXP3ArchiveExtractionFilter upwards.
  2. I also noticed the game executes code from dynamically allocated regions, which probably means that it uses dynamic assembly like CXDEC did. Also, it too uses "encryption control block" as well as two constants in form of (x & A) + B, all looking familiar to CXDEC, but don't let it fool you - later it does everything differently, and I think it starts with compiling repeatedly mini-functions that serve as LCGs at a later time.
  3. To prove without doubt that it's not CXDEC, there's not even one mention of 0x41C64E6D, which served an essential role in the CXDEC as a part of its RNG.

Haven't progressed much further than that and I don't know when I'll have more time to dive deeper. 😣

from arc_unpacker.

fro0116 avatar fro0116 commented on August 29, 2024

Thank you so much for taking the time to look into this @rr-!

I have shared your findings with the GARbro devs as you suggested in the following issue: morkt/GARbro#26

from arc_unpacker.

morkt avatar morkt commented on August 29, 2024

it's CXDEC, constants are

  Mask = 0x181,
  Offset = 0x635,
  PrologOrder     = { 2, 1, 0 },
  OddBranchOrder  = { 4, 0, 1, 5, 2, 3 },
  EvenBranchOrder = { 7, 5, 2, 3, 6, 1, 4, 0 },

from arc_unpacker.

rr- avatar rr- commented on August 29, 2024

Oh? I was pretty sure it wasn't, I feel embarrassed... sorry for the trouble, @morkt.

from arc_unpacker.

rr- avatar rr- commented on August 29, 2024

Added dc4da95 + 4ea2eda.
There's problem with nightly builds server, but the ISP is already sorting this out, so it should be probably up again tomorrow.

from arc_unpacker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.