Ejemplo n.º 1
0
    // Token: 0x0600009C RID: 156 RVA: 0x0000A870 File Offset: 0x00008A70
    public void method_9(byte[] byte_0, Action action_0 = null)
    {
        if (this.intptr_0 == IntPtr.Zero)
        {
            throw new InvalidOperationException("Cannot scan process memory regions. No process loaded.");
        }
        if (byte_0.Length == 0)
        {
            throw new ArgumentOutOfRangeException("Buffer cannot be of length 0.");
        }
        this.method_6();
        this.method_7(0);
        int num = 0;

        GClass4[] array = this.list_0.ToArray();
        int       i     = 0;

        while (i < array.Length)
        {
            GClass4 gclass = array[i];
            if (!this.dictionary_0.ContainsKey(gclass.IntPtr_0))
            {
                using (Dictionary <IntPtr, byte[]> .KeyCollection.Enumerator enumerator = this.dictionary_0.Keys.GetEnumerator())
                {
                    while (enumerator.MoveNext())
                    {
                        IntPtr intPtr = enumerator.Current;
                        int    num2   = (int)intPtr;
                        int    num3   = num2 + this.dictionary_0[intPtr].Length;
                        int    num4   = (int)gclass.IntPtr_0;
                        if (num4 >= num2 && num4 <= num3)
                        {
                            if (!GClass0.smethod_1(this.dictionary_0[intPtr], byte_0, num4 - num2))
                            {
                                this.list_0.Remove(gclass);
                                break;
                            }
                            gclass.Byte_0 = byte_0;
                            break;
                        }
                    }
                    goto IL_13B;
                }
                goto IL_10B;
            }
            goto IL_10B;
IL_13B:
            num++;
            this.method_7(num / this.dictionary_0.Count * 100);
            i++;
            continue;
IL_10B:
            if (!GClass0.smethod_1(this.dictionary_0[gclass.IntPtr_0], byte_0, 0))
            {
                this.list_0.Remove(gclass);
                goto IL_13B;
            }
            gclass.Byte_0 = byte_0;
            goto IL_13B;
        }
        this.method_7(100);
        if (action_0 != null)
        {
            action_0();
        }
    }