コード例 #1
0
ファイル: Class1.cs プロジェクト: Techlord-RCE/memory.dll
        public IntPtr AoBScan(uint min, int length, string code, string file = "")
        {
            string[] stringByteArray = LoadCode(code, file).Split(' ');
            byte[]   myPattern       = new byte[stringByteArray.Length];
            string   mask            = "";
            int      i = 0;

            foreach (string ba in stringByteArray)
            {
                if (ba == "??")
                {
                    myPattern[i] = 0xFF;
                    mask        += "?";
                }
                else
                {
                    myPattern[i] = Byte.Parse(ba, NumberStyles.HexNumber);
                    mask        += "x";
                }
                i++;
            }
            SigScan _sigScan = new SigScan(procs, new UIntPtr(min), length);
            IntPtr  pAddr    = _sigScan.FindPattern(myPattern, mask, 0);

            return(pAddr);
        }
コード例 #2
0
ファイル: bufferByte.cs プロジェクト: Lufzy/CSGO-ESP
        public static int ScanPattern(string mModuleName, string mPattern, int Offset = 0, int Extra = 0, bool ModuleSubract = false)
        {
            IntPtr        hProcess       = m_iProcess.Handle;
            ProcessModule SelectedModule = null;

            foreach (ProcessModule module in m_iProcess.Modules)
            {
                if (Path.GetFileName(module.FileName) == mModuleName)
                {
                    SelectedModule = module;
                }
            }
            if (SelectedModule == null)
            {
                throw new Exception("Selected Module is Null !");
            }
            var scanner = new SigScan(hProcess);

            scanner.SelectModule(SelectedModule.BaseAddress, SelectedModule.ModuleMemorySize);
            int Scaned = (int)scanner.FindPattern(mPattern, out long time);

            if (Scaned != 0)
            {
                var Scan = BitConverter.ToInt32(Read(Scaned + Offset, 4), 0) + Extra;
                if (ModuleSubract)
                {
                    Scan -= (Int32)SelectedModule.BaseAddress;
                }
                return(Scan);
            }
            else
            {
                return(0);
            }
        }
コード例 #3
0
ファイル: Patcher.cs プロジェクト: thawk0128/FortniteLauncher
        public Patcher(Process fnProcess)
        {
            _fnProcess = fnProcess;
            _fnHandle  = Win32.OpenProcess(Win32.PROCESS_ALL_ACCESS, false, _fnProcess.Id);
            _sigScan   = new SigScan(_fnHandle);

            _sigScan.SelectModule(_fnProcess.MainModule);

            PrefetchAddresses();
        }
コード例 #4
0
        public unsafe void OnVehicleChange(Entity newVehicle)
        {
            GTA.UI.Screen.ShowNotification("ADD: " + new IntPtr(newVehicle.MemoryAddress));

            var scan = new SigScan(Process.GetProcessesByName("GTA5")[0], new IntPtr(newVehicle.MemoryAddress), MAX_VEHICLE_LEN);

            scan.DumpMemory();

            LastEntityMemory = scan.GetDumpedMemory();
        }
コード例 #5
0
        public unsafe void RedumpMemory()
        {
            var add = new IntPtr(Entity.MemoryAddress);

            var scanner = new SigScan(Process.GetProcessesByName("GTA5")[0], add, MemorySize);

            scanner.DumpMemory();

            _entityMemory = scanner.GetDumpedMemory();
        }
コード例 #6
0
ファイル: Offsets.cs プロジェクト: KraskoBE/Silent-Evil
        public void Update(Process proc, int ClientBase, int ClientSize, int EngineBase, int EngineSize)
        {
            ProcessMemory Mem = new ProcessMemory(proc.Id);

            Mem.StartProcess();

            SigScan ClientScan = new SigScan(proc, new IntPtr(ClientBase), ClientSize);
            SigScan EngineScan = new SigScan(proc, new IntPtr(EngineBase), EngineSize);

            IntPtr ptr = ClientScan.FindPattern(new byte[] { 0x05, 0x00, 0x00, 0x00, 0x00, 0xC1, 0xE9, 0x00, 0x39, 0x48, 0x04 }, "x????xx?xxx", 0);
            int    p1  = Mem.ReadInt((int)ptr + 1);
            byte   p2  = Mem.ReadByte((int)ptr + 7);

            m_dwEntityList = (p1 + p2) - ClientBase;

            ptr             = ClientScan.FindPattern(new byte[] { 0x8D, 0x34, 0x85, 0x00, 0x00, 0x00, 0x00, 0x89, 0x15, 0x00, 0x00, 0x00, 0x00, 0x8B, 0x41, 0x08, 0x8B, 0x48, 0x00 }, "xxx????xx????xxxxx?", 0);
            p1              = Mem.ReadInt((int)ptr + 3);
            p2              = Mem.ReadByte((int)ptr + 18);
            m_dwLocalPlayer = (p1 + p2) - ClientBase;

            ptr            = ClientScan.FindPattern(new byte[] { 0xF3, 0x0F, 0x6F, 0x05, 0x00, 0x00, 0x00, 0x00, 0x8D, 0x85 }, "xxxx????xx", 0);
            p1             = Mem.ReadInt((int)ptr + 4) + 0xB0;
            m_dwViewMatrix = p1 - ClientBase;

            ptr            = ClientScan.FindPattern(new byte[] { 0xA1, 0x00, 0x00, 0x00, 0x00, 0xA8, 0x01, 0x75, 0x00, 0x0F, 0x57, 0xC0, 0xC7, 0x05 }, "x????xxx?xxxxx", 0);
            m_dwGlowObject = Mem.ReadInt((int)ptr + 0x58) - ClientBase;

            ptr           = ClientScan.FindPattern(new byte[] { 0x89, 0x15, 0x00, 0x00, 0x00, 0x00, 0x8B, 0x15, 0x00, 0x00, 0x00, 0x00, 0xF6, 0xC2, 0x03, 0x74, 0x03, 0x83, 0xCE, 0x08, 0xA8, 0x08, 0xBF }, "xx????xx????xxxxxxxxxxx", 0);
            m_dwForceJump = Mem.ReadInt((int)ptr + 2) - ClientBase;

            ptr             = ClientScan.FindPattern(new byte[] { 0x89, 0x15, 0x00, 0x00, 0x00, 0x00, 0x8B, 0x15, 0x00, 0x00, 0x00, 0x00, 0xF6, 0xC2, 0x03, 0x74, 0x03, 0x83, 0xCE, 0x04, 0xA8, 0x04, 0xBF }, "xx????xx????xxxxxxxxxxx", 0);
            m_dwForceAttack = Mem.ReadInt((int)ptr + 2) - ClientBase;

            ptr             = ClientScan.FindPattern(new byte[] { 0xF3, 0x0F, 0x10, 0x05, 0x00, 0x00, 0x00, 0x00, 0xEB, 0x0F, 0x8B, 0x01, 0x8B, 0x40, 0x30, 0xFF, 0xD0, 0xD9, 0x5D, 0x0C, 0xF3, 0x0F, 0x10, 0x45, 0x0C, 0xF3, 0x0F, 0x11 }, "xxxx????xxxxxxxxxxxxxxxxxxxx", 0);
            m_dwSensitivity = Mem.ReadInt((int)ptr + 4) - ClientBase;
            m_dwMouseEnable = m_dwSensitivity + 0x5C;

            ptr            = ClientScan.FindPattern(new byte[] { 0x56, 0x57, 0x8B, 0xF9, 0xC7, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8B, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x81, 0xF9, 0x00, 0x00, 0x00, 0x00, 0x75, 0x07, 0xA1, 0x00, 0x00, 0x00, 0x00, 0xEB, 0x07 }, "xxxxxx????????xx????xx????xxx????xx", 0);
            m_iCrossHairID = Mem.ReadInt((int)ptr + 6);

            ptr             = EngineScan.FindPattern(new byte[] { 0xF3, 0x0F, 0x5C, 0xC1, 0xF3, 0x0F, 0x10, 0x15, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x2F, 0xD0, 0x76, 0x04, 0xF3, 0x0F, 0x58, 0xC1, 0xA1, 0x00, 0x00, 0x00, 0x00, 0xF3, 0x0F, 0x11, 0x80, 0x00, 0x00, 0x00, 0x00, 0xD9, 0x46, 0x04 }, "xxxxxxxx????xxxxxxxxxx????xxxx????xxx", 0);
            m_dwClientState = Mem.ReadInt((int)ptr + 22) - EngineBase;
            m_dwViewAngles  = Mem.ReadInt((int)ptr + 30);

            ptr           = ClientScan.FindPattern(new byte[] { 0xA1, 0x00, 0x00, 0x00, 0x00, 0x8B, 0x0C, 0xB0, 0x8B, 0x01, 0xFF, 0x50, 0x00, 0x46, 0x3B, 0x35, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xEA, 0x8B, 0x0D, 0x00, 0x00, 0x00, 0x00 }, "x????xxxxxxx?xxx????xxxx????", 0);
            m_dwRadarBase = Mem.ReadInt((int)ptr + 1) - ClientBase;

            ptr          = ClientScan.FindPattern(new byte[] { 0xF3, 0x0F, 0x10, 0x96, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x57, 0xDB, 0x0F, 0x2F, 0xD3, 0x0F, 0x86, 0x00, 0x00, 0x00, 0x00 }, "xxxx????xxxxxxxx????", 0);
            m_iGlowIndex = Mem.ReadInt((int)ptr + 4) + 0x18;
        }
コード例 #7
0
 public void Initialize(bool usePatternScan = false)
 {
     Memory = new RemoteMemory(Process.GetProcessesByName("ConanSandbox")[0]);
     Memory.Initialize();
     #region PatternScanner
     if (usePatternScan)
     {
         var scan      = new SigScan(Memory.Process, Memory.ProcessBaseAddress, Memory.Process.MainModule.ModuleMemorySize);
         var gnamesPtr = scan.FindPattern(GNamesPatternBytes, GNamesPattern, 0);
         int offset    = Memory.ReadInt32(gnamesPtr, 3);
         GNamesPtr = Memory.ReadIntPtr(new IntPtr(gnamesPtr.ToInt64() + offset + 7), 0);
         var gObjectsPtr = scan.FindPattern(GObjectsPatternBytes, GObjectsPattern, 0);
         offset      = Memory.ReadInt32(gObjectsPtr, 3);
         GObjectsPtr = new IntPtr(gObjectsPtr.ToInt64() + offset + 7);
     }
     #endregion
     Names   = new NameStore(GNamesPtr);
     Objects = new ObjectStore(GObjectsPtr);
 }
コード例 #8
0
ファイル: RobloxSharp.cs プロジェクト: rajeshwarn/RoSharp
        private IntPtr GetScriptContext()
        {
#if DEBUG_ROBLOX
            Logger.Log(Logger.LogType.WORK, "Attempting to scan for ScriptContext...");
#endif

            NativeObjects.MemoryBasicInformation mbi;

            IntPtr baseAdr = this.Native.MainModule.BaseAddress;

            SigScan sigScan = new SigScan()
            {
                Process = this.Native
            };

            for (IntPtr offset = baseAdr; offset.ToInt32() < 0x7FFFFFFF; offset += baseAdr.ToInt32())
            {
                NativeObjects.NativeMethods.VirtualQueryEx(this.Handle, offset, out mbi, Marshal.SizeOf <NativeObjects.MemoryBasicInformation>());

                if (mbi.Protect == NativeObjects.MemoryProtectionFlags.ReadWrite)
                {
                    sigScan.Address = offset;
                    sigScan.Size    = mbi.RegionSize;
                    IntPtr result = sigScan.FindPattern(BitConverter.ToString(BitConverter.GetBytes(FixAddress(Offsets.GlobalAddressTable["ScriptContext"].AddressValue.ToInt32()))).Replace("-", " "));
                    sigScan.ResetRegion();
                    if (result != IntPtr.Zero)
                    {
#if DEBUG_ROBLOX
                        Logger.Log(Logger.LogType.SUCCESS, "Successfully scanned for ScriptContext! SC: 0x{0:X}", result.ToInt32());
#endif

                        return(result);
                    }
                }

                baseAdr = (IntPtr)mbi.RegionSize;
            }

#if DEBUG_ROBLOX
            Logger.Log(Logger.LogType.ERROR, "Failed to scan for ScriptContext");
#endif
            return(IntPtr.Zero);
        }
コード例 #9
0
 private void InitHeroBaseAddress()
 {
     try
     {
         IntPtr  baseAddress = ProcessMemory.Process.MainModule.BaseAddress;
         SigScan sigScan     = new SigScan(ProcessMemory.Process, IntPtr.Add(baseAddress, 0x580000), 0x20000);
         IntPtr  address     = sigScan.FindPattern(new byte[] { 0x48, 0x8B, 0x05, 0xFF, 0xFF, 0xFF, 0xFF, 0x48, 0x85, 0xC0, 0xFF, 0xFF, 0x48, 0x8b, 0x40, 0xFF, 0xC3 }, "xxx????xxx??xxx?x", 0);
         // Pointer logic from CE: heroBaseAddress = address + ReadMemoryInt(address + 3) + 7
         if (!address.Equals(IntPtr.Zero))
         {
             int offset;
             if (ProcessMemory.ReadMemoryInt(IntPtr.Add(address, 3), out offset))
             {
                 _heroBaseAddress = IntPtr.Add(IntPtr.Add(address, offset), 7);
             }
         }
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
         throw;
     }
 }
コード例 #10
0
 public static void ScanAllPatterns()
 {
     dwClientCmd   = SigScan.ScanPatterna(Modules.EngineDLLName, "55 8B EC 8B 0D ? ? ? ? 81 F9 ? ? ? ? 75 0C A1 ? ? ? ? 35 ? ? ? ? EB 05 8B 01 FF 50 34 50 A1").ToInt32() - Modules.EngineDLLAdress;
     dwClientState = SigScan.ScanPattern(Modules.EngineDLLName, "A1 ? ? ? ? 33 D2 6A 00 6A 00 33 C9 89 B0", 1, 0, true);
     dwClientState_GetLocalPlayer      = SigScan.ScanPattern(Modules.EngineDLLName, "8B 80 ? ? ? ? 40 C3", 2, 0, false);
     dwClientState_IsHLTV              = SigScan.ScanPattern(Modules.EngineDLLName, "80 BF ? ? ? ? ? 0F 84 ? ? ? ? 32 DB", 2, 0, false);
     dwClientState_Map                 = SigScan.ScanPattern(Modules.EngineDLLName, "05 ? ? ? ? C3 CC CC CC CC CC CC CC A1", 1, 0, false);
     dwClientState_MapDirectory        = SigScan.ScanPattern(Modules.EngineDLLName, "05 ? ? ? ? C3 CC CC CC CC CC CC CC 80 3D", 1, 0, false);
     dwClientState_MaxPlayer           = SigScan.ScanPattern(Modules.EngineDLLName, "A1 ? ? ? ? 8B 80 ? ? ? ? C3 CC CC CC CC 55 8B EC 8A 45 08", 7, 0, false);
     dwClientState_PlayerInfo          = SigScan.ScanPattern(Modules.EngineDLLName, "8B 89 ? ? ? ? 85 C9 0F 84 ? ? ? ? 8B 01", 2, 0, false);
     dwClientState_State               = SigScan.ScanPattern(Modules.EngineDLLName, "83 B8 ? ? ? ? ? 0F 94 C0 C3", 2, 0, false);
     dwClientState_ViewAngles          = SigScan.ScanPattern(Modules.EngineDLLName, "F3 0F 11 80 ? ? ? ? D9 46 04 D9 05", 4, 0, false);
     clientstate_delta_ticks           = SigScan.ScanPattern(Modules.EngineDLLName, "C7 87 ? ? ? ? ? ? ? ? FF 15 ? ? ? ? 83 C4 08", 2, 0, true);
     clientstate_last_outgoing_command = SigScan.ScanPattern(Modules.EngineDLLName, "8B 8F ? ? ? ? 8B 87 ? ? ? ? 41", 2, 0, true);
     clientstate_choked_commands       = SigScan.ScanPattern(Modules.EngineDLLName, "8B 87 ? ? ? ? 41", 2, 0, true);
     clientstate_net_channel           = SigScan.ScanPattern(Modules.EngineDLLName, "8B 8F ? ? ? ? 8B 01 8B 40 18", 2, 0, true);
     dwEntityList                = SigScan.ScanPattern(Modules.ClientDLLName, "BB ? ? ? ? 83 FF 01 0F 8C ? ? ? ? 3B F8", 1, 0, true);
     dwForceAttack               = SigScan.ScanPattern(Modules.ClientDLLName, "89 0D ? ? ? ? 8B 0D ? ? ? ? 8B F2 8B C1 83 CE 04", 2, 0, true);
     dwForceAttack2              = SigScan.ScanPattern(Modules.ClientDLLName, "89 0D ? ? ? ? 8B 0D ? ? ? ? 8B F2 8B C1 83 CE 04", 2, 12, true);
     dwForceBackward             = SigScan.ScanPattern(Modules.ClientDLLName, "55 8B EC 51 53 8A 5D 08", 287, 0, true);
     dwForceForward              = SigScan.ScanPattern(Modules.ClientDLLName, "55 8B EC 51 53 8A 5D 08", 245, 0, true);
     dwForceJump                 = SigScan.ScanPattern(Modules.ClientDLLName, "8B 0D ? ? ? ? 8B D6 8B C1 83 CA 02", 2, 0, true);
     dwForceLeft                 = SigScan.ScanPattern(Modules.ClientDLLName, "55 8B EC 51 53 8A 5D 08", 465, 0, true);
     dwForceRight                = SigScan.ScanPattern(Modules.ClientDLLName, "55 8B EC 51 53 8A 5D 08", 512, 0, true);
     dwGameDir                   = SigScan.ScanPattern(Modules.EngineDLLName, "68 ? ? ? ? 8D 85 ? ? ? ? 50 68 ? ? ? ? 68", 1, 0, true);
     dwGameRulesProxy            = SigScan.ScanPattern(Modules.ClientDLLName, "A1 ? ? ? ? 85 C0 0F 84 ? ? ? ? 80 B8 ? ? ? ? ? 74 7A", 1, 0, true);
     dwGetAllClasses             = SigScan.ScanPattern(Modules.ClientDLLName, "A1 ? ? ? ? C3 CC CC CC CC CC CC CC CC CC CC A1 ? ? ? ? B9", 1, 0, true);
     dwGlobalVars                = SigScan.ScanPattern(Modules.EngineDLLName, "68 ? ? ? ? 68 ? ? ? ? FF 50 08 85 C0", 1, 0, true);
     dwGlowObjectManager         = SigScan.ScanPattern(Modules.ClientDLLName, "A1 ? ? ? ? A8 01 75 4B", 1, 4, true);
     dwInput                     = SigScan.ScanPattern(Modules.ClientDLLName, "B9 ? ? ? ? F3 0F 11 04 24 FF 50 10", 1, 0, true);
     dwInterfaceLinkList         = SigScan.ScanPattern(Modules.ClientDLLName, "8B 35 ? ? ? ? 57 85 F6 74 ? 8B 7D 08 8B 4E 04 8B C7 8A 11 3A 10");
     dwLocalPlayer               = SigScan.ScanPattern(Modules.ClientDLLName, "8D 34 85 ? ? ? ? 89 15 ? ? ? ? 8B 41 08 8B 48 04 83 F9 FF", 3, 4, true);
     dwMouseEnable               = SigScan.ScanPattern(Modules.ClientDLLName, "B9 ? ? ? ? FF 50 34 85 C0 75 10", 1, 48, true);
     dwMouseEnablePtr            = SigScan.ScanPattern(Modules.ClientDLLName, "B9 ? ? ? ? FF 50 34 85 C0 75 10", 1, 0, true);
     dwPlayerResource            = SigScan.ScanPattern(Modules.ClientDLLName, "8B 3D ? ? ? ? 85 FF 0F 84 ? ? ? ? 81 C7", 2, 0, true);
     dwRadarBase                 = SigScan.ScanPattern(Modules.ClientDLLName, "A1 ? ? ? ? 8B 0C B0 8B 01 FF 50 ? 46 3B 35 ? ? ? ? 7C EA 8B 0D", 1, 0, true);
     dwSensitivity               = SigScan.ScanPattern(Modules.ClientDLLName, "81 F9 ? ? ? ? 75 1D F3 0F 10 05 ? ? ? ? F3 0F 11 44 24 ? 8B 44 24 18 35 ? ? ? ? 89 44 24 0C EB 0B", 2, 44, true);
     dwSensitivityPtr            = SigScan.ScanPattern(Modules.ClientDLLName, "81 F9 ? ? ? ? 75 1D F3 0F 10 05 ? ? ? ? F3 0F 11 44 24 ? 8B 44 24 18 35 ? ? ? ? 89 44 24 0C EB 0B", 2, 0, true);
     dwSetClanTag                = SigScan.ScanPatterna(Modules.EngineDLLName, "53 56 57 8B DA 8B F9 FF 15").ToInt32() - Modules.EngineDLLAdress;
     dwViewMatrix                = SigScan.ScanPattern(Modules.ClientDLLName, "0F 10 05 ? ? ? ? 8D 85 ? ? ? ? B9", 3, 176, false);
     dwWeaponTable               = SigScan.ScanPattern(Modules.ClientDLLName, "B9 ? ? ? ? 6A 00 FF 50 08 C3", 1, 0, true);
     dwWeaponTableIndex          = SigScan.ScanPattern(Modules.ClientDLLName, "39 86 ? ? ? ? 74 06 89 86 ? ? ? ? 8B 86", 2, 0, true);
     dwYawPtr                    = SigScan.ScanPattern(Modules.ClientDLLName, "81 F9 ? ? ? ? 75 1D F3 0F 10 05 ? ? ? ? F3 0F 11 44 24 ? 8B 44 24 1C 35 ? ? ? ? 89 44 24 18 EB 0B 8B 01 8B 40 30 FF D0 D9 5C 24 18 F3 0F 10 06", 2, 0, true);
     dwZoomSensitivityRatioPtr   = SigScan.ScanPattern(Modules.ClientDLLName, "81 F9 ? ? ? ? 75 1A F3 0F 10 05 ? ? ? ? F3 0F 11 45 ? 8B 45 F4 35 ? ? ? ? 89 45 FC EB 0A 8B 01 8B 40 30 FF D0 D9 5D FC A1", 2, 0, true);
     dwbSendPackets              = SigScan.ScanPattern(Modules.EngineDLLName, "B3 01 8B 01 8B 40 10 FF D0 84 C0 74 0F 80 BF ? ? ? ? ? 0F 84", 0, 1, true);
     dwppDirect3DDevice9         = SigScan.ScanPattern(Modules.ShaderAPIName, "8B 3D ? ? ? ? 85 FF 0F 84 ? ? ? ? 81 C7", 2, 0, true);
     m_pStudioHdr                = SigScan.ScanPattern(Modules.ClientDLLName, "8B B6 ? ? ? ? 85 F6 74 05 83 3E 00 75 02 33 F6 F3 0F 10 44 24", 2, 0, true);
     m_yawClassPtr               = SigScan.ScanPattern(Modules.ClientDLLName, "81 F9 ? ? ? ? 75 16 F3 0F 10 05 ? ? ? ? F3 0F 11 45 ? 81 75 ? ? ? ? ? EB 0A 8B 01 8B 40 30 FF D0 D9 5D 0C 8B 55 08", 2, 0, true);
     m_pitchClassPtr             = SigScan.ScanPattern(Modules.ClientDLLName, "A1 ? ? ? ? 89 74 24 28", 1, 0, true);
     interface_engine_cvar       = SigScan.ScanPattern(Modules.VSTDLibDLLName, "8B 0D ? ? ? ? C7 05", 2, 0, true);
     convar_name_hash_table      = SigScan.ScanPattern(Modules.VSTDLibDLLName, "8B 3C 85", 3, 0, true);
     m_bDormant                  = SigScan.ScanPattern(Modules.ClientDLLName, "8A 81 ? ? ? ? C3 32 C0", 2, 8, false);
     model_ambient_min           = SigScan.ScanPattern(Modules.EngineDLLName, "F3 0F 10 0D ? ? ? ? F3 0F 11 4C 24 ? 8B 44 24 20 35 ? ? ? ? 89 44 24 0C", 4, 0, true);
     set_abs_angles              = SigScan.ScanPatterna(Modules.ClientDLLName, "55 8B EC 83 E4 F8 83 EC 64 53 56 57 8B F1 E8").ToInt32() - Modules.EngineDLLAdress;
     set_abs_origin              = SigScan.ScanPatterna(Modules.ClientDLLName, "55 8B EC 83 E4 F8 51 53 56 57 8B F1 E8").ToInt32() - Modules.EngineDLLAdress;
     is_c4_owner                 = SigScan.ScanPatterna(Modules.ClientDLLName, "56 8B F1 85 F6 74 31").ToInt32() - Modules.EngineDLLAdress;
     force_update_spectator_glow = SigScan.ScanPatterna(Modules.ClientDLLName, "74 07 8B CB E8 ? ? ? ? 83 C7 10").ToInt32() - Modules.EngineDLLAdress;
     anim_overlays               = SigScan.ScanPattern(Modules.ClientDLLName, "8B 89 ? ? ? ? 8D 0C D1", 2, 0, true);
     m_flSpawnTime               = SigScan.ScanPattern(Modules.ClientDLLName, "89 86 ? ? ? ? E8 ? ? ? ? 80 BE ? ? ? ? ?", 2, 0, true);
     find_hud_element            = SigScan.ScanPatterna(Modules.ClientDLLName, "8B 3D ? ? ? ? 85 FF 0F 84 ? ? ? ? 81 C7").ToInt32() - Modules.EngineDLLAdress;
 }
