示例#1
0
 public Steam_16_3_1_Windows()
 {
     MemoryAddresses = new VersionMemoryAddresses();
     PersonEnum      = new VersionPersonEnumPointers();
     PersonOffsets   = new PersonVersionOffsets();
 }
 public Steam_16_3_1_Windows()
 {
     MemoryAddresses = new VersionMemoryAddresses();
     PersonEnum = new VersionPersonEnumPointers();
     PersonOffsets = new PersonVersionOffsets();
 }
		public Steam_14_3_0_Mac ()
		{
			MemoryAddresses = new VersionMemoryAddresses ();
			PersonEnum = new VersionPersonEnumPointers();
			PersonOffsets = new PersonVersionOffsets();
		}
		public Steam_16_2_0_Linux ()
		{
			MemoryAddresses = new VersionMemoryAddresses ();
			PersonEnum = new VersionPersonEnumPointers();
			PersonOffsets = new PersonVersionOffsets();
		}
示例#5
0
        private StaffMemoryAddressesWrapper GetPersonMemoryAddresses(int maxBufferSize)
        {
            object memAddrSyncroot = new object();

            IPersonVersionOffsets personOffsets = GameManager.Version.PersonOffsets;

            var memoryAddresses = new StaffMemoryAddressesWrapper();

            memoryAddresses.PlayerAddresses        = new List <int>();
            memoryAddresses.PlayerStaffAddresses   = new List <int>();
            memoryAddresses.HumanManagersAddresses = new List <int>();
            memoryAddresses.StaffAddresses         = new List <int>();

            List <int> addresses = GetMemoryAddresses(m => m.Person, m => m.Person);

            List <List <int> > memoryAddressBatches = SplitMemoryAddressesIntoBuffer(addresses);
            List <int>         unknownAddresses     = new List <int> ();

            foreach (var memoryBatch in memoryAddressBatches)
            {
                #if LINUX
                byte[] buffer = ProcessManager.ReadProcessMemory(memoryBatch.Min(), Convert.ToInt32(memoryBatch.Max() + 2000 - memoryBatch.Min()));
                #endif
                #if WINDOWS
                byte[] buffer = ProcessManager.ReadProcessMemory(memoryBatch.Min(), Convert.ToUInt32(memoryBatch.Max() + 2000 - memoryBatch.Min()));
                #endif
                                #if MAC
                byte[] buffer = ProcessManager.ReadProcessMemory(memoryBatch.Min(), Convert.ToInt32(memoryBatch.Max() + 2000 - memoryBatch.Min()));
                                #endif
                int lowestPointerInBatch = memoryBatch.Min();
                foreach (int memoryAddress in memoryBatch)
                {
                    //first 4 bytes contain the type
                    int type = ProcessManager.ReadInt32(buffer, memoryAddress + 0x0 - lowestPointerInBatch);
                    lock (memAddrSyncroot)
                    {
                        if (type == GameManager.Version.PersonEnum.Player)
                        {
                            memoryAddresses.PlayerAddresses.Add(memoryAddress);
                        }
                        else if (type == GameManager.Version.PersonEnum.Staff)
                        {
                            memoryAddresses.StaffAddresses.Add(memoryAddress);
                        }
                        else if (type == GameManager.Version.PersonEnum.HumanManager)
                        {
                            memoryAddresses.HumanManagersAddresses.Add(memoryAddress);
                        }
                        else if (type == GameManager.Version.PersonEnum.PlayerStaff)
                        {
                            memoryAddresses.PlayerStaffAddresses.Add(memoryAddress);
                        }
                        else
                        {
                            // Dump it
                            if (unknownAddresses.IndexOf(type) < 0 && type > 0x0)
                            {
                                int personID = ProcessManager.ReadInt32(buffer, memoryAddress + 0x8 - lowestPointerInBatch);
                                Debug.WriteLine("Found Unknown Person Type: {0:X} @ 0x{1:X} with ID: {2}", type, memoryAddress, personID);
                                unknownAddresses.Add(type);
                            }
                        }
                    }
                }
            }

            return(memoryAddresses);
        }
 public Steam_14_3_0_Linux()
 {
     MemoryAddresses = new VersionMemoryAddresses();
     PersonEnum      = new VersionPersonEnumPointers();
     PersonOffsets   = new PersonVersionOffsets();
 }
示例#7
0
 public Steam_15_3_2_Mac()
 {
     MemoryAddresses = new VersionMemoryAddresses();
     PersonEnum      = new VersionPersonEnumPointers();
     PersonOffsets   = new PersonVersionOffsets();
 }