コード例 #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));
                }
            }
        }