Page 1 of 2

Recover script from EXE?

Posted: Tue May 23, 2023 10:20 pm
by Tuxedo
Hi all,
I dont remember if that question was already made...
But...thre was a weay to recover the source txt(maybe exactly as it was created like with comments and all other stuffs...) from and Hollywood exe?
I lost latest the LoView source codes and since I want to made a final version compiled with the latest Hollywood and have to resolve some bugs I like to can recover my scripts in some way...
I dunno(and dont remember) how hollywood links scripts and player in exes...

Thank you!

Re: Recover script from EXE?

Posted: Tue May 23, 2023 10:23 pm
by plouf
this is called decompiler
afaik there is no

if there is i would like to know :)

Re: Recover script from EXE?

Posted: Tue May 23, 2023 10:27 pm
by Tuxedo
Well...since Holywood was an interpreted language I thought that maybe the compiler takes simply the source code and attach it to the player or something similar...

Re: Recover script from EXE?

Posted: Wed May 24, 2023 1:57 am
by SamuraiCrow
The interpreter is tacked onto bytecode. Not source, bytecode.

Re: Recover script from EXE?

Posted: Wed May 24, 2023 9:57 pm
by airsoftsoftwair
Tuxedo wrote: Tue May 23, 2023 10:27 pm Well...since Holywood was an interpreted language I thought that maybe the compiler takes simply the source code and attach it to the player or something similar...
Nope it's compiled into a special bytecode. It's impossible to get the exact script back. But it would be possible to write a decompiler that recovers something readable because in comparison to machine code all names (variables, functions...) are preserved in Hollywood bytecode.

Re: Recover script from EXE?

Posted: Wed May 24, 2023 10:29 pm
by plouf
This is good amd also bad.. since no real compiling takes place
Both in code protection scheme and execution speed

A more "compiler" maybe be for future holywood?!

Re: Recover script from EXE?

Posted: Thu May 25, 2023 9:01 pm
by Tuxedo
OK,
thank you for Replyes!
So unfortunately cant make the so wanted final version...btw...

Re: Recover script from EXE?

Posted: Sun May 28, 2023 8:53 pm
by airsoftsoftwair
plouf wrote: Wed May 24, 2023 10:29 pm This is good amd also bad.. since no real compiling takes place
Both in code protection scheme and execution speed
A more "compiler" maybe be for future holywood?!
Sorry, won't come. Machine-code compiling would require writing different backends for 68k, ppc, x86, x64, arm, arm64 etc. That's definitely way beyond what my time permits. If you really need to do high performance operations in Hollywood, just put that code in a plugin and call it from the script.

Re: Recover script from EXE?

Posted: Sun May 28, 2023 8:58 pm
by plouf
airsoftsoftwair wrote: Sun May 28, 2023 8:53 pm
Sorry, won't come. Machine-code compiling would require writing different backends for 68k, ppc, x86, x64, arm, arm64 etc. That's definitely way beyond what my time permits. If you really need to do high performance operations in Hollywood, just put that code in a plugin and call it from the script.
Dont speak for machine code
Speaking about more bytes in byte code

The fact that functions remain as is. Is a one fact that can optimized
Since pure byte are shoerter (minimun space achieved) bit also less bytes to interpret..

Re: Recover script from EXE?

Posted: Sun May 28, 2023 9:09 pm
by airsoftsoftwair
I don't think there is much room for optimization since Hollywood bytecode is basically Lua bytecode with some tweaks and Lua is highly optimized. What I do plan to add though is some sort of obfuscation mode that changes all variable and function names into a random combination of characters to make it more difficult to reverse engineer code but that won't have any effect on performance.