コード例 #11
0
ファイル: Class1.cs プロジェクト: erfg12/memory.dll
 public IntPtr AoBScan(uint min, int length, string code, string file = "")
 {
     string[] stringByteArray = LoadCode(code, file).Split(' ');
     byte[] myPattern = new byte[stringByteArray.Length];
     string mask = "";
     int i = 0;
     foreach (string ba in stringByteArray)
     {
         if (ba == "??")
         {
             myPattern[i] = 0xFF;
             mask += "?";
         }
         else
         {
             myPattern[i] = Byte.Parse(ba, NumberStyles.HexNumber);
             mask += "x";
         }
         i++;
     }
     SigScan _sigScan = new SigScan(procs, new UIntPtr(min), length);
     IntPtr pAddr = _sigScan.FindPattern(myPattern, mask, 0);
     return pAddr;
 }
コード例 #12
0
ファイル: frmMain.cs プロジェクト: Deathmax/dxgw2
        private void ScanMemory()
        {
            var sigscan = new SigScan(GW2Process, new IntPtr(0x400000), 0xFFFFFF);
            IntPtr globalbase = sigscan.FindPattern(GlobalBaseB, string.Concat(Enumerable.Repeat("x", GlobalBaseB.Length)), 11);
            BasePNTR = (IntPtr)(BitConverter.ToInt32(ReadProcessMemory(globalbase, 4), 0) + 0x104);
            MapIDPNTR = BitConverter.ToInt32(ReadProcessMemory(sigscan.FindPattern(MapIDB, "xxxxxx", 6), 4), 0);
            sigscan = null;
            GC.Collect();
            try
            {
                try
                {
                    File.Delete(Path.Combine(Path.GetTempPath(), "OverlayUI.dll"));

                }
                catch
                {
                }
                File.WriteAllBytes(Path.Combine(Path.GetTempPath(), "OverlayUI.dll"), Resources.hook);
            }
            catch
            {
            }
            CommInjected = true;
            Inject.DllInjectionResult result = Inject.DllInjector.GetInstance.Inject(GW2Process,
                                                                                     Path.Combine(Path.GetTempPath(),
                                                                                                  "OverlayUI.dll"));
            if (result != Inject.DllInjectionResult.Success &&
                !CheckModule(GW2Process, Path.Combine(Path.GetTempPath(), "OverlayUI.dll")))
            {
                CommInjected = false;
            }
        }