Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Is it possible to reverse the process of compiling a TPU...

56 views
Skip to first unread message

nowi...@sciborg.uwaterloo.ca

unread,
Sep 11, 1995, 3:00:00 AM9/11/95
to
Is it possible to reverse the process of compiling a TPU to decompiling a
TPU?
When compiling a TPU you go from PAS --> TPU
I'd like to go from TPU --> PAS, and is this possible?

--
Jack Nowinski
E-Mail: nowi...@sciborg.uwaterloo.ca


Arthur Schopenhauer

unread,
Sep 11, 1995, 3:00:00 AM9/11/95
to
nowi...@sciborg.uwaterloo.ca wrote:
: Is it possible to reverse the process of compiling a TPU to decompiling a
: TPU?
: When compiling a TPU you go from PAS --> TPU
: I'd like to go from TPU --> PAS, and is this possible?

Sorry, it's impossible.
Check Timo's FAQ, it's even an RTFM question.

Ariel.
sc...@actcom.ac.il - Finger my account for more information. Limited home
page at http://www.actcom.co.il/~schop -------------------------------------
"I object any word of your claims - but I will fight until my last drop of
blood for your right to express them" (Voltaire)-----------------------------


Kevin

unread,
Sep 12, 1995, 3:00:00 AM9/12/95
to
nowi...@sciborg.uwaterloo.ca () wrote:

>Is it possible to reverse the process of compiling a TPU to decompiling a
>TPU?
>When compiling a TPU you go from PAS --> TPU
>I'd like to go from TPU --> PAS, and is this possible?

I sure as hell hope not, for whenever I, or other people release our
stuff, we tend to use the tpu format so to make it mroe difficult for
you to change things in them:) .. There may be decompiler deals, but
They'd be a sloppy mess. I'd be interested in something like this if
someone here has it, but that would mean all the more paranoia for us
coders that do not frequently release our code anywayz, and thought
the tpu's were safe.


Janos Szamosfalvi

unread,
Sep 12, 1995, 3:00:00 AM9/12/95
to
nowi...@sciborg.uwaterloo.ca wrote:
: Is it possible to reverse the process of compiling a TPU to decompiling a
: TPU?
: When compiling a TPU you go from PAS --> TPU
: I'd like to go from TPU --> PAS, and is this possible?

Decompiling would be a process that runs in NP time.
So decompiling a non-trivial piece of code is practically
impossible.


Kvantti Piikkisika

unread,
Sep 12, 1995, 3:00:00 AM9/12/95
to
On Mon, 11 Sep 1995, Arthur Schopenhauer wrote:

> nowi...@sciborg.uwaterloo.ca wrote:
> : Is it possible to reverse the process of compiling a TPU to decompiling a
> : TPU?
> : When compiling a TPU you go from PAS --> TPU
> : I'd like to go from TPU --> PAS, and is this possible?
>

> Sorry, it's impossible.
> Check Timo's FAQ, it's even an RTFM question.
>

Not really... there are unit decompilers. I haven't ever gotten one to
work, but they do exist. (It seems that if there's inline assembler it
doesn't work, but i've never bothered with ones without assembler since
those ones aren't generally worth a decompile. :).

> "I object any word of your claims - but I will fight until my last drop of
> blood for your right to express them" (Voltaire)-----------------------------
>

Now THERE's a hoopy frood who knows where his towel is! :) (voltaire I
mean :)


-----------------\------------------------------------------------------------
Quantum Porcupine \-\ People kept on telling me to get on with it and write
a.k.a. Joshua Shagam > my damn .sig file. Well I finally got around to it
jsh...@nmsu.edu /--/ since I finally got SIG of it all.
----------------/-------------------------------------------------------------
Missing Link / Puuttuva Lenkki


>

unread,
Sep 13, 1995, 3:00:00 AM9/13/95
to
In <433sgq$r...@dfw.nkn.net>, ki...@dfw.nkn.edu (Kevin) writes:

>nowi...@sciborg.uwaterloo.ca () wrote:
>
>>Is it possible to reverse the process of compiling a TPU to decompiling a
>>TPU?
>>When compiling a TPU you go from PAS --> TPU
>>I'd like to go from TPU --> PAS, and is this possible?
>
>I sure as hell hope not, for whenever I, or other people release our
>stuff, we tend to use the tpu format so to make it mroe difficult for
>you to change things in them:) .. There may be decompiler deals, but
>They'd be a sloppy mess. I'd be interested in something like this if
>someone here has it, but that would mean all the more paranoia for us
>coders that do not frequently release our code anywayz, and thought
>the tpu's were safe.
>

I've considered this before. I think it should be possible considering that a compiler is based on a determinitic process.

Assuming that the version of Pascal that the TPU ( or exe for that matter) was compiled from is known, and that the Pascal functions and procedures are well documented in versions which include the source code; it should therefore be possible to build a table of tokens 4 or 5 bytes each that correspond to ASM opcodes common to standard library functions. From this, a pass through the binary would reveal the order of the function/procedure calls, then compiling this source with dummy variables/constants and comparing this to the original would reveal the values initially assigned to the variables/constants.

