Ejemplo n.º 1
0
        private unsafe void FixChecksumButton_Click(object sender, EventArgs e)
        {
            void *voidPointer = stackalloc void[17];
            FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog();

            *(voidPointer + 16) = folderBrowserDialog.ShowDialog() != DialogResult.OK;
            if ((sbyte)(*(voidPointer + 16)) == 0)
            {
                try
                {
                    Class0 class0 = new Class0(string.Concat(folderBrowserDialog.SelectedPath, "\\HED-DATA"), Enum0.const_0, true);
                    class0.vmethod_7((long)0);
                    *voidPointer = (uint)class0.vmethod_4();
                    class0.vmethod_7((long)8);
                    class0.method_4().Write(0);
                    class0.vmethod_7((long)76);
                    *(voidPointer + 4) = class0.method_2().ReadUInt32();
                    class0.vmethod_7((long)0);
                    byte[] numArray = class0.method_2().method_0((int)((uint)(*voidPointer)));
                    *(voidPointer + 8) = MainForm.smethod_0(numArray, 0);
                    Class0 class01 = new Class0(string.Concat(folderBrowserDialog.SelectedPath, "\\USR-DATA"), Enum0.const_0, true);
                    class01.vmethod_7((long)0);
                    byte[] numArray1 = class01.method_2().method_0((int)((uint)(*(voidPointer + 4))));
                    *(voidPointer + 12) = MainForm.smethod_0(numArray1, (uint)(*(voidPointer + 8)));
                    class01.vmethod_6();
                    class0.vmethod_7((long)8);
                    class0.method_4().Write((uint)(*(voidPointer + 12)));
                    class0.vmethod_6();
                    MessageBox.Show("Calculated The Checksum Successfully!", "Success", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                }
                catch (Exception exception1)
                {
                    Exception exception = exception1;
                    MessageBox.Show(string.Concat("Error: ", exception.Message));
                }
            }
        }
Ejemplo n.º 2
0
 // Token: 0x0600001D RID: 29
 // RVA: 0x000280F4 File Offset: 0x000262F4
 public int method_1(Class0.Class2 class2_0)
 {
     int num;
     if ((num = class2_0.method_0(9)) >= 0)
     {
         int num2;
         if ((num2 = (int)this.short_0[num]) >= 0)
         {
             class2_0.method_1(num2 & 15);
             return num2 >> 4;
         }
         int num3 = -(num2 >> 4);
         int int_ = num2 & 15;
         if ((num = class2_0.method_0(int_)) >= 0)
         {
             num2 = (int)this.short_0[num3 | num >> 9];
             class2_0.method_1(num2 & 15);
             return num2 >> 4;
         }
         int num4 = class2_0.method_2();
         num = class2_0.method_0(num4);
         num2 = (int)this.short_0[num3 | num >> 9];
         if ((num2 & 15) <= num4)
         {
             class2_0.method_1(num2 & 15);
             return num2 >> 4;
         }
         return -1;
     }
     else
     {
         int num5 = class2_0.method_2();
         num = class2_0.method_0(num5);
         int num2 = (int)this.short_0[num];
         if (num2 >= 0 && (num2 & 15) <= num5)
         {
             class2_0.method_1(num2 & 15);
             return num2 >> 4;
         }
         return -1;
     }
 }