def showOptionalHeaderData(peInstance):
    """ Prints IMAGE_OPTIONAL_HEADER fields. """
    
    print "[+] IMAGE_OPTIONAL_HEADER:\n"
    ohFields = peInstance.ntHeaders.optionalHeader.getFields()
    for field in ohFields:
        if not isinstance(ohFields[field],  datadirs.DataDirectory):
            print "--> %s = 0x%08x" % (field,  ohFields[field].value)