# Assassin's Creed Origins/Odyssey raw data files decompressor 
# the script must be used on the files extracted from the forge archives.
# script for QuickBMS http://quickbms.aluigi.org
# Author: Zaramot 
# https://forum.xentax.com/memberlist.php?mode=viewprofile&u=32230



goto 0x462

get FileCount long
get Unk1 longlong
get Unk2 longlong

print %FileCount%

set i long 0

for i = 0 < FileCount
   get FileOffset longlong   
   get UnkData longlong       
   get FileSize long         

next i

#print %FileSize%

savepos LastRead

goto LastRead

#print %LastRead%

for i = 0 < FileCount
   goto 0x24 0 SEEK_CUR                 
   get AssetId long                    
   goto 0x18 0 SEEK_CUR                
   GetDString FName1 0x80         
   string FName1 + ".raw"           

next i

savepos LastRead2

goto LastRead2

#print %LastRead2%

#print %FName%

goto 0x476

for i = 0 < FileCount
   get FileOffset longlong   
   get UnkData longlong       
   get FileSize long     

   savepos ReadPos

   goto LastRead
   goto 0x24 0 SEEK_CUR                 
   get AssetId long                    
   goto 0x18 0 SEEK_CUR                
   GetDString FName 0x80         
   string AssetId += ("---")
   string AssetId += "FName"
   string AssetId += ".raw"
   string AssetId R= "---" "/"
  
   math LastRead + 192

   goto FileOffset
   log AssetId FileOffset FileSize   
   goto ReadPos

next i
