Does using Include and library secure source code

 
Hi everyone, I split the algo of an EA by writing most of the vital functions in an include file and custom indicator, I compiled all this into the major executable program, I will like to know if the EA is decompiled by unauthorized users, will the include functions and indicator be a missing files on it. 
 
Ebunoluwa Abimb Owodunni:
Hi everyone, I split the algo of an EA by writing most of the vital functions in an include file and custom indicator, I compiled all this into the major executable program, I will like to know if the EA is decompiled by unauthorized users, will the include functions and indicator be a missing files on it. 

How will the ex4 or ex5 be decompiled, whether it is hosted in marketplace or not?  

 
Leon Clifton Gaines #:

How will the ex4 or ex5 be decompiled, whether it is hosted in marketplace or not?  

I have no idea, I asked if it get decompiled either by chance or not,will the code still  be secured and encrypted 
 
Ebunoluwa Abimb Owodunni #:
I have no idea, I asked if it get decompiled either by chance or not,will the code still  be secured and encrypted 

Well, by definition, decompile means 

  • produce source code from (compiled code):

So your comment "will the code still be secured and encrypted " does not make sense, based on the definition of "decompile" alone.  

Since there are no de-compilers that you know of, nor I, it forces us to play the hypothetical game and assume or imagine the possible capabilities of said de-compiler.  I would imagine this mystery de-compiler will provide code in its entirety which can be easily re-compiled with little effort.  

BUT your question was specific to whether or not the de-compiler will be "missing files from it"

So let's dive into what an #include file is and how the compiler uses this info.

#include files are processed during the compilation of the source code, once the "COMPILE" process is kicked off.  The compiler reads the code in the in the include file and replaces the #include line with the code.  The compiler generates an executable or compiled version with all the code inside it.  It does not care of the source.

Once again, we are back to hypotheticals.  Does the compiler record, in the executable, the name of the disk file referenced and the block of code that was pulled from it?  Once again, I would imagine that the decompiler will at minimum provide reusable code in it's entirety.  In my imagination, if the compiler records include file contents in the executable, then the de-compiler will interpret it and generate the file. 


So, the answer to your hypothetical question is NO, code will NOT be secured and encrypted; All the files will be recreated.  

 
  1. There has been zero proof that any ex4/5 can be decompiled since Build 600+ (2014)
              Upcoming MetaTrader 4 and MQL4 Upgrades - Big Changes Are Underway (MetaQuotes Software Corp.) - MQL4 programming forum (2013)
              Code Protection: New MQL4 language(Build 600+) decompilation protection and other crack techniques. (Macos Silva) - MQL4 programming forum - Page 2 (2014)


  2. Ebunoluwa Abimb Owodunni vital functions in an include file and custom indicator,

    Putting them in an include file is exactly the same as putting them in the EA. No difference after compilation.

  3. Putting the logic in a CI works, except you can't give/sell it to anyone else; they would be missing it. No one else has access, so what's the point?
  4. Include the CI and that could be decompiled just as easily as the EA. So what's the point? (№ 1)
 
Leon Clifton Gaines #:

Well, by definition, decompile means 

  • produce source code from (compiled code):

So your comment "will the code still be secured and encrypted " does not make sense, based on the definition of "decompile" alone.  

Since there are no de-compilers that you know of, nor I, it forces us to play the hypothetical game and assume or imagine the possible capabilities of said de-compiler.  I would imagine this mystery de-compiler will provide code in its entirety which can be easily re-compiled with little effort.  

BUT your question was specific to whether or not the de-compiler will be "missing files from it"

So let's dive into what an #include file is and how the compiler uses this info.

#include files are processed during the compilation of the source code, once the "COMPILE" process is kicked off.  The compiler reads the code in the in the include file and replaces the #include line with the code.  The compiler generates an executable or compiled version with all the code inside it.  It does not care of the source.

Once again, we are back to hypotheticals.  Does the compiler record, in the executable, the name of the disk file referenced and the block of code that was pulled from it?  Once again, I would imagine that the decompiler will at minimum provide reusable code in it's entirety.  In my imagination, if the compiler records include file contents in the executable, then the de-compiler will interpret it and generate the file. 


So, the answer to your hypothetical question is NO, code will NOT be secured and encrypted; All the files will be recreated.  

Thanks, I get the logic behind it now
 
Ebunoluwa Abimb Owodunni #:
Thanks, I get the logic behind it now
Great, all good!  
Reason: