• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# INTERNAL_DATA类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中INTERNAL_DATA的典型用法代码示例。如果您正苦于以下问题:C# INTERNAL_DATA类的具体用法?C# INTERNAL_DATA怎么用?C# INTERNAL_DATA使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



INTERNAL_DATA类属于命名空间,在下文中一共展示了INTERNAL_DATA类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: tq_I

        public static UInt32 tq_I(ulong origin_offset, ulong offset, ref INSTRUCTION instr, int op_index, OPERAND_SIZE opsize, INTERNAL_DATA idata, DISMODE mode)
        {
            instr.ops[op_index].flags |= (byte)OP_TYPE.OPERAND_TYPE_IMM;
            instr.ops[op_index].size = (ushort)opsize.size;
            instr.ops[op_index].value.imm.size = (byte)opsize.size_in_stream;
            instr.ops[op_index].value.imm .offset = (byte)(offset - origin_offset);
            //instr.ops[op_index].value.imm.immab = assembly.Image.ReadBytes(offset, opsize.size_in_stream);

            byte[] bt = assembly.ReadBytes(offset, (int)opsize.size_in_stream);
            instr.ops[op_index].value.imm.imm64 = 0;
            foreach (byte bb in bt.Reverse())
            {
            instr.ops[op_index].value.imm.imm64 <<= 8;
            instr.ops[op_index].value.imm.imm64 += bb;
            }

            //!!!memcpy(&(instr.ops[op_index].value.imm.imm8), offset, opsize.size_in_stream);

            //movsx(ref instr.ops[op_index].value.imm.immab, opsize.size_in_stream, 0x8);
            return (byte)opsize.size_in_stream;
        }
开发者ID:Rex-Hays,项目名称:GNIDA2,代码行数:21,代码来源:mediana.cs


示例2: post_proc_cmpxchg8b

        static UInt32 post_proc_cmpxchg8b(ulong  origin_offset, ulong offset, ref INSTRUCTION instr, INTERNAL_DATA idata, DISMODE mode)
        {
            if ((idata.prefixes[PREF_REX_INDEX] != 0xFF) && ((instr.rex & PREFIX_REX_W)!=0))
            {
            idata.is_rex_used = 1;
            instr.mnemonic = "cmpxchg16b";
            instr.ops[0].size = (ushort)OP_SIZE.OPERAND_SIZE_128;
            }

            return 0;
        }
开发者ID:Rex-Hays,项目名称:GNIDA2,代码行数:11,代码来源:mediana.cs


示例3: post_proc_nop_pause

        static UInt32 post_proc_nop_pause(ulong origin_offset, ulong offset, ref INSTRUCTION instr, INTERNAL_DATA idata, DISMODE mode)
        {
            if (idata.prefixes[PREF_REP_INDEX] == PREF_REPNZ_ID)
            {
            instr.id = ID_PAUSE;
            instr.groups = GRP_CACHECT | GRP_SSE2;
            idata.prefixes[PREF_REP_INDEX] = 0xFF;
            instr.mnemonic ="pause";
            }

            return 0;
        }
开发者ID:Rex-Hays,项目名称:GNIDA2,代码行数:12,代码来源:mediana.cs


示例4: parse_operand

        static UInt32 parse_operand(ulong origin_offset, ulong offset, INTERNAL_OPERAND iop, INSTRUCTION instr, int op_index, INTERNAL_DATA idata, DISMODE mode)
        {
            UInt32 res = 0;
            OPERAND_SIZE opsize = new OPERAND_SIZE();

            if (iop.type != TQ_NULL)
            {
            instr.ops[op_index].flags |= OPERAND_FLAG_PRESENT;
            if (iop.size >= sq_handlers.Count())
            {
            idata.severe_err = ERRS.ERR_INTERNAL;
            }
            else
            {
            sq_handlers[iop.size](ref opsize, ref instr, idata, mode);
            }

            if (iop.size >= tq_handlers.Count())
            {
            idata.severe_err = ERRS.ERR_INTERNAL;
            }
            else
            {
            res = tq_handlers[iop.type](origin_offset, offset, ref instr, op_index, opsize, idata, mode);
            }
            }

            return res;
        }
