Tuesday, July 2, 2013

Desperados : Wanted Dead or Alive - TOGL Resource

Inside .res file there is 'TOGL' entry resources.
Those resources can be managed like PICC, but with few differences.

Pseudo-code

  magic_number = read(4)   
  unknow = read(4)   
  if (magic_number == 0x4C474F54):   
   a = read(4)  
   b = read(4)  
   for i in xrange(0, 5):  
     if ((1 << i) & b):  
       width = read(4)   
       height = read(4)   
       is_compressed = read(4)   
       size = read(4)   
       data = read(size)   
       if is_compressed == 1:   
         data = zlib.decompress(data)   
Data is still 16 bits image.
Few extracted images :




No comments:

Post a Comment