Tungsten: To protect my EA from being decompiled,
There has be zero proof that any ex4/5 can be decompiled since
Build 600+ 2014.02.03
Upcoming MetaTrader 4 and MQL4 Upgrades - Big Changes Are Underway (MetaQuotes Software Corp.) - MQL4 programming forum
Code Protection: New MQL4 language(Build 600+) decompilation protection and other crack techniques. (Macos Silva) - MQL4 programming forum - Page 2
William Roeder:
There has be zero proof that any ex4/5 can be decompiled since Build 600+ 20 14.02.03
Upcoming MetaTrader 4 and MQL4 Upgrades - Big Changes Are Underway (MetaQuotes Software Corp.) - MQL4 programming forum
Code Protection: New MQL4 language(Build 600+) decompilation protection and other crack techniques. (Macos Silva) - MQL4 programming forum - Page 2
There has be zero proof that any ex4/5 can be decompiled since Build 600+ 20 14.02.03
Upcoming MetaTrader 4 and MQL4 Upgrades - Big Changes Are Underway (MetaQuotes Software Corp.) - MQL4 programming forum
Code Protection: New MQL4 language(Build 600+) decompilation protection and other crack techniques. (Macos Silva) - MQL4 programming forum - Page 2
Hi William,
Thank you very much for your prompt reply. I appreciate that so far there is no proof of decompilation for ex4s since said build version, but there is no proof that it is uncrackable either (as far as I know) so to me it seems like a 'does not imply' case. It is also possible that ex4s compiled since this build are still being broken, but that evidence of such feats are not (and will never be) publicly displayed. Therefore I would still like a solution to the safeguard as proposed in the OP just in case such a proof comes to existence in the future.
My sincere apologies if this sounds paranoid.
Thanks,
Tungsten

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello all,
This is my first post on the MQL5 forum. I am trying to write an Expert Advisor (can apply to Indicator as well) in MQL4 that uses a custom made DLL to authenticate its users. To protect my EA from being decompiled, I am thinking of passing MQL4's system function AccountNumber() as a parameter to my external DLL function that performs the authentication. This custom DLL function will accept a pointer to functions that return an int and take no parameters (like the specified AccountNumber function, like follows:
I was not able to get this to compile when I tried writing the following way, which is the effect I want to achieve:
However, I attempted the following workaround which compiles successfully, although it does not achieve the effect I want:
I would like to understand why I am not able to pass a system function such as AccountNumber() directly as a parameter to another function (namely the actual function from my custom authentication DLL I intend to use). My reason for insisting to do it the first way is in order to ensure that the function used to send the integer to authenticate is this function (and not any other function, since this function is a system function and therefore cannot be redefined). I believe this would protect the resulting ex4 file from successful decompilation and overwriting (a.k.a. being 'hacked into') as it prevents this from happening:
Similarly, I could not afford to write it like this as it is equally as vulnerable, if not even worse:
I would appreciate it very much if you can explain to me why passing MQL4 system functions does not work, and whether there is another way to achieve the outcome I desire.
Thank you very much,
Tungsten