开发者ID:Rex-Hays,项目名称:GNIDA2,代码行数:29,代码来源:mediana.cs


示例5: parse_rm_operand

        //Parses operand accordingly to MODRM value.
        static UInt32 parse_rm_operand(ulong origin_offset, ulong  offset, ref INSTRUCTION instr, int op_index, OPERAND_SIZE opsize, ref INTERNAL_DATA idata, DISMODE mode)
        {
            UInt32 len = 0;

            if ((instr.modrm & 0xC0) == 0xC0)
            {
            create_genreg_operand(ref instr, op_index, (byte)(instr.modrm & 0x7), opsize.size, PREFIX_REX_B, ref idata, mode);
            }
            else
            {
            len = parse_mem_operand(origin_offset, offset, ref instr, op_index, opsize, idata, mode);
            }

            return len;
        }
开发者ID:Rex-Hays,项目名称:GNIDA2,代码行数:16,代码来源:mediana.cs


示例6: parse_mem_operand

        //Parses memory address operand.
        static UInt32 parse_mem_operand(ulong origin_offset, ulong offset, ref INSTRUCTION instr, int op_index, OPERAND_SIZE opsize, INTERNAL_DATA idata, DISMODE mode)
        {
            UInt32 len;

            instr.ops[op_index].flags |= (byte)OP_TYPE.OPERAND_TYPE_MEM;
            instr.ops[op_index].size = (ushort)opsize.size;
            if (instr.addrsize == ADDR_SIZE_16)
            {
            len = parse_mem_operand_16(origin_offset, offset, ref instr, op_index, mode);
            }
            else
            {
            len = parse_mem_operand_32_64(origin_offset, offset, ref instr, op_index, idata, mode);
            }
            idata.is_addrsize_used = 1;

            return len;
        }
开发者ID:Rex-Hays,项目名称:GNIDA2,代码行数:19,代码来源:mediana.cs


示例7: parse_mnemonic

 //Parses instruction's mnemonic. If mnemonic is simple, it is just copied to
 // struct INSTRUCTION. If mnemonic contains has multi mnemonic indicator (MM_INDICATOR)
 // at first character then it depends on implicit operand's size. In this case the function
 // calls get_instruction_opsize and builds choses mnemonic basing on result.
 static void parse_mnemonic(OPCODE_DESCRIPTOR opcode, INSTRUCTION instr, INTERNAL_DATA idata, DISMODE mode)
 {
     if ((opcode.mnemonic.value.Length>0) && (opcode.mnemonic.value[0] != MM_INDICATOR))
     {
     instr.mnemonic = opcode.mnemonic.value;
     }
     else
     {
     get_instruction_opsize(opcode.mnemonic, instr, idata, mode);
     instr.mnemonic = opcode.mnemonic.values[bsr(instr.opsize) - 1];
     }
 }
开发者ID:Rex-Hays,项目名称:GNIDA2,代码行数:16,代码来源:mediana.cs


示例8: tq_T

        public static UInt32 tq_T(ulong origin_offset, ulong offset, ref INSTRUCTION instr, int op_index, OPERAND_SIZE opsize, INTERNAL_DATA idata, DISMODE mode)
        {
            create_reg_operand(ref instr, op_index, REG_TYPE.REG_TYPE_TR, (byte)((instr.modrm >> 0x3) & 0x7), opsize.size);

            return 0x0;
        }
开发者ID:Rex-Hays,项目名称:GNIDA2,代码行数:6,代码来源:mediana.cs


