def METHOD_NAME(data, key):
    # NOTE: This appears to be an implementation mistake on the Spelunky 2 dev's part
    # They generate a quad_round advanced version of (nonce'd key), but then they
    # xor with the untweaked key instead of the tweaked key...
    out = b""
    if len(data) >= 0x40:
        blocks = len(data) // 0x40
        out += sxor(data, key[::-1] * blocks)
        data = data[blocks * 0x40 :]
    if len(data) > 0:
        out += sxor(data, key[: len(data)][::-1])
    return out