Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- RSO FILE HEADER:
- - Size: 0x58 (88 bytes)
- //--------------------- HEADER ---------------------//
- file = getFile;
- file.seek(pos);
- /*0x00 (uint32)*/ identifier = file.readUint32();
- /*0x04 (uint32)*/ unknown0x04 = file.readUint32();
- /*0x08 (uint32)*/ sectionCount = file.readUint32();
- /*0x0C (uint32)*/ sectionInfoOffset= file.readUint32();
- /*0x10 (uint32)*/ nameOffset = file.readUint32();
- /*0x14 (uint32)*/ nameSize = file.readUint32();
- /*0x18 (uint32)*/ version = file.readUint32();
- /*0x1C (uint32)*/ unknown0x1C = file.readUint32();
- //--- Line 0x20 could be empty
- /*0x20 (bool) */ prologSection = file.readUint8();
- /*0x21 (bool) */ epilogSection = file.readUint8();
- /*0x22 (bool) */ unresolvedSection= file.readUint8();
- /*0x23 (bool) */ bssSection = file.readUint8();
- /*0x24 (uint32)*/ prologOffset = file.readUint32();
- /*0x28 (uint32)*/ epilogOffset = file.readUint32();
- /*0x2C (uint32)*/ unresolvedOffset = file.readUint32();
- //--- Internals/Externals relocation table (irt/ert)
- /*0x30 (uint32)*/ irtOffset = file.readUint32();
- /*0x34 (uint32)*/ irtSize = file.readUint32();
- /*0x38 (uint32)*/ ertOffset = file.readUint32();
- /*0x3C (uint32)*/ ertSize = file.readUint32();
- /*0x40 (uint32)*/ exportsOffset = file.readUint32();
- /*0x44 (uint32)*/ exportsSize = file.readUint32();
- /*0x48 (uint32)*/ exportsName = file.readUint32(); // I don't find the correct name order :v/
- /*0x4C (uint32)*/ importsOffset = file.readUint32();
- /*0x50 (uint32)*/ importsSize = file.readUint32();
- /*0x54 (uint32)*/ importsName = file.readUint32();
- //--- Sections x(sectionCount)
- /*0x58 (uint32)*/ unknown0x58 = file.readUint32();
- /*0x5C (uint32)*/ unknown0x5C = file.readUint32();
- //--- Data (= sections)
- // Assembly (block01)
- /*0x60 (uint32)*/ block01Offset = file.readUint32();
- /*0x64 (uint32)*/ block01Size = file.readUint32();
- // Constructors (block02)
- /*0x68 (uint32)*/ block02Offset = file.readUint32();
- /*0x6C (uint32)*/ block02Size = file.readUint32();
- // Destructors (block03)
- /*0x70 (uint32)*/ block03Offset = file.readUint32();
- /*0x74 (uint32)*/ block03Size = file.readUint32();
- // Constants (block04)
- /*0x78 (uint32)*/ block04Offset = file.readUint32();
- /*0x7C (uint32)*/ block04Size = file.readUint32();
- // Objects (block05)
- /*0x80 (uint32)*/ block05Offset = file.readUint32();
- /*0x84 (uint32)*/ block05Size = file.readUint32();
- // Bss (block06)
- /*0x88 (uint32)*/ block06Offset = file.readUint32();
- /*0x8C (uint32)*/ block06Size = file.readUint32();
- (... until sectionCount)
- //--------------------- SECTION INFO TABLE ---------------------//
- The section info table comprises of sectionCount entries each 0x8 bytes long, of the following form:
- 0x0 4 offset: Location in file of the section information. The last bit determines if this section is executable or not. If this is zero, the section is an uninitialized section.
- 0x4 4 length: Length in bytes of the section.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement