马赛克加密图像(?)怎么还原

这类加密叫什么?要怎么还原?讨论里找到有个类似的 但看不懂,gaps也安了半天 也没成功。

还有有个名字一样的 json 但可能没啥用

{
“m_GameObject”: {
“m_FileID”: 0,
“m_PathID”: 0
},
“m_Enabled”: 1,
“m_Script”: {
“m_FileID”: 0,
“m_PathID”: -3584093745247497500
},
“m_Name”: “HCG01”,
“sprites”: [
{
“m_FileID”: 0,
“m_PathID”: 5491144197651699679
},
{
“m_FileID”: 0,
“m_PathID”: -3486455137156196385
},
{
“m_FileID”: 0,
“m_PathID”: -6160318668253620257
},
{
“m_FileID”: 0,
“m_PathID”: -5829178530022352929
},
{
“m_FileID”: 0,
“m_PathID”: -9135585170912962593
},
{
“m_FileID”: 0,
“m_PathID”: 8819212572649986015
},
{
“m_FileID”: 0,
“m_PathID”: 8717627323120883679
},
{
“m_FileID”: 0,
“m_PathID”: 1307412438604060639
},
{
“m_FileID”: 0,
“m_PathID”: 1605781838254512095
},
{
“m_FileID”: 0,
“m_PathID”: -7422843871619049505
},
{
“m_FileID”: 0,
“m_PathID”: -29067652457621537
},
{
“m_FileID”: 0,
“m_PathID”: 5288441916552976351
}
],
“textures”: [
{
“m_FileID”: 1,
“m_PathID”: 2897724694557932984
}
]
}

试试这个看看。

之前看了 看不懂 那个mono打包的代码抄都不太会抄,

使用dnspy进行修改,以下方法不支持动图

NewAssembly.-.CGCell.SetData()

public async void SetData(CGUnlockTable cgUnlockTable, bool setTrigger = false)
{
this.currentCGUnlockTable = cgUnlockTable;
string value = cgUnlockTable.Value;
bool flag = OdinGlobalConfig.Instance.CheckAllCgUnlocked() || this.playerDataService.IsNaniHasRead(value);
this.button.interactable = flag;
this.storyBtn.interactable = flag;
Sprite sprite = await this.MainImageAddress();
this.mainImage.sprite = sprite;
if (sprite != null)
{
try
{
string saveDir = Path.Combine(Directory.GetCurrentDirectory(), “Extracted_CGs”);
if (!Directory.Exists(saveDir))
{
Directory.CreateDirectory(saveDir);
}
Vector2 verts = sprite.vertices;
float minX = float.MaxValue;
float minY = float.MaxValue;
float maxX = float.MinValue;
float maxY = float.MinValue;
foreach (Vector2 v2 in verts)
{
if (v2.x < minX)
{
minX = v2.x;
}
if (v2.y < minY)
{
minY = v2.y;
}
if (v2.x > maxX)
{
maxX = v2.x;
}
if (v2.y > maxY)
{
maxY = v2.y;
}
}
int width = Mathf.CeilToInt((maxX - minX) * sprite.pixelsPerUnit);
int height = Mathf.CeilToInt((maxY - minY) * sprite.pixelsPerUnit);
RenderTexture rt = RenderTexture.GetTemporary(width, height, 0, RenderTextureFormat.ARGB32);
Mesh mesh = new Mesh();
mesh.SetVertices(verts.Select((Vector2 v) => v).ToList());
mesh.SetUVs(0, sprite.uv);
mesh.SetTriangles(sprite.triangles, 0, true, 0);
Material material = new Material(Shader.Find(“Sprites/Default”));
material.mainTexture = sprite.texture;
float halfW = (maxX - minX) / 2f;
float halfH = (maxY - minY) / 2f;
Matrix4x4 matrix4x = Matrix4x4.Ortho(-halfW, halfW, -halfH, halfH, 0f, 100f);
Graphics.SetRenderTarget(rt);
GL.Clear(true, true, Color.clear);
GL.PushMatrix();
GL.LoadProjectionMatrix(matrix4x);
material.SetPass(0);
Vector3 pos = new Vector3(-(maxX + minX) / 2f, -(maxY + minY) / 2f, 0f);
Graphics.DrawMeshNow(mesh, pos, Quaternion.identity);
GL.PopMatrix();
Texture2D finalTex = new Texture2D(width, height, TextureFormat.RGBA32, false);
finalTex.ReadPixels(new Rect(0f, 0f, (float)width, (float)height), 0, 0);
finalTex.Apply();
File.WriteAllBytes(Path.Combine(saveDir, this.currentCGUnlockTable.NaniID + “.png”), finalTex.EncodeToPNG());
RenderTexture.ReleaseTemporary(rt);
global::UnityEngine.Object.Destroy(mesh);
global::UnityEngine.Object.Destroy(material);
global::UnityEngine.Object.Destroy(finalTex);
}
catch (Exception ex)
{
Debug.LogError("error: " + ex.Message);
}
}
this.mainImage.useSpriteMesh = cgUnlockTable.GalleryType == GalleryType.DiceSprite;
if (setTrigger)
{
this.animator.SetTrigger(“Show”);
}
}