示例9: tq_V

        public static UInt32 tq_V(ulong origin_offset, ulong offset, ref INSTRUCTION instr, int op_index, OPERAND_SIZE opsize, INTERNAL_DATA idata, DISMODE mode)
        {
            create_xmmreg_operand(ref instr, op_index, (byte)((instr.modrm >> 0x3) & 0x7), opsize.size, PREFIX_REX_R, ref idata, mode);

            return 0;
        }
开发者ID:Rex-Hays,项目名称:GNIDA2,代码行数:6,代码来源:mediana.cs


示例10: tq_rSP

        public static UInt32 tq_rSP(ulong origin_offset, ulong offset, ref INSTRUCTION instr, int op_index, OPERAND_SIZE opsize, INTERNAL_DATA idata, DISMODE mode)
        {
            create_genreg_operand(ref instr, op_index, REG_CODE_SP, opsize.size, PREFIX_REX_B, ref idata, mode);

            return 0x0;
        }
开发者ID:Rex-Hays,项目名称:GNIDA2,代码行数:6,代码来源:mediana.cs


示例11: tq_SS

        public static UInt32 tq_SS(ulong origin_offset, ulong offset, ref INSTRUCTION instr, int op_index, OPERAND_SIZE opsize, INTERNAL_DATA idata, DISMODE mode)
        {
            create_reg_operand(ref instr, op_index, REG_TYPE.REG_TYPE_SEG, SREG_CODE_SS, opsize.size);

            return 0;
        }
开发者ID:Rex-Hays,项目名称:GNIDA2,代码行数:6,代码来源:mediana.cs


示例12: tq_R

 public static UInt32 tq_R(ulong origin_offset, ulong offset, ref INSTRUCTION instr, int op_index, OPERAND_SIZE opsize, INTERNAL_DATA idata, DISMODE mode)
 {
     UInt32 res = parse_rm_operand(origin_offset, offset, ref instr, op_index, opsize, ref idata, mode);
     if ((instr.modrm & 0xC0) != 0xC0)
     {
     idata.err = ERRS.ERR_RM_MEM;//error: rm encodes memory.
     }
     return res;
 }
开发者ID:Rex-Hays,项目名称:GNIDA2,代码行数:9,代码来源:mediana.cs


示例13: tq_O

        public static UInt32 tq_O(ulong origin_offset, ulong offset, ref INSTRUCTION instr, int op_index, OPERAND_SIZE opsize, INTERNAL_DATA idata, DISMODE mode)
        {
            UInt32 res;

            res = instr.addrsize;
            instr.ops[op_index].flags |= (byte) OP_TYPE.OPERAND_TYPE_MEM;
            instr.ops[op_index].size = (ushort)opsize.size;
            instr.ops[op_index].value.addr.mod = ADDR_MOD_DISP;
            //instr.disp.value.ab = assembly.Image.ReadBytes(offset, instr.addrsize);
            byte[] bt = assembly.ReadBytes(offset, instr.addrsize);
            instr.disp.value.d64 = 0;
            foreach (byte bb in bt.Reverse())
            {
            instr.disp.value.d64 <<= 8;
            instr.disp.value.d64 += bb;
            }

            get_seg(ref instr, op_index, idata.prefixes, mode);

            return res;
        }
开发者ID:Rex-Hays,项目名称:GNIDA2,代码行数:21,代码来源:mediana.cs


示例14: tq_J

 public static UInt32 tq_J(ulong origin_offset, ulong offset, ref INSTRUCTION instr, int op_index, OPERAND_SIZE opsize, INTERNAL_DATA idata, DISMODE mode)
 {
     instr.ops[op_index].flags |= OPERAND_FLAG_REL;
     return tq_I(origin_offset, offset, ref instr, op_index, opsize, idata, mode);
 }
开发者ID:Rex-Hays,项目名称:GNIDA2,代码行数:5,代码来源:mediana.cs


