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