Hey Guys,
today I decrypted a Nintendo 3DS Game and found MAAAAAANY scripts and code-related stuff as plain text in it.
The Game I've decrypted was "Harvest Moon A new Beginning" for 3DS.
But the Game contains some xbb-files which are encrypted or compressed and I don't know how to decrypt/decompress them.
I've uploaded some and hope, that someone could help me with it.
I want do decrypt/decompress them. I think, they're compressed/encrypted on the same way.
Would be great if you can help me with it
Important information: this site is currently scheduled to go offline indefinitely by end of the year.
decompress xbb file from "Harvest Moon A new Beginning 3DS"?
-
- veteran
- Posts: 154
- Joined: Sun Feb 23, 2014 4:10 pm
- Has thanked: 4 times
- Been thanked: 3 times
Re: decompress xbb file from "Harvest Moon A new Beginning 3
Is someone able to help me with this? :/
Someone sent me a txt-file with informations about xbb files from an older Harvest Moon Game.
https://www.dropbox.com/s/56ertxekzzkqw ... n.txt?dl=0
Another documentation
https://gist.github.com/andibadra/2632d ... xbb_3ds-md
I really want to unpack and repack this files
Someone sent me a txt-file with informations about xbb files from an older Harvest Moon Game.
https://www.dropbox.com/s/56ertxekzzkqw ... n.txt?dl=0
Another documentation
https://gist.github.com/andibadra/2632d ... xbb_3ds-md
I really want to unpack and repack this files
-
- advanced
- Posts: 49
- Joined: Wed Dec 29, 2010 11:26 pm
- Has thanked: 7 times
- Been thanked: 19 times
Re: decompress xbb file from "Harvest Moon A new Beginning 3
Using the links that you gave me, i wrote this algorithm to extract xbb files:
The extracted files have the header PAPA and I developed this code to extract them.
From what I've seen, this is probably a file with information that only the game knows. The extracted files seem to have a pattern, but it depends on the file. If you are interested we can analyze the extracted files.
Code: Select all
#XBB
IDString 0 XBB;
GoTo 4 0;
Get NFiles Long 0;
GoTo 32 0;
For T = 1 To NFiles;
Get FileOffset Long 0;
Get FileSize Long 0;
Get FileNameOffset Long 0;
Get FileID Long 0;
SavePos HeaderOffset 0;
GoTo FileNameOffset 0;
Get FileName String 0;
Log FileName FileOffset FileSize 0 0;
GoTo HeaderOffset 0;
Next T;
Code: Select all
#PAPA
IDString 0 PAPA;
GoTo 8 0;
Get HeaderOffset Long 0;
Get HeaderSize Long 0;
Get NFiles Long 0;
Math NFiles -= 1;
For T = 1 To NFiles;
Get FileOffset Long 0;
SavePos HeaderCurOffset 0;
Get NextFileOffset Long 0;
Set FileSize Long NextFileOffset;
Math FileSize -= FileOffset;
GoTo HeaderCurOffset 0;
Log T FileOffset FileSize 0 0;
Next T;
-
- veteran
- Posts: 154
- Joined: Sun Feb 23, 2014 4:10 pm
- Has thanked: 4 times
- Been thanked: 3 times
Re: decompress xbb file from "Harvest Moon A new Beginning 3
Oh nice! I will try it!
I need quickbms for this, i guess?
Yea, would be great if you could help me with analyzing the extracted files.
It would be VERY helpful
I need quickbms for this, i guess?
Yea, would be great if you could help me with analyzing the extracted files.
It would be VERY helpful
-
- advanced
- Posts: 49
- Joined: Wed Dec 29, 2010 11:26 pm
- Has thanked: 7 times
- Been thanked: 19 times
Re: decompress xbb file from "Harvest Moon A new Beginning 3
I used multiex commander to extract the files. May i ask for what purpose do you want to extract the files? Do you want to repack them?
-
- veteran
- Posts: 154
- Joined: Sun Feb 23, 2014 4:10 pm
- Has thanked: 4 times
- Been thanked: 3 times
Re: decompress xbb file from "Harvest Moon A new Beginning 3
I want to edit and repack them, yes.ekanspt wrote:I used multiex commander to extract the files. May i ask for what purpose do you want to extract the files? Do you want to repack them?
And If possible, add NEW FILES to the xbb-files!
Uploaded the Msg.xbb which should contain all Strings etc. Could you make the files "editable"?
http://filehorst.de/d/bBFxHsvs
Last edited by ChrisX930 on Sun Mar 01, 2015 2:50 pm, edited 1 time in total.
-
- veteran
- Posts: 154
- Joined: Sun Feb 23, 2014 4:10 pm
- Has thanked: 4 times
- Been thanked: 3 times
Re: decompress xbb file from "Harvest Moon A new Beginning 3
btw. I was able to modify some script-related things and to compile it back to the Game! It works!
http://abload.de/img/modixmuwz.jpg
http://abload.de/img/modixmuwz.jpg
-
- advanced
- Posts: 49
- Joined: Wed Dec 29, 2010 11:26 pm
- Has thanked: 7 times
- Been thanked: 19 times
Re: decompress xbb file from "Harvest Moon A new Beginning 3
So the xxb files you can extract with multiex commander. Do you know how to do that?
For the extracted files, i developed a simple program to extract them. Please note that I only take in consideration the Msg.xxb file, wich contains strings. Maybe the PAPA files have a standard format, but I don't have figured it out.
To extract the files, just drag and drop the PAPA file in the executable, or on the command line write 3ds.exe <inputFile>.
https://mega.co.nz/#!iZ5yBZyY!MjgGLb8ii ... T8eHRR6qv4
For the extracted files, i developed a simple program to extract them. Please note that I only take in consideration the Msg.xxb file, wich contains strings. Maybe the PAPA files have a standard format, but I don't have figured it out.
To extract the files, just drag and drop the PAPA file in the executable, or on the command line write 3ds.exe <inputFile>.
https://mega.co.nz/#!iZ5yBZyY!MjgGLb8ii ... T8eHRR6qv4
-
- veteran
- Posts: 154
- Joined: Sun Feb 23, 2014 4:10 pm
- Has thanked: 4 times
- Been thanked: 3 times
Re: decompress xbb file from "Harvest Moon A new Beginning 3
Yes, I know how to extract the xbb-files with multiex commanderekanspt wrote:So the xxb files you can extract with multiex commander. Do you know how to do that?
For the extracted files, i developed a simple program to extract them. Please note that I only take in consideration the Msg.xxb file, wich contains strings. Maybe the PAPA files have a standard format, but I don't have figured it out.
To extract the files, just drag and drop the PAPA file in the executable, or on the command line write 3ds.exe <inputFile>.
https://mega.co.nz/#!iZ5yBZyY!MjgGLb8ii ... T8eHRR6qv4
Did it already and tried your 3ds.exe for decrypting "PlayerAvatarData.xbb/PlayerBodyData/" and got a clean txt!
it seems to work for all the papa-files.
https://hackpad.com/PlayerBodyData.papa-XYdnMUGrVrv
This is really great!
Are you able to make a papa-repacker and xbb-repacker to add new things to the game?
Want to add a new AvatarBody (Character Outfit INgame) to the game. I have to add new lines to the papa-files like this one
PlayerBody
CUSTOM_OUTFIT
b_999
EDIT: For some pp-files, it seems that the 3ds.exe don't decrypt all needed infos.
In AvatarBodyData, it forgets the Object Name
-
- advanced
- Posts: 49
- Joined: Wed Dec 29, 2010 11:26 pm
- Has thanked: 7 times
- Been thanked: 19 times
Re: decompress xbb file from "Harvest Moon A new Beginning 3
It may work for all PAPA files but some have additional data that isn't considered in extraction.
For instance in FlowerList.xxb/FlowerData extracts (i think):
But it has some more information:
ITEM_RED_ROSE
ITEM_GARBERA
So as I said, I think that it extracts all the information from Msg.xbb PAPA files, but not from others. If you want I can help you, but you have to take a look with me to this files.
I think that yes, I can make the repackers, I will start with the xbb repacker.
For instance in FlowerList.xxb/FlowerData extracts (i think):
Code: Select all
FlowerGroup
FLOWER_GROUP_00
ITEM_TULIP
ITEM_RED_ROSE
ITEM_GARBERA
So as I said, I think that it extracts all the information from Msg.xbb PAPA files, but not from others. If you want I can help you, but you have to take a look with me to this files.
I think that yes, I can make the repackers, I will start with the xbb repacker.
-
- veteran
- Posts: 154
- Joined: Sun Feb 23, 2014 4:10 pm
- Has thanked: 4 times
- Been thanked: 3 times
Re: decompress xbb file from "Harvest Moon A new Beginning 3
Yes, I tried this with AvatarBodyData already and it doesn't extract all the informations.ekanspt wrote:It may work for all PAPA files but some have additional data that isn't considered in extraction.
For instance in FlowerList.xxb/FlowerData extracts (i think):
But it has some more information:Code: Select all
FlowerGroup FLOWER_GROUP_00 ITEM_TULIP
ITEM_RED_ROSE
ITEM_GARBERA
So as I said, I think that it extracts all the information from Msg.xbb PAPA files, but not from others. If you want I can help you, but you have to take a look with me to this files.
I think that yes, I can make the repackers, I will start with the xbb repacker.
Sure, tell me what I have to do
-
- advanced
- Posts: 49
- Joined: Wed Dec 29, 2010 11:26 pm
- Has thanked: 7 times
- Been thanked: 19 times
Re: decompress xbb file from "Harvest Moon A new Beginning 3
So from the image that you posted, there are some script files associated with xbb/papa files? I don't know anything from 3DS file format, so I need the much information that I can get.
If you can post one of the scripts and the corresponding xbb file it would be a great help.
If you can post one of the scripts and the corresponding xbb file it would be a great help.
-
- veteran
- Posts: 154
- Joined: Sun Feb 23, 2014 4:10 pm
- Has thanked: 4 times
- Been thanked: 3 times
Re: decompress xbb file from "Harvest Moon A new Beginning 3
Yes, some Scripts are associated with this files.ekanspt wrote:So from the image that you posted, there are some script files associated with xbb/papa files? I don't know anything from 3DS file format, so I need the much information that I can get.
If you can post one of the scripts and the corresponding xbb file it would be a great help.
I uploaded a example
The Game is written in Squirrel Language with uncompiled scripts (.nut)
You do not have the required permissions to view the files attached to this post.
-
- veteran
- Posts: 154
- Joined: Sun Feb 23, 2014 4:10 pm
- Has thanked: 4 times
- Been thanked: 3 times
Re: decompress xbb file from "Harvest Moon A new Beginning 3
Could you upload the source, too? want to see how this works :3ekanspt wrote:Can you post here the AvatarBodyData file?
You do not have the required permissions to view the files attached to this post.