示例15: get_instruction_opsize

        //Get instruction's size. Well, really this is size of implicit operand
        // that influences on instruction's mnemonic.
        static void get_instruction_opsize(MULTI_MNEMONIC multi_mnemonic, INSTRUCTION instr, INTERNAL_DATA idata, DISMODE mode)
        {
            OPERAND_SIZE opsize = new OPERAND_SIZE();

            if (multi_mnemonic.size >= sq_handlers.Count())
            {
            idata.severe_err = ERRS.ERR_INTERNAL;
            }
            else
            {
            sq_handlers[multi_mnemonic.size](ref opsize, ref instr, idata, mode);
            }

            instr.opsize = (byte)opsize.size; //Possible sizes are 2/4/8.
        }
开发者ID:Rex-Hays,项目名称:GNIDA2,代码行数:17,代码来源:mediana.cs


示例16: tq_W

        public static UInt32 tq_W(ulong origin_offset, ulong offset, ref INSTRUCTION instr, int op_index, OPERAND_SIZE opsize, INTERNAL_DATA idata, DISMODE mode)
        {
            UInt32 res;

            if ((instr.modrm & 0xC0) == 0xC0)
            {
            create_xmmreg_operand(ref instr, op_index, (byte)(instr.modrm & 0x7), opsize.size, PREFIX_REX_B, ref idata, mode);
            res = 0;
            }
            else
            {
            res = parse_mem_operand(origin_offset, offset, ref instr, op_index, opsize, idata, mode);
            }

            return res;
        }
开发者ID:Rex-Hays,项目名称:GNIDA2,代码行数:16,代码来源:mediana.cs


示例17: lookup_opcode

        //Reads input stream and iterates through tables looking up appropriate struct OPCODE_DESCRIPTOR.
        // Byte value at [offset] is used as index, the function checks tables limits and max instruction's length.
        static UInt32 lookup_opcode(ulong offset, byte table, ref OPCODE_DESCRIPTOR opcode_descr, INTERNAL_DATA idata)
        {
            byte max;
            byte opcode;
            UInt32 res;

            res = 0;
            //opcode_descr = NULL;
            do
            {
            opcode = assembly.ReadBytes(offset, 1)[0];

            opcode >>= tables[table].shift;
            opcode &= tables[table].mask;
            opcode -= tables[table].min;
            //It looks strange, but I want that table descriptors contain
            // "real" values.
            max = (byte)(tables[table].max - tables[table].min);
            if (opcode > max)
            {
            idata.severe_err = ERRS.ERR_BADCODE;
            break;
            }

            if (res > Dasmer.MAX_INSTRUCTION_LEN)
            {
            idata.severe_err = ERRS.ERR_TOO_LONG;
            break;
            }

            if ( (tables[table].props & TBL_PROP_MODRM)==0 )
            {
            res++;
            offset++;
            }

            if ((tables[table].opcodes[opcode].groups & GRP_SWITCH)!=0)
            {
            table = (byte)tables[table].opcodes[opcode].props;// &0xFF;
            continue;
            }
            break;
            }
            while(true);

            if (idata.severe_err == ERRS.ERR_OK)
            opcode_descr = tables[table].opcodes[opcode];

            return res;
        }
开发者ID:Rex-Hays,项目名称:GNIDA2,代码行数:52,代码来源:mediana.cs


示例18: tq_X

        public static UInt32 tq_X(ulong origin_offset, ulong offset, ref INSTRUCTION instr, int op_index, OPERAND_SIZE opsize, INTERNAL_DATA idata, DISMODE mode)
        {
            UInt32 res;

            res = 0;
            instr.ops[op_index].flags |= (byte)OP_TYPE.OPERAND_TYPE_MEM;
            instr.ops[op_index].size = (ushort)opsize.size;
            instr.ops[op_index].value.addr.mod = ADDR_MOD_BASE;
            instr.ops[op_index].value.addr.bas = REG_CODE_SI;
            get_seg(ref instr, op_index, idata.prefixes, mode);

            return 0x0;
        }
