J++Extract 1.0

Copyright  2000 Olivier Mengu
dolmen@bigfoot.com
http://www.multimania.com/dolmen/


This program extracts class and resources from a Java program compiled with
Microsoft Visual J++ into a .exe file for Windows.

The following files are extracted :
- class files (*.class)
- resources files (*.gif, *.bmp, *.resources and others)
- icon of the application

A batch file is created. You can immedialtely run it : it will launch the
application from the extracted class files and it will run exactly as the
original. You don't need the original executable anymore.

A .J++ file is generated that could be used as a map to rebuild the executable,
but there is actually no tool do do that. I don't plan to do one, so
don't ask me.
I've not tried with Visual J++ as I don't have it.


This program has been tested on only 2 targets programmed by the same authors,
so if you find bugs, send me your targets and I will improve the tool.


I've done this tool to patch a program. Once the class files are extracted, you
only have to decompile the class you are interested in (see Jad), modify it,
and recompile the class with the Sun JDK.



License
-------
  This program is distibuted under the GNU Public Licence version 2.
  See License.txt or http://www.fsf.org/copyleft/gpl.txt.

  However as I still own the copyright, if you are interested in including
  parts of this code in your program I can re-license them to you under
  an other license with a written approval. Please, contact me.

Disclaimer
----------
  LIKE ANYTHING ELSE THAT'S FREE, J++Extract IS PROVIDED AS IS AND COME WITH NO
  WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED. IN NO EVENT WILL THE
  COPYRIGHT HOLDER BE LIABLE FOR ANY DAMAGES RESULTING FROM THE USE OF THIS
  SOFTWARE.

Source code
-----------
  The source code included has been compiled with Microsoft Visual C++ 6.0.
  It doesn't use the Microsoft C Runtime libray, however it makes
  extensive use of Microsoft proprietary directives (#pragma) to tell the
  linker to not use the Microsoft runtime and to reduce the size of the
  executable. You can remove them without risk to compile with your
  favorite compiler. I would even be happy if you send me patches or
  makefiles to compile with another compiler.

Author
------
  E-mail: dolmen@bigfoot.com
  Web: http://www.multimania.com/dolmen/
  Address:
    Olivier Mengu
    88, rue Nol
    94600 Choisy-le-Roi
    France

Thanks
------
  - Fravia (http://www.fravia.org/) for his previous great site about
    reversing and now for his site to learn to search on the Internet.
  - Pavel Kouznetsov for Jad
    (http://www.geocities.com/SiliconValley/Bridge/8617/jad.html)
  - Quang for his site "Programmer's tools"
    (http://www.eccentrix.com/computer/protools/)
  - Sun for the high level virtual machine that enable lazy craking, and for
    the disassembler bundled with the JDK
  - Microsoft, for this file format that let think to the developer that
    the decompilation of his application is difficult.

File format
-----------
  All files are stored in the executable resources.

  Resource Raw data #1000
     Offset 0 is the start of the resource
     0x0000 Header
       CHAR  4      "DNRC"
       DWORD 1      Number of files (number of entries in the content table
       DWORD 1      ?
       DWORD 1		?
     0x0010 Table of content : array of the following enties
       DWORD 1      Offset of the file name (CHAR, terminated by '\0').
       DWORD 1      File size.
       DWORD 1      Offset of the start of the file data (only for class
                    files).
       DWORD 1      Offset of the resource id (WCHAR, terminated by '\0'),
                    (only for resource files)
       DWORD 1      Flags.
                      0xFFFFFFFF is a class file stored in this resource
                      0x8000000A is a resource file, stored in another
                                 raw data resource identified by the
                                 resource id above.
                      Other values are unknown to me.


  Resource Raw data #1001
     0x0000
       WCHAR *      Class to launch
       WCHAR 1      '\0'

  Resource Icon #1 : icon of the application


History
-------

  30/07/2000  1.0     Initial public release.

  30/07/2000  1.0     Documentation, packaging.

  29/07/2000  0.9.9   Extraction of the icon to a .ico.
  29/07/2000  0.9.8   Generation of the .bat launcher.

  28/07/2000  0.9     Extraction of resource files works too.

  23/07/2000  0.8     First version. Extracts .class files.

  23/07/2000  0.0     Discovery of the file format.

  22/07/2000  0.0     Found a target. I need a tool to explore it.
