Unlocking All CGs in Rebirth: Mr Wang
Quick guide
- Download E70E04A0-D73E-4A80-A51B-FBB6F7C40F12.dat
- Rename it to GameFrameworkSetting.dat
- Close the game first, then put it into (or replace the file in)
%HOMEPATH%/AppData/LocalLow/DSGame/Rebirth Mr Wang - Launch the game and click the recollection gallery. In theory, it should already be unlocked.
How I did it
Xingyu came over and wanted to play some eroge. He couldn't be bothered to go through the story and figured he'd just watch the CGs, so he started looking for a guide to unlock all of them. He searched around and couldn't find one, so we started exploring the path to the lewd content ourselves.
Games like this are usually made with Unity, so I went straight to %HOMEPATH%/AppData/LocalLow/DSGame/Rebirth Mr Wang. There were three files in that folder:
GameFrameworkSetting.dat, Label.sav, and Player.log. After some poking around, I found that GameFrameworkSetting.dat looked roughly like this:
Since I hadn't worked with Unity before, I ignored that pile of garbled bytes for now. Strip them out and it should be JSON. You can see there are 8 JsonObjects under Revive, each with an IsLock field, which line up exactly with the 8 CGs, so I guessed right away that this was what controlled CG unlocks.
But when a CG isn't unlocked, shouldn't IsLock be true? (scratch that)
So I just changed all 8 false values to true. I thought I'd be able to get off happily, but after launching the game, the recollection gallery was completely empty. I checked Player.log and it had thrown a file read error.
I tried for a while longer, but it still didn't work, so I had to start reverse engineering the code that read and wrote this file.
From the errors in Player.log, I could see the loading code used a class called StarForce. It's in Assembly-CSharp.dll. I followed the trail all the way to the deserialization method in the DefaultSetting class.
As you can see, this is just some basic read operations. Then I traced the BinaryReader being passed in to GameFrameworkSerializer:
You can see this reader is read four times before it's passed in, and then it enters the callback, which is the Deserialize method above.
Next I wrote the code to read it:
CG class
public class CG
}
Reader class
using LitJson;
};
With that, reading and modifying the contents was done.
Then I had to write the modified contents back.
I found the Serialize method in the GameFrameworkSerializer class:
public bool Serialize(Stream stream, T data, byte version)
}
As you can see, it first writes a 3-byte header, then a version. The header is set directly in the GameFramework code. For the version, I could just read the fourth byte of the original file (I'd already stored it in the version variable earlier).
The header can be found in GameFramework's DefaultSettingSerializer:

The code that writes the settings section can be found in DefaultSetting; it's also used as a callback.

With that, I could start writing the code to save it.
FileStream writeStream = new FileStream("E:/WORKSPACE/rebirth_crack/GameFrameworkSetting.dat", FileMode.Open, FileAccess.ReadWrite);
}
And now this GameFrameworkSetting.dat is the file with the CGs unlocked, and it works normally.
