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

LocalPlayer() static private method

static private LocalPlayer ( ISmartMemory memUtils ) : void
memUtils ISmartMemory
return void
        static void LocalPlayer(ISmartMemory memUtils)
        {
            scan = memUtils["client.dll"].Find(new byte[] { 0x8D, 0x34, 0x85, 0x00, 0x00, 0x00, 0x00, 0x89, 0x15, 0x00, 0x00, 0x00, 0x00, 0x8B, 0x41, 0x08, 0x8B, 0x48 }, "xxx????xx????xxxxx");
            if (scan.Success)
            {
                var tmp = memUtils.Read<int>((IntPtr)(scan.Address.ToInt32() + 3));
                byte tmp2 = memUtils.Read<byte>((IntPtr)(scan.Address.ToInt32() + 18));
                Offsets.LocalPlayer = (IntPtr) tmp + tmp2 - clientDllBase;
                Logger.Info(ObjectEx.GetName(() => Offsets.LocalPlayer) + "\n" + Offsets.LocalPlayer.ToString("X8"));
            }
        }