AgaHackTools.Example.MemoryModule.OffsetScanner.MapName C# (CSharp) Method

MapName() static private method

static private MapName ( ISmartMemory memUtils ) : void
memUtils ISmartMemory
return void
        static void MapName(ISmartMemory memUtils)
        {
            byte[] pattern = new byte[]{
               0x72, 0xEF,
               0xC6, 0x00, 0x00,
               0xB8, 0x00, 0x00, 0x00, 0x00,
               0x80, 0x3D, 0x00, 0x00, 0x00, 0x00, 0x00,
               0x74, 0x15,
               0x8A, 0x08,
               0x80, 0xF9
                };
            scan = memUtils["engine.dll"].Find(pattern);
            if (scan.Success)
            {
                int tmp = memUtils.Read<int>((IntPtr)(scan.Address.ToInt32() + 6));
                Offsets.ServerMap = (IntPtr)tmp - engineDllBase;
                Logger.Info(ObjectEx.GetName(() => Offsets.ServerMap) + "\n" + Offsets.ServerMap.ToString("X8"));
            }
        }