开发者ID:Rex-Hays,项目名称:GNIDA2,代码行数:13,代码来源:mediana.cs


示例19: parse_mem_operand_32_64

        //Parses 32/64bit memory address operand.
        static UInt32 parse_mem_operand_32_64(ulong origin_offset, ulong offset, ref INSTRUCTION instr, int op_index, INTERNAL_DATA idata, DISMODE mode)
        {
            UInt32 len = 0;

            if ((instr.flags & INSTR_FLAG_SIB)!=0)
            {
            instr.ops[op_index].value.addr.mod = (byte)(instr.modrm >> 0x6);
            instr.ops[op_index].value.addr.bas = (byte)(instr.sib & 0x7);
            instr.ops[op_index].value.addr.index = (byte)((instr.sib >> 3) & 0x7);
            instr.ops[op_index].value.addr.scale = (byte)(1 << (instr.sib >> 0x6));

            if (mode == DISMODE.DISASSEMBLE_MODE_64 && idata.prefixes[PREF_REX_INDEX] != 0xFF)
            {
            if ((instr.rex & PREFIX_REX_B)!=0)
            {
                instr.ops[op_index].value.addr.bas |= REG_CODE_64;
                idata.is_rex_used = 1;
            }
            if ((instr.rex & PREFIX_REX_X)!=0)
            {
                instr.ops[op_index].value.addr.index |= REG_CODE_64;
                idata.is_rex_used = 1;
            }
            }
            len = get_disp(origin_offset, offset, ref instr, op_index, mode);
            get_mod_type_sib(ref instr, op_index);
            }
            else
            {
            instr.ops[op_index].value.addr.mod = (byte)(instr.modrm >> 0x6);
            instr.ops[op_index].value.addr.bas = (byte)(instr.modrm & 0x7);

            if (mode == DISMODE.DISASSEMBLE_MODE_64)
            {
            if ((idata.prefixes[PREF_REX_INDEX] != 0xFF) && ((instr.rex & PREFIX_REX_B)!=0))
            {
                instr.ops[op_index].value.addr.bas |= REG_CODE_64;
                idata.is_rex_used = 1;
            }

            if ( (instr.ops[op_index].value.addr.mod == 0x0) &&
                 ((instr.ops[op_index].value.addr.bas == REG_CODE_BP) ||
                  (instr.ops[op_index].value.addr.bas == REG_CODE_R13)) )
            {
                instr.ops[op_index].value.addr.bas = REG_CODE_IP;
            }
            }
            len = get_disp(origin_offset, offset, ref instr, op_index, mode);
            get_mod_type_modrm(ref instr, op_index);
            }
            get_seg(ref instr, op_index, idata.prefixes, mode);

            return len;
        }
开发者ID:Rex-Hays,项目名称:GNIDA2,代码行数:55,代码来源:mediana.cs


示例20: tq_Y

        public static UInt32 tq_Y(ulong origin_offset, ulong offset, ref INSTRUCTION instr, int op_index, OPERAND_SIZE opsize, INTERNAL_DATA idata, DISMODE mode)
        {
            instr.ops[op_index].flags |= (byte)OP_TYPE.OPERAND_TYPE_MEM;
            instr.ops[op_index].size = (ushort)opsize.size;
            if (mode == DISMODE.DISASSEMBLE_MODE_64)
            instr.ops[op_index].value.addr.seg = SREG_CODE_CS;
            else
            instr.ops[op_index].value.addr.seg = SREG_CODE_ES;
            instr.ops[op_index].value.addr.mod = ADDR_MOD_BASE;
            instr.ops[op_index].value.addr.bas = REG_CODE_DI;

            return 0x0;
        }
开发者ID:Rex-Hays,项目名称:GNIDA2,代码行数:13,代码来源:mediana.cs



注:本文中的INTERNAL_DATA类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# INakedObject类代码示例发布时间:2022-05-24
下一篇:
C# INT类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap