Wozu brauchst Du Kenntnisse über DCP-Files?
Vielleicht kannst Du mit folgenden Zeilen was anfangen...
Ein DCP-File beginnt mit MagicBytes.
Delphi-Quellcode:
Delphi Compilied
Package (vv. 2.0-8.0,2005-2010,XE1-XE7), Kylix (vv. 1.0-3.0)(DCP.rfh):
Class: Executable
and Object, Status: Guess Work, Last change: 09.02.2015 12:54:12
data
0x0000
array[4]
of Char Magic
%$
IF (Magic='
PKG4');
//Delphi3.0 package
const
Ver=4;
descr ('
Borland Delphi 3.0 package file.')
%$ELSIF (Magic='
PKG5');
//Delphi5.0 package
const
Ver=5;
descr ('
Borland Delphi 5.0 package file.')
%$ELSIF (Magic='
PKG6');
//Delphi6.0 package?
const
Ver=6;
descr ('
Borland Delphi 6.0 package file?')
%$ELSIF (Magic='
PKG7');
//Delphi6.0 7.0 package
const
Ver=7;
descr ('
Borland Delphi 6.0 or 7.0 package file.')
%$ELSIF (Magic='
PKG9');
//Delphi 2005 package
const
Ver=9;
descr ('
Borland Delphi 2005 package file.')
%$ELSIF (Magic='
PKX0');
//Delphi 2006 MSIL and later versions package
const
Ver=10;
descr ('
Borland Delphi 2006 MSIL package file.')
%$
ELSE
assert 0;
//fail
%$
END
%$
IF not defined MSIL;
const
MSIL=0;
%$
END
descr (NL,
'
Info Src: Partially reconstructed by me (Alexei Hmelnov (mailto:alex@monster.icc.ru)).',NL)
type
PUnitData ^TUnitData near=ulong
TUnitData struc
ulong Magic
ulong FileSize
raw[] at &@.Magic; Data
ends:[@:Size=@.FileSize]
TUnitInfo(NXX) struc
PUnitData pData
ulong F
ulong FT
ulong bplCode
//bplOfs0
%$
IF Ver>4;
//Not checked for D4
ulong bplBSS
//bplOfs1
%$
END
ulong bplData
%$
IF (Ver>=9)
or MSIL;
ulong X
%$
END
array[@:NXX]
of ulong XX
PChar
Name
%$
IF Ver>=9;
PChar Name1
%$
END
ends:autoname=('
unit_',@.
Name);
TUnitTbl(Cnt,NXX)
array[@:Cnt]
of TUnitInfo(@:NXX)
PUnitTbl(Cnt,NXX) ^TUnitTbl(@:Cnt,@:NXX) near=ulong
type
TDCPHdr(NXX) struc
%$
IF MSIL;
ulong X0
%$
END
long nRequires
long nContains
ulong SzContains
PUnitTbl(@.nContains,@:NXX) pContains
ulong Flags
%$
IF Ver>5;
//Not checked for D6
ulong Sz2
ulong szBplName
%$
IF MSIL;
ulong X1
ulong X2
%$
END
// array[@.szBplName+1]of Char,<0; BplName
PChar BplName
%$
IF MSIL;
PChar BplVer
%$
END
%$
ELSE
PChar BplName
word X
byte Y
%$
END
array[@.nRequires]
of PChar
Requires
ends
%$
IF (Ver>=10);
//They forgot to change the DCP signature when the format was changed in Delphi XE,
//so we have to detect the size by other means
%$
IF MSIL;
const
NXX=6;
%$ELSIF DataAt(4,TDCPHdr(5)).pContains^:Size=DataAt(4,TDCPHdr(5)).SzContains;
const
NXX=5;
%$
ELSE
const
NXX=8;
%$
END
%$
ELSE
const
NXX=0;
%$
END
data
0x0004 TDCPHdr(NXX) Hdr