=========================================== "RCDATA" structures inside Delphi BPL files =========================================== RCDATA\DESCRIPTION resource (Delphi 2007) --------------------------- 0x0 wideStr Description with 2 zero terminations RCDATA\PACKAGEINFO resource (Delphi 2007; see TPackageInfoHeader in SysUtils.pas) --------------------------- 0x0 int32 Flags Bit 0/LSB : ImplicitBuild (1=Enabled) Bit 1..2 : Build: 0=Both, 1=DesignTimeOnly, 2=RuntimeOnly, 3=Undefined Bit 3 : Duplicate unit check (1=Disable, 0=Enable) Bit 4..25 : Reserved Bit 26..27 : Producer: 0=pre-V4, 1=undefined, 2=C++, 3=Pascal Bit 28..29 : Consumer: 0=compat, 1=Delphi, 2=BCB, 3=Undefined Bit 30..31 : 0=EXE, 1=PackageDLL, 2=LibraryDLL, 3=Undefined 0x4 int32 number of entries in "require" section ... [RequireEntries] ... int32 number of entries in "contains" section ... [ContainsEntries] ... szAnsiStr Packagename, without version suffix ... int8? reserved? (is 00) ... int8? reserved? (is 00) Each [RequireEntries]: (TPkgName) int8 Hashcode szAnsiStr Unit name including ".bpl" Each [ContainsEntries]: (TUnitName) int8 Flags Bit 0/LSB : main unit Bit 1 : package unit (dpk source) Bit 2 : $WEAKPACKAGEUNIT unit Bit 3 : original containment of $WEAKPACKAGEUNIT (package into which it was compiled) Bit 4 : implicitly imported Bit 5..7 : reserved int8 Hashcode szAnsiStr Unit name without file extension For the hash codes, please see the function HashName() inside SysUtils.pas RCDATA\PACKAGEOPTIONS resource (Delphi 2007) ------------------------------ 0x1 uint8 Align (01, 02, 04, 08) 0x2 bool8 BoolEval 0x3 bool8 Assertions 0x4 bool8 Debuginfo Older versions: 0x00=off 0x01=on Newer versions: 0x00=off 0x01=limited 0x02=on 0x5 bool8 ??? 0x6 bool8 ??? 0x7 bool8 ImportedData 0x8 bool8 LongStrings 0x9 bool8 IoChecks 0xA bool8 WriteableConst 0xB bool8 ??? 0xC bool8 LocalSymbols 0xD uint8 Rtti Flags Bit 0/LSB : TypeInfo (1/0) Bit 1 : MethodInfo (1/0) Bit 2..7 : Unused? 0xE bool8 ??? 0xF bool8 Optimization 0x10 bool8 OpenStrings 0x11 bool8 OverflowChecks 0x12 bool8 RangeChecks 0x13 bool8 ??? 0x14 bool8 TypedAddress 0x15 bool8 SafeDivide 0x16 bool8 VarStringChecks 0x17 bool8 StackFrames 0x18 bool8 ExtendedSyntax 0x19 uint8 ReferenceInfo (02=on, 01=only definitions, 00=off) 0x1A uint8 MinEnumSize (1, 2, 4) 0x1B uint8 With TD32 debug info (00=off, 0A=on) 0x1C..0x2B ??? 0x2C uint8 Length of defines string ... AnsiChar[] Defines string ... uint8 Length of unit aliases string ... AnsiChar[] Unit aliases ... uint8 Length of description string ... AnsiChar[] Description String ... int8? reserved? (is 00) ... int8? reserved? (is 00) ... int8? reserved? (is 00) RCDATA\BORLAND_SIG (Checks if package comes from Borland; important for Turbo Delphi Explorer which forbids 3rd party components) ------------------ 0x0 int32? Always 6A 00 00 00 ? 0x4 szWideString Packagename including ".bpl" ... szWideString Version ... byte[] Signature data filled until resource has a size of 178 (0xB2) bytes It appears to be encrypted with RSA1. The public key seems to be in coreide.bpl as RCDATA\BORLAND_PUBLIC_KEY RCDATA\PLATFORMTARGETS ---------------------- 0x0 int16? 30 00 = Windows ??? Options not found in the resources: - ImageBase - Codepage - with debug DCUs - Generate XML documentation - Namespace prefixes - Default namespace - Map file - Build with ext. debug symbols - REALCOMPATIBILITY - Steuerung des Code-Inlining {$POINTERMATH ON} {$REALCOMPATIBILITY ON} {$STRONGLINKTYPES ON} {$SCOPEDENUMS ON} {$WEAKPACKAGEUNIT ON} {$WEAKLINKRTTI ON} {$ZEROBASEDSTRINGS ON} {$OLDTYPELAYOUT ON} {$LEGACYIFEND ON} {$HIGHCHARUNICODE ON} {$CODEALIGN 16} {$TYPEINFO ON} {$METHODINFO ON} {$EXTENDEDCOMPATIBILITY ON} {$ObjExportAll ON} TODO: check if these compiler directives change something in PACKAGEOPTIONS ! Anwendungstyp (Delphi) {$APPTYPE} Erweiterung für ausführbare Dateien (Delphi) {$E},{$EXTENSION} Steuerung der Gleitkommagenauigkeit (Delphi für x64) {$EXCESSPRECISION} Speicherreservierung (Delphi) {$M},{$MINSTACKSIZE},{$MAXSTACKSIZE} OBJTYPENAME-Direktive (Delphi) {$OBJTYPENAME typeIdent ['{B|N}typeNameInObj']} PE (Portable Executable) Header-Flags (Delphi) {$SetPEFlags},{$SetPEOptFlags} PE (Portable Executable) Header-Betriebssystem-Version {$SETPEOSVERSION} PE (Portable Executable) Header-Subsystem-Version {$SETPESUBSYSVERSION} PE (Portable Executable) Header-Benutzer-Version {$SETPEUSERVERSION} Symboldeklarationen und Querverweise (Delphi) {$Y},{$REFERENCEINFO},{DEFINITIONINFO} {$DENYPACKAGEUNIT ON}