Code: Select all
struct TEST
{
uint NumFiles;
struct FILES
{
BigEndian ();
uint Offset;
if (Offset < FileSize())
{
Printf ("Valid Of: %d\n", Offset);
}
uint Size;
uint unk;
uint unk2;
} files[NumFiles] <optimize=false>;
} test <optimize=false>;
Code: Select all
Get NUM_FILES long
print "%NUM_FILES%"
Endian Big
For I = 0 < NUM_FILES
# File info
Get OFFSET long
#Get SIZE long
GET S1 BYTE
GET S2 BYTE
GET S3 BYTE
GET S4 BYTE
#Get Size Long
print "%S1% %S2% %S3% %S4%"
Set Size = S1
Math S2 <<= 8
Math S3 <<= 16
Math S4 <<= 24
Math Size += S3
Math Size += S2
Math Size += S1
Get UNK long
Get UNK long
print "%OFFSET% %Size%"
# Extract file
Log I OFFSET Size
Next I