<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>解析 アーカイブ - MT4解除研究所</title>
	<atom:link href="https://mt4decompile.com/category/%E8%A7%A3%E6%9E%90/feed/" rel="self" type="application/rss+xml" />
	<link>https://mt4decompile.com/category/解析/</link>
	<description>EAの中身を、知るための場所</description>
	<lastBuildDate>Wed, 24 Dec 2025 06:46:35 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://mt4decompile.com/wp-content/uploads/2025/12/cropped-cropped-images-32x32.jpg</url>
	<title>解析 アーカイブ - MT4解除研究所</title>
	<link>https://mt4decompile.com/category/解析/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Ghidraを使ったEX4解析の実態と、最終的に残る技術的な課題について</title>
		<link>https://mt4decompile.com/ex4-decompile-ghidra/</link>
		
		<dc:creator><![CDATA[MT4解除研究所運営者]]></dc:creator>
		<pubDate>Wed, 24 Dec 2025 04:27:11 +0000</pubDate>
				<category><![CDATA[解析]]></category>
		<guid isPermaLink="false">https://mt4decompile.com/?p=700</guid>

					<description><![CDATA[<p>MT4デコンパイル診断フォーム 🔍 デコンパイル可能性を診断 5つの質問で診断します（所要時間：約1分） 診断を開始する Q1 ファイルの拡張子は何ですか? .ex4ファイル .mq4ファイル(ソースコード) その他のフ...</p>
<p>投稿 <a href="https://mt4decompile.com/ex4-decompile-ghidra/">Ghidraを使ったEX4解析の実態と、最終的に残る技術的な課題について</a> は <a href="https://mt4decompile.com">MT4解除研究所</a> に最初に表示されました。</p>
]]></description>
										<content:encoded><![CDATA[
<!DOCTYPE html>
<html lang="ja">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>MT4デコンパイル診断フォーム</title>
    <style>
        .mt4-diagnostic-form {
            max-width: 700px;
            margin: 20px auto;
            padding: 20px;
            background: #2d2d2d;
            border-radius: 8px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.3);
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            border: 1px solid #3d3d3d;
        }
        
        .form-content {
            position: relative;
        }
        
        .mt4-diagnostic-form h3 {
            color: #ffffff;
            text-align: center;
            margin-bottom: 4px;
            font-size: 20px;
            font-weight: 700;
        }
        
        .mt4-diagnostic-form .subtitle {
            text-align: center;
            color: #999;
            margin-bottom: 14px;
            font-size: 12px;
        }
        
        .question-block {
            background: #3a3a3a;
            padding: 14px;
            margin-bottom: 10px;
            border-radius: 6px;
            border-left: 3px solid #ff6b6b;
        }
        
        .question-block.hidden {
            display: none;
        }
        
        .question-title {
            font-weight: 600;
            color: #e0e0e0;
            margin-bottom: 10px;
            font-size: 13px;
            display: flex;
            align-items: center;
        }
        
        .question-number {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: #ff6b6b;
            color: white;
            width: 22px;
            height: 22px;
            border-radius: 50%;
            font-size: 11px;
            margin-right: 8px;
            font-weight: 700;
            flex-shrink: 0;
        }
        
        .options {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }
        
        .option-label {
            display: flex;
            align-items: center;
            padding: 8px 12px;
            background: #2d2d2d;
            border: 1px solid #4a4a4a;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.2s ease;
            font-size: 13px;
            color: #ccc;
        }
        
        .option-label:hover {
            background: #353535;
            border-color: #ff6b6b;
            color: #fff;
        }
        
        .option-label input[type="radio"] {
            margin-right: 8px;
            cursor: pointer;
            accent-color: #ff6b6b;
        }
        
        .btn-container {
            text-align: center;
            margin-top: 12px;
        }
        
        .btn {
            padding: 9px 26px;
            font-size: 13px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: 600;
        }
        
        .btn-next {
            background: #ff6b6b;
            color: white;
        }
        
        .btn-next:hover {
            background: #ff5252;
            box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
        }
        
        .btn-next:disabled {
            background: #555;
            cursor: not-allowed;
            color: #888;
        }
        
        .result-container {
            background: #3a3a3a;
            padding: 20px;
            border-radius: 6px;
            text-align: center;
        }
        
        .result-container.hidden {
            display: none;
        }
        
        .result-icon {
            font-size: 44px;
            margin-bottom: 10px;
        }
        
        .result-title {
            font-size: 18px;
            font-weight: bold;
            color: #ffffff;
            margin-bottom: 8px;
        }
        
        .result-message {
            color: #ccc;
            margin-bottom: 14px;
            line-height: 1.6;
            font-size: 13px;
        }
        
        .result-details {
            background: #2d2d2d;
            padding: 12px;
            border-radius: 4px;
            margin-bottom: 14px;
            text-align: left;
            border: 1px solid #4a4a4a;
        }
        
        .result-details h4 {
            color: #ff6b6b;
            margin-bottom: 8px;
            font-size: 13px;
            font-weight: 600;
        }
        
        .result-details ul {
            margin: 0;
            padding-left: 18px;
            color: #aaa;
            font-size: 12px;
        }
        
        .result-details li {
            margin-bottom: 4px;
        }
        
        .difficulty-badge {
            display: inline-block;
            padding: 4px 12px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 600;
            margin-bottom: 12px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        
        .difficulty-badge.easy {
            background: #4caf50;
            color: white;
        }
        
        .difficulty-badge.medium {
            background: #ff9800;
            color: white;
        }
        
        .difficulty-badge.advanced {
            background: #ff6b6b;
            color: white;
        }
        
        .btn-cta {
            background: #ff6b6b;
            color: white;
            padding: 10px 28px;
            font-size: 14px;
            text-decoration: none;
            display: inline-block;
            border-radius: 4px;
            transition: all 0.3s ease;
            font-weight: 600;
        }
        
        .btn-cta:hover {
            background: #ff5252;
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
        }
        
        .progress-bar {
            width: 100%;
            height: 3px;
            background: #4a4a4a;
            border-radius: 2px;
            margin-bottom: 14px;
            overflow: hidden;
        }
        
        .progress-fill {
            height: 100%;
            background: #ff6b6b;
            transition: width 0.3s ease;
        }
        
        .note-box {
            background: #2d2d2d;
            padding: 10px;
            border-left: 3px solid #ff6b6b;
            border-radius: 4px;
            margin-top: 12px;
            text-align: left;
            font-size: 11px;
            color: #aaa;
            border: 1px solid #4a4a4a;
        }
        
        .intro-screen {
            background: #3a3a3a;
            padding: 24px;
            border-radius: 6px;
            text-align: center;
        }
        
        .intro-screen.hidden {
            display: none;
        }
        
        .intro-content {
            max-width: 500px;
            margin: 0 auto;
        }
        
        .intro-icon {
            font-size: 56px;
            margin-bottom: 14px;
        }
        
        .intro-content h4 {
            color: #fff;
            font-size: 20px;
            margin-bottom: 12px;
            font-weight: 600;
        }
        
        .intro-text {
            color: #ccc;
            font-size: 13px;
            line-height: 1.6;
            margin-bottom: 24px;
        }
        
        .btn-start {
            background: #ff6b6b;
            color: white;
            padding: 12px 36px;
            font-size: 15px;
            border-radius: 4px;
            font-weight: 600;
            border: none;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .btn-start:hover {
            background: #ff5252;
            box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
        }
    </style>
</head>
<body>
    <div class="mt4-diagnostic-form">
        <div class="form-content">
            
            <div class="progress-bar" id="progressBarContainer" style="display: none;">
                <div class="progress-fill" id="progressBar" style="width: 0%"></div>
            </div>
            
            <!-- イントロ画面 -->
            <div class="intro-screen" id="introScreen">
                <div class="intro-content">
                    <div class="intro-icon"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f50d.png" alt="🔍" class="wp-smiley" style="height: 1em; max-height: 1em;" /></div>
                    <h4>デコンパイル可能性を診断</h4>
                    <p class="intro-text">
                        5つの質問で診断します（所要時間：約1分）
                    </p>
                    <button type="button" class="btn btn-start" id="startBtn">診断を開始する</button>
                </div>
            </div>
        
        <form id="diagnosticForm" style="display: none;">
            <!-- 質問1 -->
            <div class="question-block" data-question="1">
                <div class="question-title">
                    <span class="question-number">Q1</span>
                    ファイルの拡張子は何ですか?
                </div>
                <div class="options">
                    <label class="option-label">
                        <input type="radio" name="q1" value="ex4" required>
                        .ex4ファイル
                    </label>
                    <label class="option-label">
                        <input type="radio" name="q1" value="mq4">
                        .mq4ファイル(ソースコード)
                    </label>
                    <label class="option-label">
                        <input type="radio" name="q1" value="other">
                        その他のファイル
                    </label>
                </div>
            </div>
            
            <!-- 質問2 -->
            <div class="question-block hidden" data-question="2">
                <div class="question-title">
                    <span class="question-number">Q2</span>
                    ファイルは特定の口座でしか動作しませんか?
                </div>
                <div class="options">
                    <label class="option-label">
                        <input type="radio" name="q2" value="yes" required>
                        はい、特定の口座でのみ動作します
                    </label>
                    <label class="option-label">
                        <input type="radio" name="q2" value="no">
                        いいえ、どの口座でも動作します
                    </label>
                    <label class="option-label">
                        <input type="radio" name="q2" value="unknown">
                        わかりません
                    </label>
                </div>
            </div>
            
            <!-- 質問3 -->
            <div class="question-block hidden" data-question="3">
                <div class="question-title">
                    <span class="question-number">Q3</span>
                    ファイルを開こうとしたときにエラーが表示されますか?
                </div>
                <div class="options">
                    <label class="option-label">
                        <input type="radio" name="q3" value="account-error" required>
                        口座番号に関するエラーが表示される
                    </label>
                    <label class="option-label">
                        <input type="radio" name="q3" value="other-error">
                        別のエラーが表示される
                    </label>
                    <label class="option-label">
                        <input type="radio" name="q3" value="no-error">
                        エラーは表示されない
                    </label>
                </div>
            </div>
            
            <!-- 質問4 -->
            <div class="question-block hidden" data-question="4">
                <div class="question-title">
                    <span class="question-number">Q4</span>
                    EAが外部DLLファイルを使用していますか?
                </div>
                <div class="options">
                    <label class="option-label">
                        <input type="radio" name="q4" value="yes" required>
                        はい、DLLファイルが必要です
                    </label>
                    <label class="option-label">
                        <input type="radio" name="q4" value="no">
                        いいえ、使用していません
                    </label>
                    <label class="option-label">
                        <input type="radio" name="q4" value="unknown">
                        わかりません
                    </label>
                </div>
            </div>
            
            <!-- 質問5 -->
            <div class="question-block hidden" data-question="5">
                <div class="question-title">
                    <span class="question-number">Q5</span>
                    起動時に外部サーバーでライセンス認証を行いますか?
                </div>
                <div class="options">
                    <label class="option-label">
                        <input type="radio" name="q5" value="yes" required>
                        はい、外部サーバーで認証が必要です
                    </label>
                    <label class="option-label">
                        <input type="radio" name="q5" value="no">
                        いいえ、ローカルで認証が完結します
                    </label>
                    <label class="option-label">
                        <input type="radio" name="q5" value="unknown">
                        わかりません
                    </label>
                </div>
            </div>
            
            <div class="btn-container">
                <button type="button" class="btn btn-next" id="nextBtn" disabled>次へ</button>
            </div>
        </form>
        
        <!-- 結果表示 -->
        <div class="result-container hidden" id="resultContainer">
            <div class="result-icon" id="resultIcon"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /></div>
            <div class="difficulty-badge" id="difficultyBadge"></div>
            <div class="result-title" id="resultTitle"></div>
            <div class="result-message" id="resultMessage"></div>
            <div class="result-details" id="resultDetails"></div>
            <a href="https://formok.com/f/64hux0wy?case_id=4ZAMXB" class="btn-cta" target="_blank">
                詳しく相談する →
            </a>
            <div class="note-box">
                <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4a1.png" alt="💡" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 最終的な判断には実際のファイル解析が必要です。まずはお気軽にご相談ください。
            </div>
        </div>
        </div>
    </div>

    <script>
        let currentQuestion = 0; // 0 = intro screen
        const totalQuestions = 5;
        const answers = {};
        
        const form = document.getElementById('diagnosticForm');
        const nextBtn = document.getElementById('nextBtn');
        const startBtn = document.getElementById('startBtn');
        const introScreen = document.getElementById('introScreen');
        const progressBar = document.getElementById('progressBar');
        const progressBarContainer = document.getElementById('progressBarContainer');
        const resultContainer = document.getElementById('resultContainer');
        
        // 診断開始ボタン
        startBtn.addEventListener('click', function() {
            introScreen.classList.add('hidden');
            form.style.display = 'block';
            progressBarContainer.style.display = 'block';
            currentQuestion = 1;
            showQuestion(1);
        });
        
        // 質問を表示
        function showQuestion(questionNum) {
            const questionBlock = document.querySelector(`[data-question="${questionNum}"]`);
            if (questionBlock) {
                questionBlock.classList.remove('hidden');
            }
        }
        
        // ラジオボタンの選択を監視
        form.addEventListener('change', function(e) {
            if (e.target.type === 'radio') {
                nextBtn.disabled = false;
                answers[e.target.name] = e.target.value;
            }
        });
        
        // 次へボタンのクリック処理
        nextBtn.addEventListener('click', function() {
            const currentQuestionBlock = document.querySelector(`[data-question="${currentQuestion}"]`);
            const selectedOption = form.querySelector(`input[name="q${currentQuestion}"]:checked`);
            
            if (!selectedOption) return;
            
            // 現在の質問を非表示
            currentQuestionBlock.classList.add('hidden');
            
            // 次の質問へ
            currentQuestion++;
            
            // プログレスバーを更新
            const progress = (currentQuestion / totalQuestions) * 100;
            progressBar.style.width = progress + '%';
            
            if (currentQuestion <= totalQuestions) {
                // 次の質問を表示
                showQuestion(currentQuestion);
                nextBtn.disabled = true;
                
                // 最後の質問の場合はボタンテキストを変更
                if (currentQuestion === totalQuestions) {
                    nextBtn.textContent = '診断結果を見る';
                }
            } else {
                // すべての質問が終わったら結果を表示
                showResult();
            }
        });
        
        function showResult() {
            form.style.display = 'none';
            document.querySelector('.progress-bar').style.display = 'none';
            resultContainer.classList.remove('hidden');
            
            // 回答に基づいて結果を判定
            const resultType = determineResultType();
            displayResult(resultType);
        }
        
        function determineResultType() {
            // スコアリングシステム
            let complexityScore = 0;
            
            // Q1: ファイル拡張子
            if (answers.q1 === 'mq4') {
                return 'already-source'; // すでにソースコード
            } else if (answers.q1 === 'other') {
                return 'not-ex4'; // ex4ファイルではない
            }
            
            // Q2: 口座縛り
            if (answers.q2 === 'yes') {
                complexityScore += 0; // 標準的なケース
            } else if (answers.q2 === 'no') {
                complexityScore += 1; // 口座縛りなし
            }
            
            // Q3: エラー表示
            if (answers.q3 === 'account-error') {
                complexityScore += 0; // 標準的な口座エラー
            } else if (answers.q3 === 'other-error') {
                complexityScore += 2; // 別のエラー
            }
            
            // Q4: DLL使用
            if (answers.q4 === 'yes') {
                complexityScore += 3; // DLL使用で複雑度アップ
            } else if (answers.q4 === 'no') {
                complexityScore += 0;
            } else {
                complexityScore += 1; // 不明
            }
            
            // Q5: オンライン認証
            if (answers.q5 === 'yes') {
                complexityScore += 3; // サーバー認証で複雑度アップ
            } else if (answers.q5 === 'no') {
                complexityScore += 0;
            } else {
                complexityScore += 1; // 不明
            }
            
            // スコアに基づいて結果タイプを決定
            if (complexityScore === 0) {
                return 'standard'; // 標準的なケース
            } else if (complexityScore <= 2) {
                return 'moderate'; // やや複雑
            } else if (complexityScore <= 4) {
                return 'complex'; // 複雑
            } else {
                return 'advanced'; // 高度な保護
            }
        }
        
        function displayResult(resultType) {
            const resultIcon = document.getElementById('resultIcon');
            const difficultyBadge = document.getElementById('difficultyBadge');
            const resultTitle = document.getElementById('resultTitle');
            const resultMessage = document.getElementById('resultMessage');
            const resultDetails = document.getElementById('resultDetails');
            
            switch(resultType) {
                case 'already-source':
                    resultIcon.textContent = '&#x1f4c4;';
                    difficultyBadge.textContent = '対応不要';
                    difficultyBadge.className = 'difficulty-badge easy';
                    resultTitle.textContent = 'すでにソースコードです！';
                    resultMessage.innerHTML = '.mq4ファイルはソースコードなので、デコンパイルの必要はありません。<br>そのまま編集・カスタマイズが可能です。';
                    resultDetails.innerHTML = `
                        <h4>&#x2705; 次のステップ</h4>
                        <ul>
                            <li>MetaEditorで直接編集できます</li>
                            <li>口座縛りの解除も容易に可能です</li>
                            <li>ロジックの修正・改良が自由にできます</li>
                        </ul>
                    `;
                    break;
                    
                case 'not-ex4':
                    resultIcon.textContent = '&#x2753;';
                    difficultyBadge.textContent = '要確認';
                    difficultyBadge.className = 'difficulty-badge medium';
                    resultTitle.textContent = 'ファイル形式の確認が必要です';
                    resultMessage.innerHTML = 'ex4ファイル以外の場合、デコンパイルサービスの対象外となる可能性があります。<br>まずはファイルをご確認ください。';
                    resultDetails.innerHTML = `
                        <h4>&#x1f4cb; 確認事項</h4>
                        <ul>
                            <li>ファイル拡張子が.ex4または.mq4か確認してください</li>
                            <li>MT4のエキスパートフォルダに配置できるファイルか確認してください</li>
                            <li>不明な場合はお問い合わせください</li>
                        </ul>
                    `;
                    break;
                    
                case 'standard':
                    resultIcon.textContent = '&#x2705;';
                    difficultyBadge.textContent = 'デコンパイル可能性: 高';
                    difficultyBadge.className = 'difficulty-badge easy';
                    resultTitle.textContent = 'デコンパイル可能です！';
                    resultMessage.innerHTML = '標準的な口座縛りのケースです。<br>デコンパイルと口座縛り解除が比較的スムーズに行える可能性が高いです。';
                    resultDetails.innerHTML = `
                        <h4>&#x2728; 期待できること</h4>
                        <ul>
                            <li>口座番号の制限を解除できます</li>
                            <li>ソースコードの取得が可能です</li>
                            <li>ロジックの確認・修正ができます</li>
                        </ul>
                    `;
                    break;
                    
                case 'moderate':
                    resultIcon.textContent = '&#x1f4a1;';
                    difficultyBadge.textContent = 'デコンパイル可能性: 中〜高';
                    difficultyBadge.className = 'difficulty-badge medium';
                    resultTitle.textContent = 'デコンパイル対応可能です';
                    resultMessage.innerHTML = 'やや複雑な保護が施されている可能性がありますが、<br>多くの場合デコンパイルと解析が可能です。';
                    resultDetails.innerHTML = `
                        <h4>&#x1f50d; 想定される内容</h4>
                        <ul>
                            <li>基本的な難読化への対応が必要</li>
                            <li>複数の認証ポイントの解除が必要な可能性</li>
                            <li>詳細な解析により対応可能</li>
                        </ul>
                    `;
                    break;
                    
                case 'complex':
                    resultIcon.textContent = '&#x1f527;';
                    difficultyBadge.textContent = 'デコンパイル可能性: 中';
                    difficultyBadge.className = 'difficulty-badge medium';
                    resultTitle.textContent = '高度な解析で対応可能です';
                    resultMessage.innerHTML = '複雑な保護が施されている可能性がありますが、<br>専門的な技術により対応できるケースが多くあります。';
                    resultDetails.innerHTML = `
                        <h4>&#x2699; 対応について</h4>
                        <ul>
                            <li>DLLや複雑な認証への対応が必要な可能性</li>
                            <li>詳細なファイル解析が必要です</li>
                            <li>実績のある技術で対応いたします</li>
                        </ul>
                    `;
                    break;
                    
                case 'advanced':
                    resultIcon.textContent = '&#x1f3af;';
                    difficultyBadge.textContent = '要詳細診断';
                    difficultyBadge.className = 'difficulty-badge advanced';
                    resultTitle.textContent = '詳細診断が必要です';
                    resultMessage.innerHTML = '高度な保護技術が使用されている可能性があります。<br>実際のファイルを解析して対応可否を判断させていただきます。';
                    resultDetails.innerHTML = `
                        <h4>&#x1f4ca; 次のステップ</h4>
                        <ul>
                            <li>まずは無料でファイル診断を行います</li>
                            <li>DLL解析やサーバー認証の回避技術を検討</li>
                            <li>複雑なケースでも対応実績があります</li>
                            <li>難易度に応じた見積もりをご提示します</li>
                        </ul>
                    `;
                    break;
            }
        }
    </script>
</body>
</html>




<p></p>



<p>ex4ファイルをGhidraで開いてみようと思った時点で、あなたはもう初心者ではない。</p>



<p>一般的なデコンパイルツールは試した。 コードらしきものも見た。 でも、そこから先に進めなかった。</p>



<p>だから、Ghidraに辿り着いた。</p>



<p>私はEX4デコンパイルを専門に扱うエンジニアとして、「Ghidraを使ってみたけど、結局どうすればいいのか分からない」という相談を何度も受けてきた。</p>



<p>結論から言うと、 <strong>Ghidraは確かに強力だが、それでもex4解析には固有の壁がある</strong>。</p>



<p>そして、それは技術力の問題ではない。 構造上の問題だ。</p>



<p><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/25b6.png" alt="▶" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <strong><a href="https://mt4decompile.com">デコンパイルはこちら</a></strong></p>



<h2 class="wp-block-heading">Ghidraでex4を開こうとしたときに起きること</h2>



<p>まず前提として、<strong><a href="https://github.com/NationalSecurityAgency/ghidra">Ghidra</a></strong>は汎用的なリバースエンジニアリングツールだ。</p>



<p>ELF、PE、Mach-O… さまざまなバイナリ形式に対応している。</p>



<p>だが、MT4のex4は、その「さまざま」の中に含まれていない。</p>



<h3 class="wp-block-heading">ex4は独自フォーマット</h3>



<p>ex4ファイルは、MetaQuotes社が独自に設計したバイトコード形式で構成されている。</p>



<p>つまり、</p>



<p>標準的なバイナリとは構造が違う。 命令セットも異なる。 セクション分割の概念も独自だ。</p>



<p>Ghidraにex4をそのまま放り込んでも、 「Unknown Format」と言われるか、 誤った形式として読み込まれるだけだ。</p>



<h3 class="wp-block-heading">カスタムローダーが必要になる</h3>



<p>Ghidraでex4を解析するには、<strong>カスタムローダー</strong>を用意する必要がある。</p>



<p>これは、</p>



<p>ex4のヘッダ構造を解釈し、 バイトコードをGhidraが理解できる形に変換し、 セクションやシンボルを適切に配置する。</p>



<p>そういう役割を持つスクリプトだ。</p>



<p>問題は、このローダーを書くには、 <strong>ex4の内部仕様を理解している必要がある</strong>ということ。</p>



<p>公式には公開されていない情報を、 逆算して組み立てることになる。</p>



<h2 class="wp-block-heading">ローダーを用意しても、次の壁がある</h2>



<p>仮にカスタムローダーを用意できたとする。</p>



<p>Ghidraにex4が読み込まれた。 逆アセンブル結果が表示された。</p>



<p>ここで、次の現実が待っている。</p>



<h3 class="wp-block-heading">シンボル情報は失われている</h3>



<p>元のソースコードにあった、</p>



<p>変数名 関数名 コメント 引数の意味</p>



<p>これらは、コンパイル時に消えている。</p>



<p>残っているのは、</p>



<p>メモリアドレス 命令列 制御フロー</p>



<p>それだけだ。</p>



<p>だから、Ghidraの画面には、 <code>FUN_00401234</code>とか<code>DAT_00405abc</code>とか、 そんな無機質な名前ばかりが並ぶ。</p>



<h3 class="wp-block-heading">逆コンパイル結果は「推測の塊」</h3>



<p>Ghidraには逆コンパイル機能がある。 アセンブリコードを、C言語風の擬似コードに変換してくれる。</p>



<p>でもこれ、実際に見ると分かるんだけど、 元のコードとは全然違う姿になってる。</p>



<p>たとえば、元のMQL4コードが、</p>



<pre class="wp-block-code"><code>if (OrdersTotal() &gt; 0) {
    CloseAllOrders();
}</code></pre>



<p>こんな感じだったとする。</p>



<p>でも、Ghidraで逆コンパイルすると、</p>



<pre class="wp-block-code"><code>if (iVar1 &gt; 0) {
    FUN_00401678();
}</code></pre>



<p>こうなる。</p>



<p>意味は何となく推測できる。 でも、<code>iVar1</code>が何なのか、<code>FUN_00401678()</code>が何をしてるのか、 それは<strong>文脈から推測するしかない</strong>。</p>



<p>元のロジックを正確に再現できるわけではない。</p>



<h2 class="wp-block-heading">MT4特有の構造が、話をさらにややこしくする</h2>



<p>ex4ファイルには、MT4特有の構造がある。 これが、Ghidraでの解析をさらに難しくする。</p>



<h3 class="wp-block-heading">外部関数呼び出しが「見えない」</h3>



<p>MT4では、<code>OrderSend()</code>とか<code>iMA()</code>とか<code>AccountBalance()</code>みたいな関数、 これ全部、MT4ランタイムが提供する外部関数なんだよね。</p>



<p>で、ex4の中には、 その<strong>呼び出し部分しか記録されていない</strong>。</p>



<p>だからGhidraで見ると、単なるアドレス呼び出しになってる。</p>



<p>どの関数を呼んでいるのか、 引数が何を意味しているのか、 それを推測するには、MT4の内部仕様を知っている必要がある。</p>



<p>しかもこの仕様、公式には公開されてない。</p>



<h3 class="wp-block-heading">インジケーター呼び出しも同じ</h3>



<p>カスタムインジケーターを使っている場合、 そのロジックはex4の中には含まれていない。</p>



<p>別のex4ファイルとして存在している。</p>



<p>Ghidraで解析できるのは、 「インジケーターを呼び出している」という事実だけ。</p>



<p>どんな計算をしているかは、 別途そのインジケーターも解析しないと分からない。</p>



<p>つまり、<strong>一つのEAを理解するために、複数のファイルを解析する必要がある</strong>。</p>



<p><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/25b6.png" alt="▶" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <strong><a href="https://mt4decompile.com">デコンパイルはこちら</a></strong></p>



<h2 class="wp-block-heading">難読化が入ると、もう別次元になる</h2>



<p>最近のEAには、難読化処理が施されていることが多い。</p>



<h3 class="wp-block-heading">制御フロー難読化</h3>



<p>無意味な分岐を大量に挿入し、 実際の処理の流れを見えにくくする。</p>



<p>Ghidraで制御フローグラフを表示しても、 <strong>迷路のような図</strong>が出てくるだけ。</p>



<p>どれが本当の処理で、 どれがダミーなのか、 判別するのに膨大な時間がかかる。</p>



<h3 class="wp-block-heading">データ難読化</h3>



<p>定数や文字列を暗号化し、 実行時に復号する。</p>



<p>Ghidraの静的解析では、 <strong>暗号化された状態のデータ</strong>しか見えない。</p>



<p>動的解析を組み合わせないと、 実際の値は分からない。</p>



<h3 class="wp-block-heading">アンチデバッグ</h3>



<p>デバッガの存在を検知して、 動作を変える仕組み。</p>



<p>Ghidraで解析しながら動かそうとすると、 EAが異常終了したり、 意図的に誤った動作をする。</p>



<p>こうなると、もう静的解析だけでは限界だ。</p>



<h2 class="wp-block-heading">Ghidraでできることと、できないこと</h2>



<p>ここまでの話を整理すると、</p>



<h3 class="wp-block-heading">Ghidraでできること</h3>



<p>構造を把握する 制御フローを可視化する 処理の大まかな流れを理解する 特定の関数の挙動を推測する</p>



<p>これらは可能だ。</p>



<p>特に、</p>



<p>「このEAがどういう設計思想で作られているか」 「どんな処理の順序で動いているか」</p>



<p>こういった<strong>全体像を掴む</strong>ことには向いている。</p>



<h3 class="wp-block-heading">Ghidraでできないこと</h3>



<p>元のソースコードを完全に復元する 変数名や関数名を復元する 難読化を自動で解除する 口座縛りやブローカー制御を取り除く</p>



<p>これらは、Ghidraだけでは無理だ。</p>



<p><strong>解析はできても、解除や再構築はできない</strong>。</p>



<h2 class="wp-block-heading">結局、Ghidraの先に何があるのか</h2>



<p>Ghidraを使い切った後に残る道は、実は多くない。</p>



<h3 class="wp-block-heading">学習として割り切る</h3>



<p>「構造が理解できた」 「設計思想が掴めた」</p>



<p>それで十分、という選択。</p>



<p>自分で一からEAを書き直すなら、 得られた知見は価値がある。</p>



<h3 class="wp-block-heading">完全に諦める</h3>



<p>「ここまでやっても無理だった」</p>



<p>その判断も、正しい。</p>



<p>時間とスキルを天秤にかけて、 引き返すのは健全な選択だ。</p>



<h3 class="wp-block-heading">再構築前提で切り替える</h3>



<p>「口座縛りを解除したい」 「自分の環境で動かしたい」 「元の挙動を維持したい」</p>



<p>この目的なら、 <strong>解析ではなく再構築</strong>が必要になる。</p>



<p>Ghidraで得た情報を元に、 同じ挙動を再現する形でコードを書き直す。</p>



<p>これが、最終的な到達点になることが多い。</p>



<p>このあたりの考え方については、以下の記事も参考になるかもしれない。</p>



<p>・<a href="https://mt4decompile.com/ea-decompile-detected">EAデコンパイル解除はバレる？依頼前に知っておくべき点</a><br>・<a href="https://mt4decompile.com/ea-decompile-illegal/">EAデコンパイル解除は違法か？依頼前に整理しておく考え方</a></p>



<h2 class="wp-block-heading">Ghidraを試した後に気づくこと</h2>



<p>Ghidraまで使った人は、 もう一度ツール探しに戻ることはほとんどない。</p>



<p>理由は明確だ。</p>



<p>ツールの限界を理解した ex4解析の本質的な難しさを見た 次に進むしかないと分かった</p>



<p>この状態になると、 選択は自然に決まる。</p>



<h2 class="wp-block-heading">技術的な興味と、実用目的は別</h2>



<p>もしあなたが、</p>



<p>「技術的にどこまでできるか試したい」 「リバースエンジニアリングを学びたい」</p>



<p>そう思っているなら、Ghidraは良い教材になる。</p>



<p>実際、私も最初はそうだった。</p>



<p>時間をかけて、 ex4の構造を調べ、 ローダーを書き、 逆アセンブル結果を眺めた。</p>



<p>それで得られた知見は、確かに価値があった。</p>



<p>だが、</p>



<p>「とにかく動かしたい」 「早く結果が欲しい」</p>



<p>そういう目的なら、 Ghidraに時間を使うのは現実的ではない。</p>



<h2 class="wp-block-heading">何を優先するかで、道は変わる</h2>



<p>技術を学びたいのか。 結果が欲しいのか。</p>



<p>それによって、選ぶべき道は違う。</p>



<p>Ghidraは強力だが、万能ではない。</p>



<p>ex4解析においては、 <strong>構造を理解するためのツール</strong>として使うのが、最も現実的だ。</p>



<p>その先に進むかどうかは、 あなたが何を求めているかによる。</p>



<h2 class="wp-block-heading">最終的に残る課題</h2>



<p>Ghidraでex4を解析しても、 最終的に残る課題がある。</p>



<p>MT4特有の構造 EA固有の設計思想 再構築前提の作り</p>



<p>これらは、 ツールだけでは解決しない。</p>



<p>人間が判断し、 設計を読み替え、 同じ挙動を再現する。</p>



<p>そういう作業が必要になる。</p>



<p>これは、力技ではない。 <strong>一番丁寧で、再現性の高いやり方</strong>だ。</p>



<p><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/25b6.png" alt="▶" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <strong><a href="https://mt4decompile.com">デコンパイルはこちら</a></strong></p>



<h2 class="wp-block-heading">まとめ｜Ghidraの先にあるもの</h2>



<p>Ghidraを使ったex4解析は、技術的には可能だが、完全な復元には至らない。</p>



<p>それは、</p>



<p>失敗ではない。 遠回りでもない。 現実的な到達点だ。</p>



<p>だからこそ、</p>



<p>解析を学習で終えるか。 再構築へ進むか。</p>



<p>この判断だけが残る。</p>



<p>静かに、 必要な人だけが次に進めばいい。</p>



<p></p>
<p>投稿 <a href="https://mt4decompile.com/ex4-decompile-ghidra/">Ghidraを使ったEX4解析の実態と、最終的に残る技術的な課題について</a> は <a href="https://mt4decompile.com">MT4解除研究所</a> に最初に表示されました。</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
