举报文章问题
×- 营销广告
- 重复、旧闻
- 格式问题
- 低俗
- 标题夸张
- 与事实不符
- 疑似抄袭
- 我有话要说
Using an EX4 decompiler typically violates MetaQuotes' license agreement, which states: “You may not reverse engineer, decompile, or disassemble the Software.”
Stars: ~95
Language: C++
Last Update: 2022 (stale but functional)
This tool is unique because it focuses on speed. Written in raw C++, it can decompile an EX4 in under 0.2 seconds. However, it lacks user-friendly error handling.
Pros:
Cons:
GitHub Link: github.com/cifra90/ex4-dec
The EX4 decompiler repositories on GitHub represent more than just a collection of Python scripts and disassemblers. They are artifacts of a fundamental tension between the right to audit code and the right to protect intellectual property. For every trader who loses a password, there is a pirate who steals an EA; for every decompiler commit, there is a MetaQuotes engineer writing a new obfuscation routine. GitHub hosts this conflict in plain sight—a testament to the enduring, messy reality that any code executed on a user’s machine can, in theory, be reverse-engineered. The question is not whether decompilers exist, but whether you are willing to accept the legal, ethical, and security risks of using one.
Finding a fully functional EX4 decompiler on GitHub is difficult because modern MetaTrader 4 (MT4) builds (600+) use advanced encryption and compilation that make perfect reverse engineering almost impossible. Most GitHub repositories in this space are either wrappers for older, discontinued software or limited analysis tools.
If you are looking for a repository to build upon or use as a starting point, here are the primary options:
1. AdibSadman192/Ex4-to-Multiple-Readable-Language-Converter
This is a more modern approach that focuses on pattern recognition and analysis rather than a direct binary-to-source conversion. Key Features: ex4 decompiler github
Extracts metadata and identifies trading logic, indicator calls, and string patterns.
Output Options: Generates pseudocode in MQL4, MQL5, Python, C, or R.
Best For: Understanding the logic of an EA or indicator without needing the original source. 2. FX31337/ex4_to_mq4_cli
This is a popular repository, but it is a CLI wrapper, not a standalone decompiler.
How it works: It automates the use of older decompiler executables (like ex4_to_mq4.exe) by faking drag-and-drop operations. GitHub Link: github
Limitation: It generally only works for legacy EX4 files (pre-build 600). 3. Ghidra (Advanced Reverse Engineering)
For developers, the NSA's Ghidra is often used for manual decompilation.
Process: You can import the .ex4 file, set the language to x86:LE:32:default, and run auto-analysis to find critical functions like OnTick.
Enhancement: Using tools like trailofbits/Codex-Decompiler can help use AI to turn Ghidra's assembly into more readable code. Summary of Alternatives Example Repository Effectiveness Logic Analyzer
MQL4 developers often spend weeks or months perfecting an EA. Decompilation destroys their business model. In response, modern developers use: modern developers use:
This arms race means that public GitHub decompilers often fail on any EX4 compiled with build > 1350 (MetaQuotes added heavy anti-reverse engineering in 2021).