QiShan OL Full Source code+Server+Client+Databse+Tools

Joined
Aug 14, 2009
Messages
2,304
Reaction score
1,189
Tool to "decode" QSI

(Old)
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using System.IO;

public class Program
{
	public static void Main(string[] args)
	{
		if(args.Length == 0)
		{
			var filePath = "../QiShan/CONFIG/1000.qsi";
			var textFile = DecodeFile(filePath);
			File.WriteAllText(filePath.Substring(0, filePath.Length - 4) + ".ini", textFile); // Remove .qsi
		}else{
			if(args[0] == "-d" && args.Length == 2)
			{
				var filePaths = Directory.EnumerateFiles(args[1], "*.qsi");
				foreach(var filePath in filePaths)
				{
					var textFile = DecodeFile(filePath);
					File.WriteAllText(filePath.Substring(0, filePath.Length - 4) + ".ini", textFile); // Remove .qsi
				}
			}else{
				var filePath = args[0];
				if(Path.GetExtension(filePath) != ".qsi")
					return;
				var textFile = DecodeFile(filePath);
				File.WriteAllText(filePath.Substring(0, filePath.Length - 4) + ".ini", textFile); // Remove .qsi
			}
		}
	}
	
	public static string DecodeFile(string filePath)
	{
		var data = File.ReadAllBytes(filePath);
		for(int i = 0; i < data.Length; i++)
		{
			if((i & 0x01) == 1)
				data[i] ^= 0x55;
			else
				data[i] ^= 0x62;
		}
		System.Text.Encoding gb2312 = System.Text.Encoding.GetEncoding("GB2312");
		return gb2312.GetString(data);
	}
}
 
Last edited:
Newbie Spellweaver
Joined
Aug 28, 2006
Messages
31
Reaction score
7
Hi, I've managed to compile almost everything, but have faced problems to launch WorldBuilder.exe. Basically problem is something with CSALocker(CRITICAL_SECTION& csAccess). Can anyone give the idea how to fix that?
 
Junior Spellweaver
Joined
Jul 15, 2016
Messages
144
Reaction score
25
Hi, I've managed to compile almost everything, but have faced problems to launch WorldBuilder.exe. Basically problem is something with CSALocker(CRITICAL_SECTION& csAccess). Can anyone give the idea how to fix that?


Need Help
Still unable to build project
Pls make a video on how to this build project