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

📄 index.shtml

📁 SrcDecompiler is about creating a Delphi program decompiler. The program is written for Delphi 4 or
💻 SHTML
字号:
<HTML>
<HEAD><TITLE>Decompiler</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<h1><img src="decompiler.gif" width="32" height="32">Decompiler (version 0.0.2.12)</h1>
<h2>Introduction</h2>
<p>This page is about creating a Delphi decompiler on which I'm working now. The program is written
  for Delphi 4 and will not work with a previous version of Delphi. Also it can only decompile
  programs written with the same version of Delphi as the decompiler is compiled with. Here I will
  put information about what I already have and how I want to extend my program, if you have any 
  comments or what so ever pease e-mail me. </p>
<h2>What it does</h2>
<p>The previous information about porting to Delphi 5 was incorrect, it still doesn't work, because
  I first have to port the hard coded methods.</p>
<p>It gets all the classes, because these have a Self pointer in their VMT. And 
  they must all derive from TObject (more information about
  <A HREF="findingClasses.shtml">finding classes</A>).</p>
<p>It gets also get all the TypeInfos, this is the type information for all your 
  types declarations, which are used with automatic initialization/finalization 
  or passed to TypeInfo. These TypeInfos can be found, because they have a pointer 
  to them self before them, and their kind must exist (the classes are not accepted, 
  because they are already found).</p>
<p>It gets a list of all procedures (functions, methods etc.) including nested 
  procedures, but not including procedures without a direct call (the one only 
  passed as parameters). These partially get by following the calls.</p>
<p>It gets a list of (ansi/wide)strings by searching for the strings hidden fields (reference count
  (-1), length). (0.0.2.0)</p> 
<p>It gets a list of resource strings (yes there is partial resource support). (0.0.2.0)</p>
<p>It gets a list of vars and consts (consts are vars which value never changes), by just breaking
  the Data and BSS sections in parts using fixups and some auto generated vars. (0.0.2.0)</p>
<p>It puts all the information into a unit, which should be in the correct order. (0.0.2.0)</p>
<p>Complete support for published properties. (0.0.2.2)<p>
<p>Updated (26-7-1999): The list of procedure is extended with the imported procedures 
  and contains much more information about the procedures (size, imported, method 
  etc.). </p>
<p>Update (19-8-1999): There is now generated some real code which can recompiled,
  however there is no support for resources, types, strings and much more, but there is
  (limited) support for objects.</p>
<p>Update (18-9-1999): Many improvements, try decompiling a completely empty program, it
  generates a completely empty program (how amazing). Almost every thing is supported, except
  interfaces, packages, resources and thread vars. And not all the system procs are supported.</p>
<p>Vars are now kept in the original order to prevent problems with separating vars, which shouldn't be
  separator (0.0.2.2).</p>
<p>Interface properties are supported, however type casting interface will cause unpredictable
  behaviour (0.0.2.2).</p>
<p>There is now support for threadvars, only delphi removes them, because they are not directly
  accessed (0.0.2.4).</p>
<p>There is now a screen indication that the program is running and makes is possible to cancel it (0.0.2.6).</p>
<p>DFMs are also dumped now. (0.0.2.8)</p>
<p>Some bug fixes concerning DFMs. (0.0.2.9)</p>
<p>Packages are now supported, there are still some problems with the code generated form packages,
  but a least if published a lot of information about the package. (0.0.2.12)</p>
<h2>What will come</h2>
<p>I don't for see any problems with adding resources. Adding interface and package support
  is much more complex, but with enough time it shouldn't be impossible.</p>
<p>I'm now focussing on the problem of adding package support.</P>
<h2>Compiling the decompiler</h2>
<p>The program will display additional message when DebugInformation is enabled. If you define the 
   conditional definition <I>DebugView</I>, the program won't generate output files, but will
   display a form with information about the exe.</p> 
<h2>Problems with decompiling</h2>
<p>First of all the program isn't very fast, there is now (version 0.0.2.6) some screen that indicates
   that the program is running, there is also a button that cancels the decompilation, but that doesn't 
   respond very fast. Also there isn't an indicator for how far the decompilation process is.</p>
<p>Since it can decompile vcl40.bpl (It doesn't throw an exception), It is highly unlikly that
   you get an exception due to some vcl code.
<p>Unless the code makes use of some exotic code (like obj files), there shouldn't be any problem 
   decompiling the program, recompiling it again has some more problems, because the program will
   almost always include interface, resources, thread vars, constructors and/or destructors.<p>
<hr>
<address> <a href="http://thunder.prohosting.com/~pytho/index.shtml" target="_top"><img src="pythonMini.gif" width=20 height=20 border=0></a>Python<br>
E-mail: <a href="MAILTO:python@softhome.net">python@softhome.net</a> </address>
<HR>
Copyright &copy; 1999, 2000 Python. All rights reserved
</BODY>
</HTML>

⌨️ 快捷键说明

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