There are different topics that solved two problems: how to extract PCPACK archives from Spider Man 3 and Spider Man: Web Of Shadows on PC. But there are no topics with description of how to extract XEPACK files. It's the same files but from XBOX360 game directory. Also these files got similar structure.
I got some scripts from the internet and this one is working scipt for Noesis (made by Acewell):
Code: Select all
from inc_noesis import *
def registerNoesisTypes():
handle = noesis.register("Spiderman 3 (PC)", ".PCPACK")
noesis.setHandlerExtractArc(handle, pacExtractArc)
#noesis.logPopup()
return 1
def pacExtractArc(fileName, fileLen, justChecking):
with open(fileName, "rb") as file:
bs = NoeBitStream(file.read(fileLen))
if justChecking:
return 1
bs.seek(0x54, NOESEEK_ABS)
fileCount = bs.readUInt()
tableLen = fileCount * 16
TMP = bs.tell()
myString = bs.readBytes(4500)
myIndex = myString.find(b"\xA1\xA1\xA1\xA1")
bs.seek((TMP + myIndex) - tableLen, NOESEEK_ABS)
for i in range(fileCount):
basename = bs.readUInt()
extension = bs.readUInt()
offset = bs.readUInt()
size = bs.readUInt()
TMP2 = bs.tell()
fileName = hex(basename) + "." + hex(extension)
fileName = fileName.replace("0x", "")
bs.seek(offset, NOESEEK_ABS)
rapi.exportArchiveFile(fileName, bs.readBytes(size))
bs.seek(TMP2, NOESEEK_ABS)
return 1
Code: Select all
Traceback (most recent call last):
File "C:\Users\terno_000\Desktop\TOOLS\Noesis\plugins\python\extract_Spiderman3_XEPACK.py", line 30, in pacExtractArc
bs.seek(offset, NOESEEK_ABS)
File "C:\Users\terno_000\Desktop\TOOLS\Noesis\plugins\python\inc_noesis.py", line 152, in seek
self.toUnpacker(); r = noeSuper(self).seek(addr, isRelative); self.fromUnpacker(); return r
File "C:\Users\terno_000\Desktop\TOOLS\Noesis\plugins\python\inc_noesis.py", line 148, in fromUnpacker
self.setOffset(self.byteOfs)
File "C:\Users\terno_000\Desktop\TOOLS\Noesis\plugins\python\inc_noesis.py", line 77, in setOffset
noesis.bsSetOfs(self.h, ofs)
OverflowError: Python int too large to convert to C long
Detected file type: Unknown
Nothing was exported!
Cleaned 22.82MB (in 2 pools).
Code: Select all
myString = bs.readBytes(4500)
p.s. there are samples of the same files in different formats (*PCPACK and *XEPACK)
https://mega.nz/folder/pUF01JjZ#yJKvR3S45Qk1yB3X4Hkg5A