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: Select all
// Token: 0x060001B3 RID: 435 RVA: 0x00023250 File Offset: 0x00021450
public void InitImportDialog()
{
ImportController.allDialogs = new Dictionary<string, string>();
ImportController.monologueDialogs = new List<string>();
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<UITextLabelController>();
for (int i = 0; i < array.Length; i++)
{
array[i].UpdateText();
}
DecorController[] array2 = Object.FindObjectsOfType<DecorController>();
for (int i = 0; i < array2.Length; i++)
{
array2[i].UpdateText();
}
ExitController[] array3 = Object.FindObjectsOfType<ExitController>();
for (int i = 0; i < array3.Length; i++)
{
array3[i].UpdateText();
}
}
catch (Exception)
{
Debug.Log(ImportController.allDialogs.Keys.ToList<string>()[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.
I run the game and it saves a new file with decrypted text.
I don't know how scritp a program for encrypt my translated text.
Can anybody help me? Thanks.