Example #1
0
        private unsafe void LoadOffsets()
        {
            Logger.Info("LoadOffsets");
            OffsetScanner.ScanOffsets(_memory);

            if (_memory.Internal)
            {
                Logger.Info("Loading internal stuff");
                var createInter = _memory["engine.dll"]["CreateInterface"];
                Logger.Info("New Interface name: " + createInter.Name + "\nAddress" + createInter.BaseAddress);
                //csgo.EngineCreateInterface = createInter.GetDelegate<CreateInterfaceFn>();
                //var returncode = 0;
                //var IEngineTracePtr = csgo.EngineCreateInterface(IEngineTraceVTable,ref returncode);
            }
        }
        private unsafe void LoadOffsets()
        {
            //TODO Add scanning

            Logger.Info("LoadOffsets");
            OffsetScanner.ScanOffsets(_memory);

            if (_memory.Internal)
            {
                var createInter = _memory["engine.dll"]["CreateInterface"];
                Logger.Info("New Interface name: " + createInter.Name + "\nAddress" + createInter.BaseAddress);
                EngineCreateInterface = createInter.GetDelegate <CreateInterfaceFn>();
                var returncode      = 0;
                var IEngineTracePtr = EngineCreateInterface(IEngineTraceVTable, ref returncode);
                var IEngineTrace    = new VirtualClass(IEngineTracePtr);
                var traceFunction   = IEngineTrace.GetVirtualFunction <IEngineTrace.TraceRay>(5 /*TraceRayindex*/);
                Logger.Info("New VClass name: " + IEngineTraceVTable + "\nAddress: " + IEngineTrace.ClassAddress.ToString());
            }
            offsetsLoaded = true;
        }