Exemplo n.º 1
0
        internal static void Init()
        {
            Process csgo = Process.GetProcessesByName("csgo")[0];

            Handle = ProcessWrapper.OpenProcess(ProcessAccessFlags.All, csgo.Id);

            foreach (ProcessModule processModule in csgo.Modules)
            {
                if (processModule.FileName.Contains("client_panorama.dll"))
                {
                    Offsets.clientDllBaseAddress = processModule.BaseAddress;
                }

                if (processModule.FileName.Contains("engine.dll"))
                {
                    Offsets.engineDllBaseAddress = processModule.BaseAddress;
                }
            }

            Offsets.clientState = Memory.ReadIntPtr(Offsets.engineDllBaseAddress + Offsets.dwClientState);
        }