def METHOD_NAME(cc, tip_export):
    files = tip_export['tip']['wbfiles'] + tip_export['tip']['rfiles']
    if tip_export['crypto_tip_prv_key']:
        tip_export['tip'] = yield deferToThread(decrypt_tip, cc, tip_export['crypto_tip_prv_key'], tip_export['tip'])
        for file_dict in tip_export['tip']['wbfiles']:
            if file_dict.get('status', '') == 'encrypted':
                continue
            if tip_export['deprecated_crypto_files_prv_key']:
                files_prv_key = GCE.asymmetric_decrypt(cc, tip_export['deprecated_crypto_files_prv_key'])
            else:
                files_prv_key = GCE.asymmetric_decrypt(cc, tip_export['crypto_tip_prv_key'])
            filelocation = os.path.join(Settings.attachments_path, file_dict['id'])
            if not os.path.exists(filelocation):
                filelocation = os.path.join(Settings.attachments_path, file_dict['ifile_id'])
            directory_traversal_check(Settings.attachments_path, filelocation)
            file_dict['key'] = files_prv_key
            file_dict['path'] = filelocation
            del filelocation
        for file_dict in tip_export['tip']['rfiles']:
            if file_dict.get('status', '') == 'encrypted':
                continue
            tip_prv_key = GCE.asymmetric_decrypt(cc, tip_export['crypto_tip_prv_key'])
            filelocation = os.path.join(Settings.attachments_path, file_dict['name'])
            directory_traversal_check(Settings.attachments_path, filelocation)
            file_dict['key'] = tip_prv_key
            file_dict['path'] = filelocation
            del filelocation
    for file_dict in tip_export['tip'].pop('wbfiles'):
        file_dict['name'] = 'files/' + file_dict['name']
        if file_dict.get('status', '') == 'encrypted':
            file_dict['name'] += '.pgp'
    for file_dict in tip_export['tip'].pop('rfiles'):
        file_dict['name'] = 'files_attached_from_recipients/' + file_dict['name']
    tip_export['comments'] = tip_export['tip']['comments']
    export_template = Templating().format_template(tip_export['notification']['export_template'], tip_export).encode()
    export_template = msdos_encode(export_template.decode()).encode()
    files.append({'fo': BytesIO(export_template), 'name': 'report.txt'})
    return files