public static void ScanSignatures(MemoryReader reader, ProcessPointers pointers)
        {
            DumpMemory(reader, pointers);

            IntPtr address = IntPtr.Zero;

            Signatures.clientstate_delta_ticks      = GetAddress(reader, FindPatternEngine("C7 87 ? ? ? ? ? ? ? ? FF 15 ? ? ? ? 83 C4 08"), 0, 2, (int)pointers.pEngine, false);
            Signatures.dwClientState                = GetAddress(reader, FindPatternEngine("A1 ? ? ? ? 33 D2 6A 00 6A 00 33 C9 89 B0"), 0, 1, (int)pointers.pEngine, true);
            Signatures.dwClientState_GetLocalPlayer = GetAddress(reader, FindPatternEngine("8B 80 ? ? ? ? 40 C3"), 0, 2, (int)pointers.pEngine, false);
            Signatures.dwClientState_IsHLTV         = GetAddress(reader, FindPatternEngine("80 BF ? ? ? ? ? 0F 84 ? ? ? ? 32 DB"), 0, 2, (int)pointers.pEngine, false);
            Signatures.dwClientState_Map            = GetAddress(reader, FindPatternEngine("05 ? ? ? ? C3 CC CC CC CC CC CC CC A1"), 0, 1, (int)pointers.pEngine, false);
            Signatures.dwClientState_MapDirectory   = GetAddress(reader, FindPatternEngine("05 ? ? ? ? C3 CC CC CC CC CC CC CC 80 3D"), 0, 1, (int)pointers.pEngine, false);
            Signatures.dwClientState_MaxPlayer      = GetAddress(reader, FindPatternEngine("A1 ? ? ? ? 8B 80 ? ? ? ? C3 CC CC CC CC 55 8B EC 8A 45 08"), 0, 7, (int)pointers.pEngine, false);
            Signatures.dwClientState_PlayerInfo     = GetAddress(reader, FindPatternEngine("8B 89 ? ? ? ? 85 C9 0F 84 ? ? ? ? 8B 01"), 0, 1, (int)pointers.pEngine, false);
            Signatures.dwClientState_State          = GetAddress(reader, FindPatternEngine("83 B8 ? ? ? ? ? 0F 94 C0 C3"), 0, 2, (int)pointers.pEngine, false);
            Signatures.dwClientState_ViewAngles     = GetAddress(reader, FindPatternEngine("F3 0F 11 80 ? ? ? ? D9 46 04 D9 05"), 0, 4, (int)pointers.pEngine, false);
            Signatures.dwEntityList        = GetAddress(reader, FindPatternClient("BB ? ? ? ? 83 FF 01 0F 8C ? ? ? ? 3B F8"), 0, 1, (int)pointers.pClient, true);
            Signatures.dwForceAttack       = GetAddress(reader, FindPatternClient("89 0D ? ? ? ? 8B 0D ? ? ? ? 8B F2 8B C1 83 CE 04"), 0, 2, (int)pointers.pClient, true);
            Signatures.dwForceAttack2      = GetAddress(reader, FindPatternClient("89 0D ? ? ? ? 8B 0D ? ? ? ? 8B F2 8B C1 83 CE 04"), 12, 2, (int)pointers.pClient, true);
            Signatures.dwForceJump         = GetAddress(reader, FindPatternClient("8B 0D ? ? ? ? 8B D6 8B C1 83 CA 02"), 0, 2, (int)pointers.pClient, true);
            Signatures.dwGlowObjectManager = GetAddress(reader, FindPatternClient("A1 ? ? ? ? A8 01 75 4B"), 4, 1, (int)pointers.pClient, true);
            //Signatures.dwLocalPlayer = GetAddress(reader, FindPatternClient("A3 ? ? ? ? C7 05 ? ? ? ? ? ? ? ? E8 ? ? ? ? 59 C3 6A ?"), 16, 1, (int)pointers.pClient, true);
            Signatures.dwMouseEnable    = GetAddress(reader, FindPatternClient("B9 ? ? ? ? FF 50 34 85 C0 75 10"), 48, 1, (int)pointers.pClient, true);
            Signatures.dwMouseEnablePtr = GetAddress(reader, FindPatternClient("B9 ? ? ? ? FF 50 34 85 C0 75 10"), 0, 1, (int)pointers.pClient, true);
            Signatures.dwPlayerResource = GetAddress(reader, FindPatternClient("8B 3D ? ? ? ? 85 FF 0F 84 ? ? ? ? 81 C7"), 0, 2, (int)pointers.pClient, true);
            Signatures.dwRadarBase      = GetAddress(reader, FindPatternClient("A1 ? ? ? ? 8B 0C B0 8B 01 FF 50 ? 46 3B 35 ? ? ? ? 7C EA 8B 0D"), 0, 1, (int)pointers.pClient, true);
            Signatures.dwbSendPackets   = GetAddress(reader, FindPatternEngine("B3 01 8B 01 8B 40 10 FF D0 84 C0 74 0F 80 BF ? ? ? ? ? 0F 84"), 0, 1, (int)pointers.pEngine, true);

            Array.Clear(dumpedRegionClient, 0, dumpedRegionClient.Length);
            Array.Clear(dumpedRegionEngine, 0, dumpedRegionEngine.Length);
        }
예제 #2
0
        private static void SetProcessPointers(Process gameProc, out ProcessPointers processPointers)
        {
            processPointers = new ProcessPointers();

            foreach (ProcessModule module in gameProc.Modules)
            {
                switch (module.ModuleName)
                {
                case Const_ClientDllName:
                    processPointers.pClient = module.BaseAddress;
                    processPointers.sClient = module.ModuleMemorySize;
                    break;

                case Const_EngineDllName:
                    processPointers.pEngine = module.BaseAddress;
                    processPointers.sEngine = module.ModuleMemorySize;
                    break;
                }
            }

            processPointers.pWindow   = gameProc.MainWindowHandle;
            processPointers.pProcess  = gameProc.Handle;
            processPointers.idProcess = gameProc.Id;

            //Check for wrong pointers
            if (processPointers.pClient == IntPtr.Zero ||
                processPointers.pEngine == IntPtr.Zero ||
                processPointers.pProcess == IntPtr.Zero ||
                processPointers.pWindow == IntPtr.Zero)
            {
                throw new NoGameModulesFoundOwlException();
            }
        }
        public MemoryReader(ProcessPointers processPointers)
        {
            Pointers = processPointers;
            Pointers.pOpenProcess = OpenProcess(Const_PROCESS_ALL_ACCESS, false, processPointers.idProcess);
            //Check for wrong pointer
            if (Pointers.pOpenProcess == IntPtr.Zero)
            {
                throw new OpenProcessOwlException();
            }

            Cache = new MemoryReaderCache();
        }
 private static void DumpMemory(MemoryReader reader, ProcessPointers pointers)
 {
     dumpedRegionClient = reader.ReadRaw(pointers.pClient, pointers.sClient);
     dumpedRegionEngine = reader.ReadRaw(pointers.pEngine, pointers.sEngine);
 }