Ejemplo n.º 1
0
        public HypercallComponent(UInt64 code, UInt64 param1, UInt64 param2)
        {
            InitializeComponent();
            createHexBox();
            cmbFuzzType.SelectedIndex = 0;

            txtCallnr.Text  = HypercallConversions.getCallCode(code).ToString();
            txtCount.Text   = HypercallConversions.getCountOfElements(code).ToString();
            txtStart.Text   = HypercallConversions.getRepStartIndex(code).ToString();
            optFast.Checked = HypercallConversions.isFast(code);

            byte[] byteArr = new byte[16];
            for (int x = 0; x < 8; x++)
            {
                byteArr[x] = (byte)(param1 & 0xFF);
                param1     = param1 >> 8;
            }
            for (int x = 0; x < 8; x++)
            {
                byteArr[x + 8] = (byte)(param2 & 0xFF);
                param2         = param2 >> 8;
            }
            hexBoxIn.ByteProvider = new DynamicByteProvider(byteArr);
            updateEnabled();
        }
        public HypercallSelectionForm(MainWindow parentIn, List <HypercallStruct> callsIn)
        {
            InitializeComponent();
            cmbFuzzType.SelectedIndex = 0;
            parent = parentIn;
            calls  = callsIn;

            table.Rows.Clear();
            int idx     = 0;
            int largest = 16;

            foreach (HypercallStruct call in calls)
            {
                String code  = "0x" + HypercallConversions.getCallCode(call.code).ToString("X2");
                String count = "0x" + HypercallConversions.getCountOfElements(call.code).ToString("X");
                String start = "0x" + HypercallConversions.getRepStartIndex(call.code).ToString("X");
                bool   fast  = HypercallConversions.isFast(call.code);
                if (call.input.Length > largest)
                {
                    largest = call.input.Length;
                }
                object[] row = new object[] { idx++, code, fast, count, start, call.input.Length.ToString(), "open" };
                table.Rows.Add(row);
            }
            txtFuzzMaxPos.Text = largest.ToString();
        }
Ejemplo n.º 3
0
        public HypercallComponent(UInt64 code, byte[] input)
        {
            InitializeComponent();
            createHexBox();
            cmbFuzzType.SelectedIndex = 0;

            txtCallnr.Text  = HypercallConversions.getCallCode(code).ToString();
            txtCount.Text   = HypercallConversions.getCountOfElements(code).ToString();
            txtStart.Text   = HypercallConversions.getRepStartIndex(code).ToString();
            optFast.Checked = HypercallConversions.isFast(code);

            hexBoxIn.ByteProvider = new DynamicByteProvider(input);
            updateEnabled();
        }