Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Arcana Heart 3 LOVE MAX, PAC files

Featured Replies

  • Author
  • Localization

aluigi, posted Thu Oct 01, 2015 9:51 pm (7879)


That file you provided seems all encrypted.

P.S. there was no need to paste the script in the post :)
  • Author
  • Localization

Savage, posted Thu Oct 01, 2015 11:55 pm (7881)


aluigi wrote:
That file you provided seems all encrypted.

All the pac files are like the example

aluigi wrote:
P.S. there was no need to paste the script in the post :)

Oki doki
  • Author
  • Localization

Ekey, posted Fri Oct 02, 2015 1:06 am (7884)


Encryption: Hash mt19937 (Mersenne Twister) Xor. It works like this:

1) Extract file name from full path
2) Convert file name to uppercase
3) Create hash from file name (simple algorithm > see below)

Code:
   unsigned int dwSeed = 137;
   unsigned int dwHash = 0;
   for(int i = 0; i    {
      dwHash = (dwHash * dwSeed) (*iFileName);
   }


4) Initialize mt from hash
5) Decrypt data (simple algorithm > see below)

Code:
   fseek(fi, 0, SEEK_END);
   size_t dwSize = ftell(fi);
   fseek(fi, 0, SEEK_SET);
   
   ;malloc, read, etc.
   
   mt_init_genrand(dwHash);
   do
      *(DWORD *)(pBuffer 4 * i ) ^= mt_genrand_int32();
   while (i

Easy :)
  • Author
  • Localization

aluigi, posted Fri Oct 02, 2015 2:41 am (7886)


I have made a script that can be reused all the times that it's used mersenne twist:
http://aluigi.org/bms/arcana_heart_3.bms

I have also verified the generated values of mt_genrand_int32 with both the script and the C file and they are correct.
The decrypted file is ok but I don't know if it's a mistake that the archived filenames look "strange".
  • Author
  • Localization

Ekey, posted Fri Oct 02, 2015 10:18 am (7893)


Hm... Yes something wrong. First DWORD after decrypt must be 0x46504143 (FPAC)
  • Author
  • Localization

aluigi, posted Fri Oct 02, 2015 10:34 am (7894)


Maybe there constants at the end of mt_genrand_int32 are custom? 0x9d2c5680 and 0xefc60000
The script is 1:1 with the C function, so there are no other ideas.
Have you verified everything with a C tool or that's just the result of the debug analysis?
  • Author
  • Localization

Ekey, posted Fri Oct 02, 2015 10:42 am (7895)


Nope, it's my fault. Here correct one.

Code:
set XSEED "0x43415046"
for i = 0 < SIZE
    callfunction mt_genrand_int32 1
    get TMP long
    math TMP ^ y
    math XSEED ^ TMP
    put XSEED long MEMORY_FILE
next i
  • Author
  • Localization

aluigi, posted Fri Oct 02, 2015 10:47 am (7896)


Well done. Script updated to version 0.1.1 :)
  • Author
  • Localization

Savage, posted Sat Oct 03, 2015 11:16 am (7920)


Amazing!!, works great :D

Thanks!!
  • Author
  • Localization

Mysticus, posted Fri Apr 30, 2021 7:53 am (63663)


I know this topic is now 5 years old.
But it looks like they made a new way to crypt .pac files from the latest update called SIXSTARS!!!!!! XTEND.
All I get is this linked below.
I uncrypted with the AH3 decryption .bms file, but the result is the same.
Any update for the script?
  • Author
  • Localization

aluigi, posted Wed May 12, 2021 10:38 am (63928)


PAC is still encrypted (maybe it uses a different method/key) while PK3 looks like just data without any index.
  • Author
  • Localization

Mysticus, posted Wed May 12, 2021 2:13 pm (63945)


aluigi wrote:
PAC is still encrypted (maybe it uses a different method/key) while PK3 looks like just data without any index.

Do you plan to update your script to match these different encryption?
  • Author
  • Localization

aluigi, posted Wed May 12, 2021 3:31 pm (63949)


Give me the new encryption scheme and key and I will do it.
Obviously I can't guess them from nowhere.
  • Author
  • Localization

Ekey, posted Thu May 13, 2021 2:29 pm (64005)


Unfortunately, I do not have this game, so I can't help you too.

@Mysticus
Edited: I checked the script and it works fine with files from SIXSTARS!!!!!! XTEND. File you provided has the wrong name > https://steamdb.info/depot/661991/
Correct path and filename is >

Code:
SteamData/data/ahdata/act/chara/chara_split_00.pac


So, filename must be chara_split_00.pac instead chara_split_00_unpacked.pac

Therefore, the file can't be decrypted, because generated hash from filename is invalid. I renamed chara_split_00_unpacked.pac to chara_split_00.pac and it was perfectly decrypted.

If you want to decrypt files from this game then don't rename them ;)
  • Author
  • Localization

Mysticus, posted Fri May 14, 2021 6:37 pm (64046)


@Ekey
I tried with the correct path and file name. But I still get "unpacked" file name.
What can I do?
  • Author
  • Localization

PurpleFlow , posted Tue Jul 06, 2021 12:17 am (65061)


Hello, I just started decrypting one of the game files and ran into a problem.
Code:
SteamData\data\ahdata\sound\bgm\bgm01_op03.pac

I try using the script on the file in this location but the program decrypts the file as a pac file instead turning into an audio file. Am I doing something wrong or is it supposed to return as a pac file?
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.