In theory it should be possible.

I have done this on a small scale by following through an exe with Turbo Debugger, then referencing certian ASM calls to the RTL source to determine what function was used.

--
Wayne D. Hoxsie Jr. <hox...@crl.com>
finger or http://www.crl.com/~hoxsiew for PGP key

Joachim Fenkes

unread,
Sep 15, 1995, 3:00:00 AM9/15/95
to
Am Tue, 12 Sep 1995 14:43:33 -0600 hackte
Kvantti Piikkisika <jsh...@nmsu.edu> zum Thema
"Re: Is it possible to reverse the process of compiling a TPU..."
folgendes in die Tasten:

>> "I object any word of your claims - but I will fight until my last drop of
>> blood for your right to express them" (Voltaire)-----------------------------
>>
>Now THERE's a hoopy frood who knows where his towel is! :) (voltaire I
>mean :)

Oh, you have already sassed him? :-)

Be sassing ya,
Joachim

Joachim Fenkes
j.fe...@public.ndh.com

P.S.: Don't ever forget: 42 is the answer!!!


Arthur Schopenhauer

unread,
Sep 17, 1995, 3:00:00 AM9/17/95
to
Kvantti Piikkisika (jsh...@nmsu.edu) wrote:

: On Mon, 11 Sep 1995, Arthur Schopenhauer wrote:

: > nowi...@sciborg.uwaterloo.ca wrote:
: > : Is it possible to reverse the process of compiling a TPU to decompiling a

: > : TPU?
: > : When compiling a TPU you go from PAS --> TPU
: > : I'd like to go from TPU --> PAS, and is this possible?

: >
: > Sorry, it's impossible.


: > Check Timo's FAQ, it's even an RTFM question.
: >
: Not really... there are unit decompilers. I haven't ever gotten one to
: work, but they do exist. (It seems that if there's inline assembler it
: doesn't work, but i've never bothered with ones without assembler since
: those ones aren't generally worth a decompile. :).

hmmmmm,
1) Let the readers know where to find them.
2) Inform timo he was wrong :)
Although the idea of decompilation still sounds wierd.
Ariel.

sc...@actcom.ac.il - Finger my account for more information. Limited home
page at http://www.actcom.co.il/~schop -------------------------------------

Arthur Schopenhauer

unread,
Sep 17, 1995, 3:00:00 AM9/17/95
to
: P.S.: Don't ever forget: 42 is the answer!!!
Nope. 191.

Arthur Schopenhauer

unread,
Sep 17, 1995, 3:00:00 AM9/17/95
to
hox...@crl.com (WayneD.HoxsieJr.) wrote:
: In <433sgq$r...@dfw.nkn.net>, ki...@dfw.nkn.edu (Kevin) writes:

: >nowi...@sciborg.uwaterloo.ca () wrote:
: >
: >>Is it possible to reverse the process of compiling a TPU to decompiling a
: >>TPU?
: >>When compiling a TPU you go from PAS --> TPU
: >>I'd like to go from TPU --> PAS, and is this possible?
: >
: >I sure as hell hope not, for whenever I, or other people release our

: >stuff, we tend to use the tpu format so to make it mroe difficult for
: >you to change things in them:) .. There may be decompiler deals, but
: >They'd be a sloppy mess. I'd be interested in something like this if
: >someone here has it, but that would mean all the more paranoia for us
: >coders that do not frequently release our code anywayz, and thought
: >the tpu's were safe.
: >

: I've considered this before. I think it should be possible considering that a compiler is based on a determinitic process.

: Assuming that the version of Pascal that the TPU ( or exe for that matter) was compiled from is known, and that the Pascal functions and procedures are well documented in versions which include the source code; it should therefore be possible to build a
table of tokens 4 or 5 bytes each that correspond to ASM opcodes common to standard library functions. From this, a pass through the binary would reveal the order of the function/procedure calls, then compiling this source with dummy variables/constants
an

: d comparing this to the original would reveal the values initially assigned to the variables/constants.

: In theory it should be possible.

: I have done this on a small scale by following through an exe with Turbo Debugger, then referencing certian ASM calls to the RTL source to determine what function was used.

: --
: Wayne D. Hoxsie Jr. <hox...@crl.com>
: finger or http://www.crl.com/~hoxsiew for PGP key

First - next time you post press enter at the end of each line. It is
impossible to read your post on my newsreader.
Second - determinity of process doesn't prmoise it's reversible.
The function Y=X^2 is deterministic, but irreversible. It can be that
several pascal lines would make out a code that is similar to the output of
other lines.
Another thing: the unix process of transferring passwords to the numbers
in the /etc/passwd is considered reversible, but the complexity of the
reverse process is so high, that it is defined as unsolvable. Maybe, as one
of the follow-uppers suggested, decompiling is not contradictive, but requires
a huge process that isn't practical.

