Code:
# The Legend of Korra *.DAT
# Written By Anex For QuickBMS
idstring "DAT\x00"
get FCOUNT long
xmath CHECK "FCOUNT - 0x1"
get HEADERSIZE long
get FOLDNAMPOINTER long
get FNAMEPOINTER long
goto HEADERSIZE
savepos OFFTABLE
goto FNAMEPOINTER
get FNSIZE long
savepos FNAMETB
for i = 0 < FCOUNT
getdstring NAME FNSIZE
savepos FNAMETB
goto OFFTABLE
if i == CHECK
get OFFSET long
goto OFFSET
goto 0 0 SEEKEND
savepos OFF2
xmath SIZE "OFF2 - OFFSET"
else
get OFFSET long
get OFF2 long
xmath SIZE "OFF2 - OFFSET"
math OFFTABLE + 0x4
endif
log NAME OFFSET SIZE
goto FNAMETB
next i
You can't just take the KYP script and change the first value to "DAT\x00". This archive is a completely different format than the KYP test archive.