def amiitools_to_dump(internal):
    """Convert a 3DS/amiitools internal dump to the standard Amiibo/NTAG215
    dump format."""
    dump = bytearray(internal)
    dump[8:16] = internal[0:8]
    dump[128:160] = internal[8:40]
    dump[16:52] = internal[40:76]
    dump[160:520] = internal[76:436]
    dump[52:84] = internal[436:468]
    dump[0:8] = internal[468:476]
    dump[84:128] = internal[476:520]
    return dump
