Hi guys)
You were right)))
the first tool (
only "Interface.zpk") - unpacks the archive (
not decrypted!)
https://mega.nz/#!GJE0UISK!XQ8Lf18gh...2hJp7Q1vH1d0BM
decryption - needed keys (as they are calculated, i will show below)
1. each file is encrypted with keys (piece = length of the file is divided by 5)
2. each piece file (length of the file is divided by 5) have a unique key (encryption = simple xor)
3. the first key is generated from the file name (the other keys are calculated from the first key)
4. The calculation of the keys:
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace decr_xpk
{
class Program
{
static void Main(string[] args)
{
var ebx = 0x00;
string test = "MyGUI_Core.xml";
string up = test.ToUpper();
Console.WriteLine(up);
byte[] array = Encoding.UTF8.GetBytes(up);
// search key1 (crazy Chinese developers ))) )
for (int s = 0; s <= array.Length-1; s++ )
{
var t = array[s] * 0x7e79 + 0x2531abf;
var t1 = t / 0x78fa;
var tail = t % 0x78fa;
var x = tail ^ array[s];
ebx = ebx ^ x;
Console.WriteLine(Convert.ToChar(array[s]) + ": t=" + t + " " + "t1=" + t1 + " " + "tail=" + tail + " " + "x=" + x + " " + "ebx=" + ebx);
}
Console.WriteLine();
Console.WriteLine("first XOR key = low byte last ebx (" + ebx + " [dec], "+ ebx.ToString("X2")+" [hex])");
Console.WriteLine("select the low byte...");
byte key1 = (byte)(ebx & 0xff);
Console.WriteLine("First key = " + Convert.ToInt32(key1) + " (Hex = 0x" + key1.ToString("X2") + ")");
// search key2
var t_1 = ebx * 0x7888 + 0x252341ab;
var t1_1 = t_1 / 0x7f63;
var tail_1 = t_1 % 0x7f63;
ebx = ebx ^ tail_1;
Console.WriteLine();
Console.WriteLine("second XOR key = low byte ebx (" + ebx + " [dec], " + ebx.ToString("X2") + " [hex])");
Console.WriteLine("select the low byte...");
byte key2 = (byte)(ebx & 0xff);
Console.WriteLine("Second key = " + Convert.ToInt32(key2) + " (Hex = 0x" + key2.ToString("X2") + ")");
// search key3
var t_2 = ebx * 0x7888 + 0x252341ab;
var t1_2 = t_2 / 0x7f63;
var tail_2 = t_2 % 0x7f63;
ebx = ebx ^ tail_2;
Console.WriteLine();
Console.WriteLine("third XOR key = low byte ebx (" + ebx + " [dec], " + ebx.ToString("X2") + " [hex])");
Console.WriteLine("select the low byte...");
byte key3 = (byte)(ebx & 0xff);
Console.WriteLine("Third key = " + Convert.ToInt32(key3) + " (Hex = 0x" + key3.ToString("X2") + ")");
//search keyNNNN
Console.WriteLine();
Console.WriteLine("search keyNNNN");
Console.WriteLine("see ^^ (key2 and key3)");
Console.ReadKey();
}
}
}
https://mega.nz/#!WE8XWRwZ!8086Zpcrp...uujKM6V_2yBLJs
(I deliberately did not do loops ("for" and etc. ) that would be easier to understand
can simplify the code (this code is very bad))))
p/s/ I have a little free time (sorry))