PKR_DIRINFO

This commit is contained in:
krystalgamer 2024-08-18 17:50:48 +01:00
parent 6ceff55438
commit 598d1f2df2
3 changed files with 19 additions and 0 deletions

View File

@ -408,6 +408,7 @@ i32 validate(void)
validate_SBitServerEntry();
validate_PKR_FILEINFO();
validate_PKR_FOOTER();
validate_PKR_DIRINFO();
puts("[*] Validation done!");

View File

@ -114,3 +114,12 @@ void validate_PKR_FOOTER(void)
VALIDATE(PKR_FOOTER, numDirs, 0x4);
VALIDATE(PKR_FOOTER, numFiles, 0x8);
}
void validate_PKR_DIRINFO(void)
{
VALIDATE_SIZE(PKR_DIRINFO, 0x28);
VALIDATE(PKR_DIRINFO, name, 0x0);
VALIDATE(PKR_DIRINFO, field_20, 0x20);
VALIDATE(PKR_DIRINFO, numFiles, 0x24);
}

9
pkr.h
View File

@ -22,6 +22,14 @@ struct PKR_FOOTER
i32 numFiles;
};
struct PKR_DIRINFO
{
char name[0x20];
i32 field_20;
i32 numFiles;
};
EXPORT u8 fileCRCCheck(u8*, i32, u32);
EXPORT void PKR_ReportError(const char*, ...);
@ -31,5 +39,6 @@ EXPORT u8 PKR_UnlockFile(FILE** fp);
void validate_PKR_FILEINFO(void);
void validate_PKR_FOOTER(void);
void validate_PKR_DIRINFO(void);
#endif