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.

[SML] Carnival

Featured Replies

  • Author
  • Localization

dareka, posted Tue Dec 11, 2018 5:47 am (41249)


I'd like to have a bms script for Carnival by S.M.L.
There actually is a dumper already, but I can't get the repacker to work, so if I had a bms script I wouldn't have any problem.

Here you have some example archives: https://ufile.io/ihh47
  • Author
  • Localization

dareka, posted Tue Dec 11, 2018 11:11 am (41262)


Uhm, there must be something wrong in the code.
On the left the file extracted with quickbms and on the right the file extracted with the tool I add
[spoiler]Image[/spoiler]

And the script can't extract images.
  • Author
  • Localization

aluigi, posted Tue Dec 11, 2018 4:32 pm (41270)


I updated the script 5 minutes after my post so I guess you downloaded the first version :)
Redownload it to get the correct script.
  • Author
  • Localization

dareka, posted Tue Dec 11, 2018 10:36 pm (41288)


aluigi wrote:
I updated the script 5 minutes after my post so I guess you downloaded the first version :)
Redownload it to get the correct script.

The new script works great for the images, but the script files are still extracted with gibberish in them.
I'm not a programmer, so I don't know what's the issue, but in the file that seems to be the source code of the other tool I have there's this interesting part about the header

Code:
typedef struct _HEADER
{
   char signature[0x2B];
   unsigned char xormask;
   unsigned int filecount;
   unsigned int indexoffset;
} HEADER;

I don't know what this "0x2B" is, but it's not present in your script.

I put the file on Pastebin, if you want to see it.
  • Author
  • Localization

aluigi, posted Wed Dec 12, 2018 8:09 am (41297)


Here all the files from script.pd are perfect and perfectly readable.

Example:
Code:
IF $KAISOU == 0 JMP NOT_KAISOU_CVA501
JMP SN_CVA501_00
:NOT_KAISOU_CVA501


TS 0
TWS 0
TS 3





?????????????????????????????????????
...
  • Author
  • Localization

dareka, posted Thu Dec 13, 2018 2:44 pm (41359)


I swear, yesterday it didn't work. I had my language settings for non-unicode set to Japanese, I switched them back to the original settings and the tool worked. Now I set it to Japanese again and it still works. I have no idea why :lol:

Anyway, if I use the normal reimport method it works, but if I use the reimport2 (even with unedited files) the game crashes. What's really strange is the fact that if I use reimport2 with unedited files I get a new archive with the same byte count as the original (~1MB), but if later I use this new archive as a base for reimport1 I get a 690MB archive starting from a 1MB archive. lol
I got that there should be some problem with the TOC or whatever. What baffles me is the fact that starting from a 1MB archive I get a 690MB archive using the 1:1 reimport method. :shock:
  • Author
  • Localization

aluigi, posted Thu Dec 13, 2018 3:11 pm (41362)


What you have found is a bug in reimport2 or, to be more exact, an incompatibility in the "filexor" instruction in reimport2 mode (not exactly a bug).

Basically only the files are obfuscated while the information are in clear-text.
In script.pd the files are obfuscated so we:
- read the information
- activate the filexor obfuscation
- dump the file
- change the original offset/size/zsize fields
- disable the filexor obfuscation

The problem is that when we edit the fields we have the obfuscation activated and our new fields will be corrupted.

I have rewritten the script for supporting the reimport mode, version 0.1.2.
I opted for checking if "PackPlus" is specified because I'm quite sure that the encryption is not based on the extension of the files.

Regarding filexor and reimport2... I will think about it, if it's something that must be fixed or doesn't matter :)
  • Author
  • Localization

dareka, posted Thu Dec 13, 2018 5:13 pm (41367)


Wow, now it works. Thank you.
It works for edited images too.
However the extracted sound files won't open. But maybe they have some special codec or something. But I don't really care, so nevermind.
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.