예제 #1
0
        static void Main(string[] args)
        {
            String[]      UnpackedAssetPaths = Directory.GetDirectories(Directory.GetCurrentDirectory());
            EndianWriter  Writer             = new EndianWriter(File.Open("!MKTRT_A_out.txt", FileMode.Create), Endianness.BigEndian);
            List <String> HashList           = new List <String>();

            for (int i = 0; i < UnpackedAssetPaths.Length; i++)
            {
                if (Path.GetFileName(UnpackedAssetPaths[i]).EndsWith("_unpacked") && !HashList.Contains(Path.GetFileName(UnpackedAssetPaths[i]).Split('_')[1]))
                {
                    Writer.WriteString(Path.GetFileName(UnpackedAssetPaths[i]).Split('_')[1] + "=");
                    String[] AssetBundleFiles = Directory.GetFiles(UnpackedAssetPaths[i]);
                    String   FileName         = "";
                    for (int j = 0; j < AssetBundleFiles.Length; j++)
                    {
                        if (Path.GetFileName(AssetBundleFiles[j]).StartsWith("CAB-") && !Path.GetFileName(AssetBundleFiles[j]).EndsWith(".resS"))
                        {
                            FileName = FindString(AssetBundleFiles[j], new byte[] { 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2F });
                        }
                        else if (Path.GetFileName(AssetBundleFiles[j]).EndsWith(".sharedAssets"))
                        {
                            FileName = FindString(AssetBundleFiles[j], new byte[] { 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2F });
                        }
                    }
                    Console.WriteLine(FileName);
                    Writer.WriteString(FileName + "\r\n");
                    HashList.Add(Path.GetFileName(UnpackedAssetPaths[i]).Split('_')[1]);
                }
            }
            Writer.Close();
        }