/// <summary> /// 加密,照搬E语言 /// </summary> /// <param name="ProcessID">进程ID</param> /// <param name="Address">地址</param> /// <param name="Data">加密数据</param> /// <param name="DecryptionAdd">解密基址</param> public static void Encryption(int ProcessID, uint Address, int Data, uint DecryptionAdd) { //声明变量 int encryptionid, offsetpara, offsetadd, data, tailofadd, decryptadd, ax, si = 0; encryptionid = ReadWriteCtr.ReadMemInt(ProcessID, Address); decryptadd = ReadWriteCtr.ReadMemInt(ProcessID, DecryptionAdd); offsetpara = ReadWriteCtr.ReadMemInt(ProcessID, (uint)(decryptadd + (encryptionid >> 16) * 4 + 36)); offsetadd = offsetpara + (encryptionid & 65535) * 4 + 8468; offsetpara = ReadWriteCtr.ReadMemInt(ProcessID, (uint)offsetadd); data = offsetpara & 65535; data = data + (data << 16); ax = offsetpara & 65535; tailofadd = (int)Address & 15; switch (tailofadd) { case 0: si = Data >> 16; si = si - ax; si = si + Data; break; case 4: si = (Data & 65535) - (Data >> 16); break; case 8: si = Data >> 16; si = si * Data; break; case 12: si = Data >> 16; si = si + Data; si = si + ax; break; default: return; } ax = si ^ ax; byte[] temp = BitConverter.GetBytes(ax); ReadWriteCtr.WriteMemByteArray(ProcessID, (uint)(offsetadd + 2), temp, temp.Length); ReadWriteCtr.WriteMemInt(ProcessID, Address + 4, data ^ Data); }
/// <summary> /// Timer2:全屏吸物 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> public static void 全屏吸物() { int 人物地址; int 地图地址; int 对象数量; int Time = 0; int OBJ数据; int OBJ类型; int x; int y; int z; if (判断_游戏状态() == 3) { ReadWriteCtr.WriteMemInt(全局变量.进程ID, 基址.自动捡物, 1300955444); 人物地址 = ReadWriteCtr.ReadMemInt(全局变量.进程ID, 基址.人物基址); 地图地址 = ReadWriteCtr.ReadMemInt(全局变量.进程ID, (uint)(人物地址) + 基址.地图偏移); 对象数量 = (ReadWriteCtr.ReadMemInt(全局变量.进程ID, (uint)(地图地址 + 196)) - ReadWriteCtr.ReadMemInt(全局变量.进程ID, (uint)(地图地址 + 192))) / 4; for (int i = 1; i <= 对象数量; i++) { OBJ数据 = ReadWriteCtr.ReadMemInt(全局变量.进程ID, (uint)ReadWriteCtr.ReadMemInt(全局变量.进程ID, (uint)(地图地址 + 192)) + (uint)Time); Time = Time + 4; OBJ类型 = ReadWriteCtr.ReadMemInt(全局变量.进程ID, (uint)(OBJ数据 + 基址.类型偏移)); if (OBJ类型 == 289) { x = ReadWriteCtr.ReadMemInt(全局变量.进程ID, (uint)ReadWriteCtr.ReadMemInt(全局变量.进程ID, (uint)(人物地址 + 488)) + 0); y = ReadWriteCtr.ReadMemInt(全局变量.进程ID, (uint)ReadWriteCtr.ReadMemInt(全局变量.进程ID, (uint)(人物地址 + 488)) + 4); ReadWriteCtr.WriteMemInt(全局变量.进程ID, (uint)ReadWriteCtr.ReadMemInt(全局变量.进程ID, (uint)(OBJ数据 + 200)) + 16, x); ReadWriteCtr.WriteMemInt(全局变量.进程ID, (uint)ReadWriteCtr.ReadMemInt(全局变量.进程ID, (uint)(OBJ数据 + 200)) + 20, y); } } } else { return; } ReadWriteCtr.WriteMemInt(全局变量.进程ID, 基址.自动捡物, 1300959860); }
public static void 超级加密(int Address, int value, int type = 0) { int 加密ID = ReadWriteCtr.ReadMemInt(全局变量.进程ID, (uint)Address); int 偏移参数 = ReadWriteCtr.ReadMemInt(全局变量.进程ID, 基址.解密基址); 偏移参数 = ReadWriteCtr.ReadMemInt(全局变量.进程ID, (uint)(偏移参数 + (加密ID >> 16) * 4 + 36)); int 偏移地址 = 偏移参数 + (加密ID & 65535) * 4 + 8468; 偏移参数 = ReadWriteCtr.ReadMemInt(全局变量.进程ID, (uint)偏移地址); int data = 偏移参数 & 0xffff; data = data + (data << 16); short ax = (short)(偏移参数 & 0xffff); short si = 0; if (type == 0) { int 地址尾 = Address & 15; switch (地址尾) { case 0: si = (short)(value >> 16); si = (short)(si - ax); si = (short)(si + value); break; case 4: si = (short)((value & 0xFFFF) - (value >> 16));; break; case 8: si = (short)(value >> 16); si = (short)(si * value); break; case 12: si = (short)(value >> 16); si = (short)(si + value); si = (short)(si + ax); break; default: break; } } else if (type == 1) { si = (short)(value & 16); } else if (type == 2) { si = (short)value; } else if (type == 3) { si = (short)(value >> 16); si += (short)value; } else if (type == 4) { si = (short)(value >> 16); si = (short)(si + value & 0xFFFF); } ax = (short)(si ^ ax); byte[] temp = BitConverter.GetBytes(ax); ReadWriteCtr.WriteMemByteArray(全局变量.进程ID, (uint)(偏移地址 + 2), temp, temp.Length); data = data ^ value; int a = Address + (type != 4 ? 4 : 8); ReadWriteCtr.WriteMemInt(全局变量.进程ID, (uint)a, data); }