def getFolderInfo(foi_binary): RectVec = unpack_from(">hhhh", foi_binary) Flag = unpack_from(">H", foi_binary, 8)[0] Location = unpack_from(">hh", foi_binary, 10) reserved = unpack_from(">H", foi_binary, 14)[0] vec = [ss.Rect(*RectVec), Flag, ss.Point(*Location), reserved] return ss.FolderInfo(*vec)
def getFileInfo(fii_binary): vec = list(unpack_from(">IIH", fii_binary)) Location = unpack_from(">hh", fii_binary, 10) res = unpack_from(">H", fii_binary, 14)[0] vec.extend([ss.Point(*Location), res]) return ss.FileInfo(*vec)
def getExtendedFolderInfo(efi_binary): scrPosVec = unpack_from(">hh", efi_binary) vec = list(unpack_from(">iHhi", efi_binary, 4)) vec.insert(0, ss.Point(*scrPosVec)) return ss.ExtendedFolderInfo(*vec)