I'm an old time gamer want to extract card image in thanos cardgames.
website: https://thanoscardgames.jimdofree.com/
download storage: https://sabercathost.com/folder/1939/thanoscardgames
Games are non-solitaire games (against CPU AI), all freeware, written in VB6 and actually released in 2003, only modified slightly in 2016.
One downloaded just open *.cab file, for modern system you just need the main .exe and its *.pak file
The executable upon started without presence of pak file, seems to try find resources files manually under .\res\[resource type]\*.* directory. So I think game might be able run without pak file (extracted mode).
The pack file has 16 bytes header started with "PACK" (not quake), then TOC size, then number of files (toc size / 64) and after that is 64bytes file structure:
filename (ansi) max 56 chars, padded with space hex(20), immediately followed by 4bytes (little endian) offset, and finally immediately follewed by 4bytes (little endian) size. The content itself altered by hex(+1).
Please help!!
EDIT:
my quickbms is version 0.5.31a (when it was just 6mb)
Request quickbms script for thanos cardgames
-
- Posts: 165
- Joined: Wed Jun 01, 2016 5:53 pm
Re: Request quickbms script for thanos cardgames
Code: Select all
####################################
get FILENAME basename
idstring "PACK"
get HEADERSIZE long
get TOCSIZE long
get FILES long
for i = 0 < FILES
getDString NAME 0x38
get OFFSET long
math OFFSET + 1
get SIZE long
string NAME p= "%s/%s" FILENAME NAME
log NAME OFFSET SIZE
next i
-
- Posts: 4
- Joined: Sat Jul 16, 2022 2:20 am
Re: Request quickbms script for thanos cardgames
h3x3r wrote:Code: Select all
####################################
get FILENAME basename
idstring "PACK"
get HEADERSIZE long
get TOCSIZE long
get FILES long
for i = 0 < FILES
getDString NAME 0x38
get OFFSET long
math OFFSET + 1
get SIZE long
string NAME p= "%s/%s" FILENAME NAME
log NAME OFFSET SIZE
next i
thanks, i didn't meant math OFFSET + 1, rather some content (e.g spades.rar) has content "encrypted" by add each byte with +1 eg. RIFF -> SJGG, i think its FileRot 0x01?. Some however do not.
-
- Posts: 4
- Joined: Sat Jul 16, 2022 2:20 am
Re: Request quickbms script for thanos cardgames
i got it, for ecrypted pak, it is
####################################
get FILENAME basename
idstring "PACK"
get HEADERSIZE long
get TOCSIZE long
get FILES long
for i = 0 < FILES
getDString NAME 0x38
get OFFSET long
get SIZE long
FileRot -1
string NAME p= "%s/%s" FILENAME NAME
log NAME OFFSET SIZE
FileRot ""
next i
####################################
get FILENAME basename
idstring "PACK"
get HEADERSIZE long
get TOCSIZE long
get FILES long
for i = 0 < FILES
getDString NAME 0x38
get OFFSET long
get SIZE long
FileRot -1
string NAME p= "%s/%s" FILENAME NAME
log NAME OFFSET SIZE
FileRot ""
next i
-
- Posts: 4
- Joined: Sat Jul 16, 2022 2:20 am
Re: Request quickbms script for thanos cardgames
Okay just extra info, I have successfully convert the game to run in "extracted mode"
extract res*.pak into this path format: res\[first substring "_" of NAME]\[remaining of NAME]
however in encrypted pak, NAME has prefix X (Xitmaps instead of bitmaps) so they has to be fixed first
chop off the content part of res*.pak so it only contain header and toc
convert *.jpg to *.bmp
atttrib all files under res\ to read only, so they dont get deleted once game quit
now the game will use files under res\ directory.
extract res*.pak into this path format: res\[first substring "_" of NAME]\[remaining of NAME]
however in encrypted pak, NAME has prefix X (Xitmaps instead of bitmaps) so they has to be fixed first
chop off the content part of res*.pak so it only contain header and toc
convert *.jpg to *.bmp
atttrib all files under res\ to read only, so they dont get deleted once game quit
now the game will use files under res\ directory.
-
- Posts: 165
- Joined: Wed Jun 01, 2016 5:53 pm
Re: Request quickbms script for thanos cardgames
nubitol wrote:thanks, i didn't meant math OFFSET + 1, rather some content (e.g spades.rar) has content "encrypted" by add each byte with +1 eg. RIFF -> SJGG, i think its FileRot 0x01?. Some however do not.
It's not related to what you said before. This is how it works. Don't know why offsets are 1 byte before actuall file strat.