Snakes 3D. Extracting .txt and .adp from .dat

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Chelovek
Posts: 5
Joined: Sun Jul 02, 2017 4:54 pm

Snakes 3D. Extracting .txt and .adp from .dat

Post by Chelovek »

Hello. I successfully decompressed .PAK file to .dat by offzip (zlib extract) and now I have a question. How can I extract .adp (it is samples) and .txt (sequence and bank) from this raw data file? The system of this raw .dat file looks like it script+files in one data. I tried to do many scripts, but it didn't help.
The game is Snakes 3D for Symbian
Last edited by Chelovek on Sun May 06, 2018 7:38 am, edited 1 time in total.
Anexenaumoon
Posts: 119
Joined: Sun Dec 27, 2015 10:22 pm

Re: Snakes 3D. Extracting .txt and .adp from .dat

Post by Anexenaumoon »

Code: Select all

# Snakes 3D *.dat

get NULL long
savepos CUR_OFF
get FNAMETB long
goto 4
xmath FCOUNT "(FNAMETB-0x4)/0x20"

for i = 0 < FCOUNT
   goto CUR_OFF
   get FNOFF long
   get NULL long
   get SIZE long
   get OFFSET long
   getdstring NULL 0x10
   savepos CUR_OFF
   goto FNOFF
   get NAME string
   log NAME OFFSET SIZE
next i


There was no way to really determine the amount of files, but I'd assume that the *.dat's have the same entry size of 0x20. I skipped over the zeroes and two longs, as I don't know what those do either.
Acewell
Posts: 706
Joined: Fri Aug 08, 2014 1:06 am

Re: Snakes 3D. Extracting .txt and .adp from .dat

Post by Acewell »

Code: Select all

# script for QuickBMS http://quickbms.aluigi.org

for i = 0
   get STRING_SIZE long
   get STRING_OFFSET long
   get ZERO long
   get SIZE long
   get OFFSET long
   get ZERO2 long
   get ZERO3 long
   get NEXT_FILE long
   savepos TMP
   goto STRING_OFFSET
   get NAME string
   log NAME OFFSET SIZE
   if NEXT_FILE == 0
      break
   endif
   goto TMP
next i   

:D

edit
aw Anexenaumoon beat me :P but i will leave mine here anyway :)
Chelovek
Posts: 5
Joined: Sun Jul 02, 2017 4:54 pm

Re: Snakes 3D. Extracting .txt and .adp from .dat

Post by Chelovek »

Thanks you all guys, very fast reply. It worked.