Castlevania: Lords of Shadow – Mirror of Fate HD

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
BANDIT
Posts: 22
Joined: Thu Oct 23, 2014 1:04 pm

Castlevania: Lords of Shadow – Mirror of Fate HD

Post by BANDIT »

Can someone help me to reimport the extracted files without size limit. I have found some tools but I don't know how it works.
https://github.com/batteryshark/castleva
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Castlevania: Lords of Shadow – Mirror of Fate HD

Post by aluigi »

What I can do, from my side, is removing the usage of MEMORY_FILE in UNPACK_CHUNKS and it will allow you to better reimport the file BUT these chunked files will still be limited by size.
No size limitation for the other files (those without chunks) if you use reimport2.bat

I have just updated the script to 0.2.1a with that modification, now it depends by your archive.
BANDIT
Posts: 22
Joined: Thu Oct 23, 2014 1:04 pm

Re: Castlevania: Lords of Shadow – Mirror of Fate HD

Post by BANDIT »

If you talking about this script http://aluigi.altervista.org/bms/castlevania.bms it is dont work with this game.
Here is sample file - https://www47.zippyshare.com/v/52FDRN9p/file.html
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Castlevania: Lords of Shadow – Mirror of Fate HD

Post by aluigi »

Well, the format is completely different, your first post talked about reimporting the extracted files.
http://aluigi.org/bms/castlevania_hd.bms
BANDIT
Posts: 22
Joined: Thu Oct 23, 2014 1:04 pm

Re: Castlevania: Lords of Shadow – Mirror of Fate HD

Post by BANDIT »

Dont work. Extracted files with your script much more bigger.

Code: Select all

# Castlevania: Lords of Shadow – Mirror of Fate HD (PS3) (PKG format)
#
# Written by Ekey (h4x0r)
# http://forum.xentax.com
#
# script for QuickBMS http://quickbms.aluigi.org

//endian big

get TABLESIZE long
get DATASIZE long
get FILES long

for i = 0 < FILES
getdstring NAME 1024
get OFFSET long
get SIZE long
math SIZE -= OFFSET
log NAME OFFSET SIZE
next i


This script can extract and reimport, but reimporting work only with size limit.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Castlevania: Lords of Shadow – Mirror of Fate HD

Post by aluigi »

Have you used reimport2.bat?
BANDIT
Posts: 22
Joined: Thu Oct 23, 2014 1:04 pm

Re: Castlevania: Lords of Shadow – Mirror of Fate HD

Post by BANDIT »

Yes.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Castlevania: Lords of Shadow – Mirror of Fate HD

Post by aluigi »

reimport2.bat must work for sure, do you get any error?
BANDIT
Posts: 22
Joined: Thu Oct 23, 2014 1:04 pm

Re: Castlevania: Lords of Shadow – Mirror of Fate HD

Post by BANDIT »

game dont start with new file
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Castlevania: Lords of Shadow – Mirror of Fate HD

Post by aluigi »

I suspect that the problem is caused just by that SIZE - OFFSET.

Basically reimport2 does the following operations in this order:
- set the new offset and reassign the new value to the variable
- set the new size

Since SIZE is dependent to the original OFFSET, when OFFSET changes, SIZE will be corrupted.
It's something that I can't fix in quickbms since the order is mandatory.

But it can be fixed in the script, I have just updated mine, let me know if now it works
BANDIT
Posts: 22
Joined: Thu Oct 23, 2014 1:04 pm

Re: Castlevania: Lords of Shadow – Mirror of Fate HD

Post by BANDIT »

Now extracted files with your script have the same size as with other one, but after reimport game still dont start.