⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dcu32.rfi

📁 反汇编delphi的.dcu文件至汇编代码的工具的所有源代码, 用delphi/pascal实现, 反向工程borland delphi写的程序必备
💻 RFI
字号:
/*
This file describes the results of reverse engineering the DCU file format for
Delphi 2.0-8.0, 2005(.net and WIN32), 2006(WIN32 only), Kylix 1.0-3.0.
Note, that the FlexT file describes only the DCU memory layout aspects of file
format. The Pascal code for parsing DCUs (DCU32INT project) is published at
http://hmelnov.icc.ru/DCU/
*/

data
  0x0000 ulong Magic

%$IF Magic=0xF21F148C;
//Kylix1.0
const
  Ver=100;
descr ('Borland Kylix 1.0 unit file.')
%$ELSIF Magic=0x0E1011DD;
//Kylix2.0
const
  Ver=101;
descr ('Borland Kylix 2.0 unit file.')
%$ELSIF Magic=0x0E0001DD;
//Kylix2.0, another magic
const
  Ver=101;
descr ('Borland Kylix 2.0 unit file (kind $00).')
%$ELSIF (Magic=0x0F1001DD)or(Magic=0x0F0001DD);
//Kylix3.0
const
  Ver=102;
descr ('Borland Kylix 3.0 unit file.')

%$ELSIF Magic=0x12000023;
//Delphi10.0 - not completely tested yet
const
  Ver=10;
descr ('Borland Delphi 2006 unit file.')
%$ELSIF Magic=0x11000239;
//Delphi9.0
const
  Ver=9;
  MSIL=1;
descr ('Borland Delphi 2005 MSIL unit file.')
%$ELSIF (Magic=0x1100000D)or(Magic=0x11800009); //0x11800009 in DUnitMainForm.dcu
//Delphi9.0 - not completely tested yet
const
  Ver=9;
descr ('Borland Delphi 2005 unit file.')
%$ELSIF Magic=0x10000229;
//Delphi8.0 - not completely tested yet
const
  Ver=8;
  MSIL=1;
descr ('Borland Delphi 8.0 MSIL unit file.')
%$ELSIF Magic and 0xFF80FFFF=0xFF0000DF;
//Delphi7.0 - not completely tested yet
const
  Ver=7;
descr ('Borland Delphi 7.0 (Free) unit file.')
%$ELSIF Magic and 0xFF00FFFF=0x0F0000DF;
//Delphi7.0
const
  Ver=7;
descr ('Borland Delphi 7.0 unit file.')
%$ELSIF Magic and 0xFF80FFFF=0x0E0000DD;
//Delphi6.0
const
  Ver=6;
descr ('Borland Delphi 6.0 unit file.')
%$ELSIF Magic and 0xFF80FFFF=0x0E8000DD;
//Delphi6.0, another magic
const
  Ver=6;
descr ('Borland Delphi 6.0 unit file (kind $80).')
%$ELSIF Magic=0xF21F148B;
//Delphi5.0
const
  Ver=5;
descr ('Borland Delphi 5.0 unit file.')
%$ELSIF Magic=0x4768A6D8;
//Delphi4.0
const
  Ver=4;
descr ('Borland Delphi 4.0 unit file.')
%$ELSIF Magic=0x44518641; //'A哘D'
//Delphi3.0
const
  Ver=3;
descr ('Borland Delphi 3.0 unit file.')
%$ELSIF Magic=0x50505348; //HSPP
//Delphi2.0
const
  Ver=2;
descr ('Borland Delphi 2.0 unit file.')
%$ELSE
assert 0; //fail
%$END

%$IF not defined MSIL;
const
MSIL=0;
%$END

%$IF not defined Packaged;
const
Packaged=0;
%$END



descr (NL,
  'Info Src: Partially reconstructed by me (Alexei Hmelnov (mailto:alex@icc.ru)).',NL,
  'Info Src: DoDi''s DCU Documentation (mailto:VBDis@aol.com)',NL)

const
  IsKylix = Ver>=100;
  IsDelphi = Ver<100;
  gen7 = (Ver>=7) and IsDelphi or (Ver>=102);

type

TDCU30RecTag enum char (
  drStop=0,
  drStop_a='a', //Last Tag in all files
  drStop1='c',
  drUnit='d',
  drUnit1='e', //in implementation
  drImpType='f',
  drImpVal='g',
  drDLL='h',
  drExport='i',
  drEmbeddedProcStart='j',
  drEmbeddedProcEnd='k',
  drCBlock='l',
  drFixUp='m',
  drImpTypeDef='n', //import of type definition by "A = type B"
%$IF (Ver>=8)and IsDelphi;
  drORec='o', //goes before drCBlock
 %$IF (Ver>=10)and IsDelphi;
  drStrConstRec='6',
 %$ELSE
  drStrConstRec='5',
 %$END
%$END
  drSrc='p',
  drObj='q',
  drRes='r',
  drAsm='s', //Observed in D5
  drStop2='

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -