From: bergman@panix.com (Mark Bergman)
Subject: Re: Program to convert .EXE to a "C" source file?  I really need one!!
Organization: Panix Public Access Internet & Unix, NYC
Date: Mon, 4 Jan 1993 19:13:19 GMT

In article <1993Jan4.022241.4493@pony.Ingres.COM> mikes@Ingres.COM (Mike Schilling) writes:
>From article <1993Jan2.203527.27050@news2.cis.umn.edu>, by dutc0006@student.tc.umn.edu ():
>> In article <1993Jan1.225604.964@blurt.oswego.edu> ch_ind05@blurt.oswego.edu (Greg Fuller (SUNY Oswego, Oswego New York)) writes:
>>>Hello. 
>>>	I am looking for a program that will take a .EXE or .COM file and
>>>convert it into a "C" source file.  I saw one on one of the FTP sites today,
>> [Stuff deleted]
>> 	I am looking for a program of that nature too.  If someone knows 
>> where one can be FTP'd I would appreciate E-Mail telling me.  
>> 				Thanks,
>> 				dutc0006@student.tc.umn.edu			
>> 
>I'd prefer a program that generates the RCS or SCCS archives the program was 
>developed in, plus a makefile.  Architectural and design documents would be 
>nice too.
>----------------------------------------------------------------------------
>mikes@ingres.com = Mike Schilling, INGRES, An ASK Group Company, Alameda, CA
>Just machines that make big decisions,
>Programmed by fellows with compassion and vision.	-- Donald Fagen, "IGY"
Ok, stop it! I'm tired of all these requests! The manual
page for "sourcer" follows. Look for the full package at an
FTP archive near you.

----
Mark Bergman    (Biker, Stagehand, (former) Unix user support grunt)
718-855-9148

bergman@panix.com
{cmcl2,uunet}!panix!bergman

----------------------------------------------------------------------



SOURCERER(l1)     MISC. REFERENCE MANUAL PAGES      SOURCERER(l1)



NAME
     sourcerer - generate source code corresponding to input exe-
     cutable.

SYNOPSIS
     _s_o_u_r_c_e_r_e_r [language] [options] executable file
     _s_o_u_r_c_e_r_e_r [A AL AP B C CO F L M P PL  S]  [csoa]  executable
     file

DESCRIPTION
     _s_o_u_r_c_e_r_e_r generates source code corresponding to  the  input
     executable  binary _f_i_l_e, in the chosen programming language.
     The resulting source code is written to standard output.

     _s_o_u_r_c_e_r_e_r operates rapidly.  Due to the particular nature of
     the algorithms used, _s_o_u_r_c_e_r_e_r will generate the source code
     for the executable _f_i_l_e in  no  more  than  twice  the  time
     needed to execute _f_i_l_e.

     Options allow the user to generate comments with the  source
     code, and to provide generalized pseudo-code descriptions of
     any system calls made in the executable _f_i_l_e.   The  pseudo-
     code  description  of  system  calls  are, of course, in the
     proper syntax for the chosen language.

     The available languages are:
               _O_p_t_i_o_n _N_a_m_e              _L_a_n_g_u_a_g_e
               A                        Ada
               AL                       Algol68
               AP                       Apl
               B                        Basic
               C                        C
               CO                       Cobol
               F                        Fortran
               L                        Lisp
               M                        Modula2
               P                        Pascal
               PL                       PL/I
               S                        Smalltalk
     Wherever they exist, ANSI or ISO standards for each language
     are used.

OPTIONS
     If a language is not specified, and the -_a option  is  used,
     _s_o_u_r_c_e_r_e_r scans the input executable _f_i_l_e, and automatically
     selects the most efficient language to  produce  the  source
     code  and  pseudo-code  for  system calls.  This option also
     implies the following options:

     -_c        Generate commented source code.

     -_s        Generate  pseudo-code   for   any   system   calls



Sun Release 4.1        Last change: Local                       1






SOURCERER(l1)     MISC. REFERENCE MANUAL PAGES      SOURCERER(l1)



               encountered in the executable file.

     The other option, -_o, is incompatible with -_a and  -_s.   The
     -_o  option  specifies  that  only pseudo-code for the system
     calls be generated, in the specified language.  This  option
     is  most  often used after _s_o_u_r_c_e_r_e_r warns that the language
     chosen to generate the source code is inappropriate for gen-
     erating the pseudo-code for system calls.

EXAMPLES
     _s_o_u_r_c_e_r_e_r -A -c _n_e_w-_e_x_e_c_u_t_a_b_l_e > new-source.ADA
               Generate the Ada source code, commented,  for  the
               program _n_e_w-_e_x_e_c_u_t_a_b_l_e.
     _s_o_u_r_c_e_r_e_r -a _n_e_w-_e_x_e_c_u_t_a_b_l_e > new-source
               Generate commented source code for _n_e_w-_e_x_e_c_u_t_a_b_l_e,
               choosing  the  language  for  the  source code and
               pseudo-coded system calls automatically.

DIAGNOSTICS
     _s_o_u_r_c_e_r_e_r will display a warning indicating if the  language
     chosen  to  produce the source code is inappropriate for the
     given executable.  Example:
               Warning: _l_a_n_g_u_a_g_e is inefficient  for  _e_x_e_c_u_t_a_b_l_e-
               _f_i_l_e.
     A different warning is given if the language is  appropriate
     for  the  executable,  but not for producing the pseudo-code
     for the system calls.  In this case, _s_o_u_r_c_e_r_e_r will  suggest
     an  alternative  language to produce the pseudo-coded system
     calls; in the form:
               Warning: _l_a_n_g_u_a_g_e is inefficient  for  the  system
               calls, try _l_a_n_g_u_a_g_e_2.

BUGS
     The -_s or -_a options may slow down the  translation  process
     considerably.   Generating pseudo-code corresponding to sys-
     tem calls can take up to the square of the time necessary to
     execute each system call.

     _s_o_u_r_c_e_r_e_r was written in a proprietary  language,  _s_o_u_r_c_e_r_e_r
     cannot be applied recursively, as in:
               _s_o_u_r_c_e_r_e_r -C sourcerer > sourcerer.c














Sun Release 4.1        Last change: Local                       2



Newsgroups: comp.lang.c