Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Inspector Waffles

Featured Replies

  • Author
  • Localization

kurt28, posted Wed Apr 13, 2022 11:44 am (71102)


Hello,

The game has two files with texts and dialogues. It's encrypted.

https://drive.google.com/drive/folders/ ... sp=sharing

I have decompiled it with dnSpy and I found the method for decrypt the files.

Code:
// Token: 0x060001B3 RID: 435 RVA: 0x00023250 File Offset: 0x00021450
   public void InitImportDialog()
   {
      ImportController.allDialogs = new Dictionary();
      ImportController.monologueDialogs = new List();
      bool flag = true;
      string text = string.Empty;
      try
      {
         string text2 = "EN";
         if (PlayerPrefs.HasKey("Language"))
         {
            text2 = PlayerPrefs.GetString("Language");
         }
         if (text2 == "ME" || text2 == "WO")
         {
            text2 = "EN";
         }
         PlayerPrefs.SetString("Language", text2);
         text = Application.streamingAssetsPath "/Dialogs" text2 ".dat";
         XmlDocument xmlDocument = new XmlDocument();
         xmlDocument.LoadXml(this.Decrypt(File.ReadAllText(text)));
         foreach (object obj in xmlDocument.DocumentElement.SelectNodes("DialogText"))
         {
            XmlNode xmlNode = (XmlNode)obj;
            XmlElement xmlElement = xmlNode["KeyText"];
            XmlElement xmlElement2 = xmlNode["Text"];
            XmlElement xmlElement3 = xmlNode["Monologue"];
            if (xmlElement != null && xmlElement2 != null)
            {
               ImportController.allDialogs.Add(xmlElement.InnerText, xmlElement2.InnerText);
               if (xmlElement3 != null && xmlElement3.InnerText == "1")
               {
                  ImportController.monologueDialogs.Add(xmlElement.InnerText);
               }
            }
         }
         UITextLabelController[] array = Object.FindObjectsOfType();
         for (int i = 0; i          {
            array[i].UpdateText();
         }
         DecorController[] array2 = Object.FindObjectsOfType();
         for (int i = 0; i          {
            array2[i].UpdateText();
         }
         ExitController[] array3 = Object.FindObjectsOfType();
         for (int i = 0; i          {
            array3[i].UpdateText();
         }
      }
      catch (Exception)
      {
         Debug.Log(ImportController.allDialogs.Keys.ToList()[ImportController.allDialogs.Count - 1]);
         flag = false;
         this.textError.text = "Error in " text ": FILE CORRUPT OR NOT FOUND";
         this.textLoading.enabled = false;
      }
      if (flag && !this.isReloadingText)
      {
         base.StartCoroutine(this.LoadAsyncScene());
      }
      this.isReloadingText = false;
   }


// Token: 0x060001B2 RID: 434 RVA: 0x000231F4 File Offset: 0x000213F4
   public string Decrypt(string toDecrypt)
   {
      byte[] bytes = Encoding.UTF8.GetBytes("dsf85gfh485jkuy7f4865dfz456kyuk8");
      byte[] array = Convert.FromBase64String(toDecrypt);
      byte[] bytes2 = new RijndaelManaged
      {
         Key = bytes,
         Mode = CipherMode.ECB,
         Padding = PaddingMode.PKCS7
      }.CreateDecryptor().TransformFinalBlock(array, 0, array.Length);
      return Encoding.UTF8.GetString(bytes2);
   }


I had add a new line for save the decrypted text.

Image

I run the game and it saves a new file with decrypted text.

Image

I don't know how scritp a program for encrypt my translated text.
Can anybody help me? Thanks.
  • Author
  • Localization

spiritovod, posted Wed Apr 13, 2022 1:29 pm (71105)


You can use attached script to decrypt and encrypt those files, simply change first string to required value.

inspector_waffles_convert.bms

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.