求助蕾斯莱莉娅娜的炼金工房模型提取

steam国际服马上要停服了,想把模型提取出来,文件似乎是特殊加密的unity3d文件。

https://raw.githubusercontent.com/theBowja/resleriana-db/main/import/config.json
https://asset.resleriana.jp/asset/{fileassets_version}/StandaloneWindows64/catalog.json
密钥格式:bundleName-fileSize-hash-crc

SHA512对密钥进行两次哈希,第一次哈希取前32字节作为解密密钥,第二次哈希结果作为种子

def atelier(data: bytes, key: bytes, seed: bytes) -> bytes:

    try:
        state = bytearray(256)
        for i in range(256):
            state[i] = i
        
        j = 0
        for i in range(256):
            j = (j + state[i] + seed[i % len(seed)] + key[i % len(key)]) & 0xFF
            state[i], state[j] = state[j], state[i]
        
        result = bytearray(len(data))
        i = j = 0
        for k in range(len(data)):
            i = (i + 1) & 0xFF
            j = (j + state[i]) & 0xFF
            state[i], state[j] = state[j], state[i]
            t = (state[i] + state[j]) & 0xFF
            result[k] = data[k] ^ state[t]
        
        return bytes(result)
    except Exception:
        return None

不好意思,以前没解过这种类型的,能否提示下要怎么使用?