Esempio n. 1
0
        private IntPtr method_0(int snoId)
        {
            if (this.dictionary_0.ContainsKey(snoId))
            {
                return(this.dictionary_0[snoId]);
            }
            ASMExecutor executor = base.Memory.Injector;

            lock (executor.publicLock)
            {
                using (MemoryInjector class2 = new MemoryInjector(Globals.mem, 4))
                {
                    executor.Clear();
                    executor.AddLineSecured("push {0}", new object[] { 0 });
                    executor.AddLineSecured("push {0}", new object[] { snoId });
                    executor.AddLineSecured("mov edx, [{0}]", new object[] { base.BaseAddress });
                    executor.AddLineSecured("test edx, edx");
                    executor.AddLineSecured("jz @out");
                    executor.AddLineSecured("mov ecx, edx");
                    executor.AddLineSecured("call {0}", new object[] { Offsets.fnGetSnoInfoForSnoId });
                    executor.AddLineSecured("mov [{0}], eax", class2.Address);
                    executor.AddLineSecured("@out:");
                    executor.AddLineSecured("retn");
                    executor.ExecuteBuffer(null);

                    uint recAddress = base.Memory.ReadMemoryAsUint((uint)class2.Address);
                    return(new IntPtr(recAddress));
                }
            }
        }
Esempio n. 2
0
 public ASMExecutorMonitor(ASMExecutor executor)
 {
     if (int_0 == 0)
     {
         this.Executor = executor;
         Monitor.Enter(this.Executor.publicLock);
         this.Executor.method_0();
     }
     Interlocked.Increment(ref int_0);
 }
Esempio n. 3
0
        public void Purge(int maxInstances)
        {
            ASMExecutor executor = base.Memory.Injector;

            lock (executor.publicLock)
            {
                IntPtr vFunc = base.GetVFunc(base.Memory.UnsafeReadToStruct <IntPtr>((IntPtr)this), 8);
                executor.Clear();
                executor.AddLineSecured("push {0}", new object[] { maxInstances });
                executor.AddLineSecured("mov ecx, [{0}]", new object[] { (IntPtr)this });
                executor.AddLineSecured("call {0}", new object[] { vFunc });
                executor.AddLineSecured("retn");
                executor.ExecuteBuffer(null);
            }
        }