NewAssembly.-.CGDetail.GetAllCG()

private async UniTask GetAllCG()
{
List result = new List();
if (this.cgUnlockTable != null)
{
GalleryType galleryType = this.cgUnlockTable.GalleryType;
List list;
if (galleryType != GalleryType.DiceSprite)
{
if (galleryType != GalleryType.Sprite)
{
goto IL_0234;
}
}
else
{
string text = “Naninovel/Backgrounds/” + this.cgUnlockTable.NaniID;
DicedSpriteAtlas dicedSpriteAtlas = await this.preloadService.Get(text);
list = this.cgUnlockTable.ImageStrings();
using (List.Enumerator enumerator = list.GetEnumerator())
{
while (enumerator.MoveNext())
{
string text4 = enumerator.Current;
result.Add(dicedSpriteAtlas.GetSprite(text4));
}
goto IL_0234;
}
}
list = this.cgUnlockTable.ImageStrings();
foreach (string text2 in list)
{
string text3 = “Naninovel/Backgrounds/” + this.cgUnlockTable.NaniID + “/” + text2;
List list2 = result;
list2.Add(await this.preloadService.Get(text3));
list2 = null;
}
List.Enumerator enumerator2 = default(List.Enumerator);
}
IL_0234:
try
{
string saveDir = Path.Combine(Directory.GetCurrentDirectory(), “Extracted_CGs”);
if (!Directory.Exists(saveDir))
{
Directory.CreateDirectory(saveDir);
}
foreach (Sprite sprite in result)
{
if (!(sprite == null))
{
Vector2 verts = sprite.vertices;
float minX = float.MaxValue;
float minY = float.MaxValue;
float maxX = float.MinValue;
float maxY = float.MinValue;
foreach (Vector2 v2 in verts)
{
if (v2.x < minX)
{
minX = v2.x;
}
if (v2.y < minY)
{
minY = v2.y;
}
if (v2.x > maxX)
{
maxX = v2.x;
}
if (v2.y > maxY)
{
maxY = v2.y;
}
}
int width = Mathf.CeilToInt((maxX - minX) * sprite.pixelsPerUnit);
int height = Mathf.CeilToInt((maxY - minY) * sprite.pixelsPerUnit);
RenderTexture rt = RenderTexture.GetTemporary(width, height, 0, RenderTextureFormat.ARGB32);
Mesh mesh = new Mesh();
mesh.SetVertices(verts.Select((Vector2 v) => v).ToList());
mesh.SetUVs(0, sprite.uv);
mesh.SetTriangles(sprite.triangles, 0, true, 0);
Material material = new Material(Shader.Find(“Sprites/Default”));
material.mainTexture = sprite.texture;
Matrix4x4 matrix4x = Matrix4x4.Ortho(-(maxX - minX) / 2f, (maxX - minX) / 2f, -(maxY - minY) / 2f, (maxY - minY) / 2f, 0f, 100f);
Graphics.SetRenderTarget(rt);
GL.Clear(true, true, Color.clear);
GL.PushMatrix();
GL.LoadProjectionMatrix(matrix4x);
material.SetPass(0);
Vector3 pos = new Vector3(-(maxX + minX) / 2f, -(maxY + minY) / 2f, 0f);
Graphics.DrawMeshNow(mesh, pos, Quaternion.identity);
GL.PopMatrix();
Texture2D finalTex = new Texture2D(width, height, TextureFormat.RGBA32, false);
finalTex.ReadPixels(new Rect(0f, 0f, (float)width, (float)height), 0, 0);
finalTex.Apply();
File.WriteAllBytes(Path.Combine(saveDir, sprite.name + “.png”), finalTex.EncodeToPNG());
RenderTexture.ReleaseTemporary(rt);
global::UnityEngine.Object.Destroy(mesh);
global::UnityEngine.Object.Destroy(material);
global::UnityEngine.Object.Destroy(finalTex);
}
}
}
catch (Exception ex)
{
Debug.LogError("error: " + ex.Message);
}
return result;
}

大佬发的 但是看不懂 软件下了 找不到那啥cgcell文件