import VTConstants, VTUtils import PyCmoMisc import datetime class CKGUID(): def __init__(self): self.D1: int = 0 self.D2: int = 0 def __init__(self, d1: int, d2: int): self.D1: int = d1 self.D2: int = d2 def __repr__(self): return f" tuple[int]: return ( (self.ProductBuild >> 24) & 0xff, (self.ProductBuild >> 16) & 0xff, (self.ProductBuild >> 8) & 0xff, self.ProductBuild & 0xff ) def __repr__(self) -> str: return f"""""" def __str__(self) -> str: return self.__repr__() class CKFileObject(): def __init__(self): self.Object: VTConstants.CK_ID = 0 self.CreatedObject: VTConstants.CK_ID = 0 self.ObjectCid: VTConstants.CK_CLASSID = VTConstants.CK_CLASSID(VTConstants.CK_CLASSID.CKCID_OBJECT) self.ObjPtr = None self.Name: str = None self.Data = None self.PostPackSize: int = 0 self.PrePackSize: int = 0 self.Options: VTConstants.CK_FO_OPTIONS = VTConstants.CK_FO_OPTIONS(VTConstants.CK_FO_OPTIONS.CK_FO_DEFAULT) self.FileIndex: int = 0 self.SaveFlags: VTConstants.CK_FILE_WRITEMODE = VTConstants.CK_FILE_WRITEMODE(0) def __repr__(self) -> str: return f'<{self.Name if self.Name else "[Anonymous]"}: {self.ObjectCid}>' def __str__(self) -> str: return self.__repr__() class CKFilePluginDependencies(): def __init__(self): self.m_PluginCategory: int = 0 self.m_Guids: list[CKGUID] = [] self.ValidGuids: list[bool] = [] def __repr__(self) -> str: return repr(self.m_Guids) def __str__(self) -> str: return self.__repr__() class CKFile(object): def __init__(self): self.m_SaveIDMax: int = 0 self.m_FileObjects: list[CKFileObject] = [] self.m_ManagersData = [] self.m_PluginDep: list[CKFilePluginDependencies] = [] self.m_IndexByClassId: list[list[int]] = [] self.m_IncludedFiles: list[str] = [] self.m_FileInfo: CKFileInfo = CKFileInfo() self.m_Flags: VTConstants.CK_LOAD_FLAGS = VTConstants.CK_LOAD_FLAGS(VTConstants.CK_LOAD_FLAGS.CK_LOAD_DEFAULT) self.m_FileName: str = '' self.m_Parser: VTUtils.UniversalFileReader = None self.m_ReadFileDataDone: bool = False def __repr__(self) -> str: return repr(self.m_FileInfo) def __str__(self) -> str: return self.__repr__()