Jump to content

Help - Digimon World data squad fs.bin


Recommended Posts

Posted

Hello, I have been translating the game digimon world data squad to spanish, the game is giving me problems because I can not extract its font as it is in the fs.bin file, a file with proprietary format which I could only get some images that do not serve me with foremost linux, if you have any idea how to unpack it would help me a lot, thanks in advance

Posted (edited)
        public static Byte[] iDecrypt(Byte[] lpBuffer, UInt32 dwKey = 0x6E6B7270)
        {
            UInt32 dwMagic = BitConverter.ToUInt32(lpBuffer, 0);

            if (dwMagic == 0x53524944)
            {
                UInt16 wFlag1 = BitConverter.ToUInt16(lpBuffer, 8);
                UInt16 wFlag2 = BitConverter.ToUInt16(lpBuffer, 10);

                if (wFlag1 == 1 && (wFlag2 & 1) != 0)
                {
                    UInt16 wValue1 = BitConverter.ToUInt16(lpBuffer, 12);
                    UInt16 wValue2 = BitConverter.ToUInt16(lpBuffer, 14);

                    dwKey = (UInt32)(dwKey * (wValue1 ^ wValue2));
                    UInt32 dwSize = ((BitConverter.ToUInt32(lpBuffer, 4) + 3) >> 2) - 4;
                    Boolean dwRemaning = ((BitConverter.ToUInt32(lpBuffer, 4) + 3) >> 2) == 4;

                    if (!dwRemaning)
                    {
                        for (Int32 i = 16; i < dwSize * 4 + 16; i += 4)
                        {
                            UInt32 dwData = BitConverter.ToUInt32(lpBuffer, i);
                            dwData ^= dwKey;
                            dwKey = 5 * dwKey + 1;

                            lpBuffer[i + 0] = (Byte)dwData;
                            lpBuffer[i + 1] = (Byte)(dwData >> 8);
                            lpBuffer[i + 2] = (Byte)(dwData >> 16);
                            lpBuffer[i + 3] = (Byte)(dwData >> 24);
                        }
                    }
                }
            }

            return lpBuffer;
        }

FS.DIR is encrypted, so the code above will help to decrypt it. if someone wants to check it and help to reverse structure i also attached the decrypted file. Looks like strings is flipped... some examples 

Quote

 

TOOR - must be ROOT

atad - data

retlif - filter

end etc.

 

Some correct paths

Quote

data/battle/nbox_l_g.pmd
data/battle/nbox_l_r.pmd
data/battle/nbox_r_g.pmd
data/battle/nbox_r_r.pmd
data/battle/nbox_s_g.pmd
data/battle/nbox_s_r.pmd

data/chara/a01.pmd
data/chara/a02.pmd
data/chara/a02_sv.pmd
data/chara/a03.pmd
data/chara/a04.pmd
data/chara/a05.pmd
data/chara/e01.pmd
data/chara/e02.pmd
data/chara/e03.pmd
data/chara/e04.pmd
data/chara/girl.pmd
data/chara/h01.pmd
data/chara/h01e.pmd
data/chara/h01m.pmd
data/chara/h01test.pmd
data/chara/h02.pmd
data/chara/h03.pmd
data/chara/human01.pmd
data/chara/kage.pmd
data/chara/kagec.pmd
data/chara/kaged.pmd
data/etc/agu01.pmd
data/etc/agu02.pmd
data/etc/ball.pmd
data/etc/com_all.pmd
data/etc/digi_sel.pmd
data/etc/dor01.pmd
data/etc/dust.pmd
data/etc/en00.pmd
data/etc/evo_agu.pmd
data/etc/evo_agus.pmd
data/etc/evo_char.pmd
data/etc/evo_cln.pmd
data/etc/evo_curs.pmd
data/etc/evo_dor.pmd
data/etc/evo_dors.pmd
data/etc/evo_line.pmd
data/etc/evo_map.pmd
data/etc/evo_star.pmd
data/etc/evo_vui.pmd
data/etc/evo_vuis.pmd
data/etc/evo_war.pmd

data/map/allmsp.dat
data/map/map_pre.pmd
data/map/tes_bill.pmd
data/system/TalkChar.pvb
data/system/ability.pvb
data/system/batse.pvb
data/system/bcom.pvb
data/system/btmem1.pvb
data/system/btmem2.pvb
data/system/btmem3.pvb
data/system/btmem4.pvb
data/system/btmem5.pvb
data/system/btmem6.pvb

 

FS_DECRYPTED.zip

Edited by Ekey
  • Like 2

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...