public static string ReadDString(Process p, IntPtr stringAddress)
		{
			uint stringLength = p.Read<uint>(stringAddress);
			var firstChar = p.Read<IntPtr>(stringAddress + 4);

			return p.ReadString(firstChar, Encoding.UTF8, (int)stringLength);
		}
		public static void FreeDString(Process p, IntPtr stringAddress)
		{
			uint stringLength = p.Read<uint>(stringAddress);
			var firstChar = p.Read<IntPtr>(stringAddress + 4);

			if (stringLength != 0)
				p.Free(firstChar, stringLength);
		}
Ejemplo n.º 3
0
        static void Send2(Process process, CONTEXT context)
        {
            var ptr = process.Read<IntPtr>(new IntPtr(context.Esp + Offsets.Send_ds));
            var dataStore  = process.Read<CDataStore>(ptr);
            var packet     = process.ReadBytes(dataStore.buffer, dataStore.size);
            var connection = process.Read<int>(new IntPtr(context.Esp + Offsets.Send_ds + 4));

            lock (lockObject)
            {
                DumpPacket(Direction.CMSG, connection, packet);
            }
        }