Ariel.

Tom Wheeley

unread,
Sep 17, 1995, 3:00:00 AM9/17/95
to
In article <DF0wF...@actcom.co.il>
sc...@actcom.co.il "Arthur Schopenhauer" writes:

> Another thing: the unix process of transferring passwords to the numbers
> in the /etc/passwd is considered reversible, but the complexity of the
> reverse process is so high, that it is defined as unsolvable. Maybe, as one
> of the follow-uppers suggested, decompiling is not contradictive, but requires
> a huge process that isn't practical.
>
> Ariel.

At the very least: You could, for instance, compile every permutaion of pascal
code and compare it to the EXE -- when its the same, voila, you have your
piece of Pascal code!
This is not being facetious, just showing that decompilation IS possible,
just not neccesarily practical.

--
Tom Wheeley

TQ v0.92 * Stolen Sigs!
Is it true that Kibo habitually autogreps all of Usenet
for his name? If so: Hi, Kibo. Like the sig?
[b...@laraby.tiac.net]

Kvantti Piikkisika

unread,
Sep 17, 1995, 3:00:00 AM9/17/95
to
On Sun, 17 Sep 1995, Arthur Schopenhauer wrote:

> : P.S.: Don't ever forget: 42 is the answer!!!
> Nope. 191.
>

Well, it's actually 54 in base 10... you see, the question is 'What is
six times nine' (from Restaurant at the End of the Universe) and although
that doesn't seem to equal 42, it *does* -- in Base 13. :)

> "I object any word of your claims - but I will fight until my last drop of
> blood for your right to express them" (Voltaire) ----------------------------
>

I still say he's a hoopy frood who knows where his towel is! :)

Jeffrey917

unread,
Sep 27, 1995, 3:00:00 AM9/27/95
to
>> : P.S.: Don't ever forget: 42 is the answer!!!
>> Nope. 191.
>>
>Well, it's actually 54 in base 10... you see, the question is 'What is
>six times nine' (from Restaurant at the End of the Universe) and although

>that doesn't seem to equal 42, it *does* -- in Base 13. :)

Actually if I remember right the question was "What is six times seven"
which DOES equal 42 in base 10

Jeff

Tom Wheeley

unread,
Sep 28, 1995, 3:00:00 AM9/28/95
to
In article <44cuev$l...@newsbf02.news.aol.com>
jeffr...@aol.com "Jeffrey917" writes:


er no.

'WHATDOYOUGETIFYOUMULTIPLYSIXBYNINE'

'Er, that's the lot'

--
Tom Wheeley

TQ v0.92 * Umm, err, can't quite remember what this was called...
One of the main causes of the fall of the Roman Empire was that, lacking zero,
they had no way to indicate successful termination of their C programs.
--Robert Firth

Tony Quinn

unread,
Sep 29, 1995, 3:00:00 AM9/29/95
to
Jeffrey917 (jeffr...@aol.com) wrote:
: >> : P.S.: Don't ever forget: 42 is the answer!!!

: >> Nope. 191.
: >>
: >Well, it's actually 54 in base 10... you see, the question is 'What is
: >six times nine' (from Restaurant at the End of the Universe) and although

: >that doesn't seem to equal 42, it *does* -- in Base 13. :)
: Actually if I remember right the question was "What is six times seven"
: which DOES equal 42 in base 10

No, it's definitely "what do you get if you multiply 6 by 9".
--
--------------------------------------------------------------------------
Tony Quinn --- The Voice of Insanity
Replies to tony...@sixpints.demon.co.uk
--------------------------------------------------------------------------

Kvantti Piikkisika

unread,
Oct 1, 1995, 3:00:00 AM10/1/95
to
On 27 Sep 1995, Jeffrey917 wrote:

> >> : P.S.: Don't ever forget: 42 is the answer!!!
> >> Nope. 191.
> >>
> >Well, it's actually 54 in base 10... you see, the question is 'What is
> >six times nine' (from Restaurant at the End of the Universe) and although
>
> >that doesn't seem to equal 42, it *does* -- in Base 13. :)
> Actually if I remember right the question was "What is six times seven"
> which DOES equal 42 in base 10
>

Re-read "The Restaurant at the End of the Univverse" again, dude... :)


____________________________________________________________________
Joshua Shagam\___ EMail: JSh...@nmsu.edu \__ "Reasoning depends on\______
207 Alumni Avenue\__ IRC: Kvantti on #coders \___________ programming, not\
Las Cruces, NM 88003\___ WWW: HTTP://web.nmsu.edu/~jshagam\_on hardware." /
United States of America\ Demoscene Alias: Quantum Porcupine\ -- Frank /
/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\___ Herbert/
Check out my webpage for the Quantum Porcupine Archive, of course\______/


0 new messages