def decode(self, blob: Blob) -> None: self.index_1 = validate(blob.readByte(), 0x01) self.off = Resolution(validate(blob.readBytes(3), b'\x00\xFF\x4A')) self.index_2 = validate(blob.readByte(), 0x02) self.res_r = Resolution(blob.readBytes(3)) self.index_3 = validate(blob.readByte(), 0x03) self.res_g = Resolution(blob.readBytes(3)) self.index_4 = validate(blob.readByte(), 0x04) self.res_b = Resolution(blob.readBytes(3))
def decode(self, blob): self.size = validate(blob.readDword(), 0x0000001A) if self.size > 0: value = blob.readBytes(self.size).decode('utf-16le').rstrip('\0') self.versionStr = validate(value, u'V1.01.00') else: self.versionStr = '' blob.readBytes(64 - (8 + self.size))
def decode(self, blob: Blob) -> None: self.unknown_02 = validate(blob.readByte(), 0x00) self.count = validate(blob.readByte(), 0x03) # Third entry will be 0xFE if disabled self.unknown_03 = validate(blob.readWord(), 0x0000) self.entry_1 = validate(blob.readByte(), 0x05) self.entry_2 = validate(blob.readByte(), 0x06) self.entry_3 = blob.readByte() # NOTE entry_3 is repeated 15 times than followed by zeros self.padding = blob.readBytes(53)
def decode(self, blob: Blob) -> None: self.count = validate(blob.readByte(), 0x03) self.r_1 = blob.readWord() self.g_1 = blob.readWord() self.b_1 = blob.readWord() self.r_2 = blob.readWord() self.g_2 = blob.readWord() self.b_2 = blob.readWord() self.r_3 = blob.readWord() self.g_3 = blob.readWord() self.b_3 = blob.readWord()
def readHeader(self, blob: Blob) -> None: if self.mode is not None: validate(blob.readByte(), self.mode, 'Mode missmatch - expected $1, got $0') else: self.mode = blob.readByte() if self.operation is not None: validate(blob.readByte(), self.operation, 'Operation missmatch - expected $1, got $0') else: self.operation = blob.readByte() if self.index is not None: validate(blob.readByte(), self.index, 'Index missmatch - expected $1, got $0') else: self.index = blob.readByte() if self.flags is not None: validate(blob.readByte(), self.flags, 'Flags missmatch - expected $1, got $0') else: self.flags = blob.readByte()
def decode(self, blob: Blob) -> None: self.unknown_01 = validate(blob.readWord(0x00E0))
def decode(self, blob: Blob) -> None: n = 0 while n < 30: validate(blob.readWord(), 0x0000) n += 1
def decode(self, blob: Blob) -> None: validate(blob.readWord(), self.unknown_02) validate(blob.readWord(), self.unknown_03) validate(blob.readWord(), self.unknown_04) validate(blob.readWord(), self.unknown_05) validate(blob.readWord(), self.unknown_06) validate(blob.readWord(), self.unknown_07)
def decode(self, blob): self.unknown_02 = validate(blob.readWord(), 0x0004) self.unknown_03 = validate(blob.readWord(), 0x0080) self.unknown_04 = validate(blob.readWord(), 0x0100) self.unknown_05 = validate(blob.readWord(), 0x0001) self.unknown_06 = validate(blob.readWord(), 0x00E0) self.unknown_07 = validate(blob.readWord(), 0x0000) self.unknown_08 = validate(blob.readDword(), 0xEFFFFFFF) self.unknown_09 = validate(blob.readDword(), 0x00000001) self.unknown_10 = validate(blob.readDword(), 0x00000000) self.vendorId = validate(blob.readWord(), 0x2516) self.productId = validate(blob.readWord(), 0x0051) self.unknown_11 = validate(blob.readDword(), 0xFFFFFFFF) self.unknown_12 = validate(blob.readDword(), 0xFFFFFFFF) self.unknown_13 = validate(blob.readDword(), 0xFFFFFFFF) self.unknown_14 = validate(blob.readDword(), 0xFFFFFFFF) self.unknown_15 = validate(blob.readDword(), 0xFFFFFFFF) self.unknown_16 = validate(blob.readDword(), 0xFFFFFFFF) self.unknown_17 = validate(blob.readDword(), 0xFFFFFFFF) self.unknown_18 = validate(blob.readDword(), 0x001C5AA5)
def decode(self, blob): self.unknown_02 = validate(blob.readWord(), 0x0004) self.unknown_03 = validate(blob.readWord(), 0x0002)
def decode(self, blob): self.flags = validate(blob.readDword(), 0x00000004) self.unknown_01 = validate(blob.readDword(), 0x00000000) self.vendorId = validate(blob.readWord(), 0x2516) self.productId = validate(blob.readWord(), 0x0052) self.unknown_03 = validate(blob.readDword(), 0x04087000) self.unknown_04 = validate(blob.readDword(), 0xFFFFFFFF) self.unknown_05 = validate(blob.readDword(), 0x00000001) self.unknown_06 = validate(blob.readDword(), 0xFFFFFFFF) self.unknown_07 = validate(blob.readDword(), 0x000000E0) self.unknown_08 = validate(blob.readDword(), 0x00E70200) self.unknown_09 = validate(blob.readWord(), 0x0200) value = blob.readBytes(10).decode('utf-8').rstrip('\0') self.firmwareName = validate(value, 'LM0303') self.unknown_12 = validate(blob.readDword(), 0xFFFFFFFF) self.unknown_13 = validate(blob.readDword(), 0x00000000) self.unknown_14 = validate(blob.readDword(), 0x00000000)