<section id="static_analysis">
    {% if analysis.static %}
        {% if analysis.static.pe_timestamp %}
            <div>
                <h4><span class="glyphicon glyphicon-time" aria-hidden="true"></span> PE Compile Time</h4>
                <div class="well">{{analysis.static.pe_timestamp}}</div>
            </div>
            <hr />
        {% endif %}
        {% if analysis.static.pdb_path %}
            <div>
                <h4>PDB Path</h4>
                <div class="well">{{analysis.static.pdb_path}}</div>
            </div>
        {% endif %}
        {% if analysis.static.pe_imphash %}
            <div>
                <h4>PE Imphash</h4>
                <div class="well">{{analysis.static.pe_imphash}}</div>
            </div>
            <hr />
        {% endif %}
        {% if analysis.static.signature %}
            <div>
                <h4>Signing Certificate</h4>
                <div id="pe_signature">
                    {% for cert in analysis.static.signature %}
                    <table class="table table-striped table-bordered">
                        <colgroup>
                            <col width="150" />
                            <col width="*" />
                        </colgroup>
                        <tr>
                            <th>MD5</th>
                            <td>{{cert.md5}}</td>
                        </tr>
                        <tr>
                            <th>SHA1</th>
                            <td>{{cert.sha1}}</td>
                        </tr>
                        <tr>
                            <th>Serial Number</th>
                            <td>{{cert.serial_number}}</td>
                        </tr>
                        <tr>
                            <th>Common Name</th>
                            <td>{{cert.common_name}}</td>
                        </tr>
                        <tr>
                            <th>Country</th>
                            <td>{{cert.country}}</td>
                        </tr>
                        <tr>
                            <th>Locality</th>
                            <td>{{cert.locality}}</td>
                        </tr>
                    </table>
                    {% endfor %}
                </div>
            </div>
            <hr />
        {% endif %}
        {% if analysis.static.pe_versioninfo %}
            <div>
                <h4>Version Infos</h4>
                <div id="pe_versioninfo">
                    <table class="table table-striped table-bordered">
                        <colgroup>
                            <col width="150" />
                            <col width="*" />
                        </colgroup>
                        {% for info in analysis.static.pe_versioninfo %}
                            <tr>
                                <th>{{info.name}}</th>
                                <td><span class="mono">{{info.value}}</span></td>
                            </tr>
                        {% endfor %}
                    </table>
                </div>
            </div>
            <hr />
        {% endif %}
        {% if analysis.static.peid_signatures %}
            <div>
                <h4>PEiD Signatures</h4>
                <div id="peid_signatures">
                    <table class="table table-striped table-bordered">
                    {% for sig in analysis.static.peid_signatures %}
                        <tr><td>{{sig}}</td></tr>
                    {% endfor %}
                    </table>
                </div>
            </div>
            <hr />
        {% endif %}
        {% if analysis.static.pe_sections %}
            <div>
                <h4>Sections</h4>
                <div id="pe_sections">
                    <table class="table table-striped table-bordered">
                        <tr>
                            <th>Name</th>
                            <th>Virtual Address</th>
                            <th>Virtual Size</th>
                            <th>Size of Raw Data</th>
                            <th>Entropy</th>
                        </tr>
                        {% for section in analysis.static.pe_sections %}
                            <tr>
                                <td>{{section.name}}</td>
                                <td>{{section.virtual_address}}</td>
                                <td>{{section.virtual_size}}</td>
                                <td>{{section.size_of_data}}</td>
                                <td>{{section.entropy}}</td>
                            </tr>
                        {% endfor %}
                    </table>
                </div>
            </div>
            <hr />
        {% endif %}

        {% if analysis.static.pe_resources %}
            <div>
                <h4>Resources</h4>
                <div id="pe_resources">
                    <table class="table table-striped table-bordered">
                        <tr>
                            <th>Name</th>
                            <th>Offset</th>
                            <th>Size</th>
                            <th>Language</th>
                            <th>Sub-language</th>
                            <th>File type</th>
                        </tr>
                        {% for section in analysis.static.pe_resources %}
                            <tr>
                                <td>{{section.name}}</td>
                                <td>{{section.offset}}</td>
                                <td>{{section.size}}</td>
                                <td>{{section.language}}</td>
                                <td>{{section.sublanguage}}</td>
                                <td>{{section.filetype}}</td>
                            </tr>
                        {% endfor %}
                    </table>
                </div>
            </div>
            <hr />
        {% endif %}

        {% if analysis.static.pe_imports %}
            <div>
                <h4>Imports</h4>
                <div id="pe_imports">
                    {% for library in analysis.static.pe_imports %}
                        <div class="well">
                            <div><strong>Library {{library.dll}}</strong>:</div>
                            {% for function in library.imports %}
                                <div>&bull; <span class="mono">{{function.address}} <a href="http://social.msdn.microsoft.com/Search/en-US/windows/desktop?query={{function.name}}">{{function.name}}</a></span></div>
                            {% endfor %}
                        </div>
                    {% endfor %}
                </div>
            </div>
            <hr />
        {% endif %}

        {% if analysis.static.pe_exports %}
            <div>
                <h4>Exports</h4>
                <div id="pe_exports">
                    <table class="table table-striped table-bordered">
                        <tr>
                            <th>Ordinal</th>
                            <th>Address</th>
                            <th>Name</th>
                        </tr>
                        {% for export in analysis.static.pe_exports %}
                            <tr>
                                <td>{{export.ordinal}}</td>
                                <td>{{export.address}}</td>
                                <td>{{export.name}}</td>
                            </tr>
                        {% endfor %}
                    </table>
                </div>
            </div>
        {% endif %}
    {% else %}
        Nothing to display.
    {% endif %}
</section>
