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

Server() static private method

static private Server ( ISmartMemory memUtils ) : void
memUtils ISmartMemory
return void
        static void Server(ISmartMemory memUtils)
        {
            byte[] pattern = new byte[]{
                0x81, 0xC6, 0x00, 0x00, 0x00, 0x00,
                0x81, 0xFE, 0x00, 0x00, 0x00, 0x00,
                0x7C, 0xEB,
                0x8B, 0x0D, 0x00, 0x00, 0x00, 0x00, //<<<<
                0x5F,
                0x5E,
                0x85, 0xC9,
                0x74, 0x0F,
                0x8B, 0x01,
                0xFF, 0x50, 0x04,
                0xC7, 0x05
                };
            scan = memUtils["client.dll"].Find(pattern);
            if (scan.Success)
            {
                int tmp = memUtils.Read<int>((IntPtr)(scan.Address.ToInt32() + 16));
                Offsets.Server = (IntPtr)tmp - clientDllBase;
                Logger.Info(ObjectEx.GetName(() => Offsets.Server) + "\n" + Offsets.Server.ToString("X8"));
            }
        }