Rizin
unix-like reverse engineering framework and cli tools
|
#include <rz_analysis.h>
#include <rz_lib.h>
#include <capstone/capstone.h>
#include <capstone/x86.h>
Go to the source code of this file.
Classes | |
struct | x86_cs_context_t |
struct | Getarg |
Macros | |
#define | CYCLE_REG 0 |
#define | CYCLE_MEM 1 |
#define | CYCLE_JMP 2 |
#define | HAVE_CSGRP_PRIVILEGE 0 |
#define | opexprintf(op, fmt, ...) rz_strbuf_setf(&op->opex, fmt, ##__VA_ARGS__) |
#define | INSOP(n) insn->detail->x86.operands[n] |
#define | INSOPS insn->detail->x86.op_count |
#define | ISIMM(x) insn->detail->x86.operands[x].type == X86_OP_IMM |
#define | ISMEM(x) insn->detail->x86.operands[x].type == X86_OP_MEM |
#define | BUF_SZ 64 |
#define | AR_DIM 4 |
#define | SRC_AR 0 |
#define | DST_AR 1 |
#define | DST_R_AR 1 |
#define | DST_W_AR 2 |
#define | SRC2_AR 2 |
#define | DST2_AR 2 |
#define | DSTADD_AR 3 |
#define | ARG0_AR 0 |
#define | ARG1_AR 1 |
#define | ARG2_AR 2 |
#define | CREATE_SRC_DST(op) |
#define | KW(d, ds, m, ms) rz_list_append(l, rz_search_keyword_new((const ut8 *)d, ds, (const ut8 *)m, ms, NULL)) |
Typedefs | |
typedef struct x86_cs_context_t | X86CSContext |
Variables | |
RzAnalysisPlugin | rz_analysis_plugin_x86_cs |
RZ_API RzLibStruct | rizin_plugin |
#define AR_DIM 4 |
Definition at line 42 of file analysis_x86_cs.c.
#define ARG0_AR 0 |
Definition at line 51 of file analysis_x86_cs.c.
#define ARG1_AR 1 |
Definition at line 52 of file analysis_x86_cs.c.
#define ARG2_AR 2 |
Definition at line 53 of file analysis_x86_cs.c.
#define BUF_SZ 64 |
Definition at line 40 of file analysis_x86_cs.c.
#define CREATE_SRC_DST | ( | op | ) |
Definition at line 2042 of file analysis_x86_cs.c.
#define CYCLE_JMP 2 |
Definition at line 20 of file analysis_x86_cs.c.
#define CYCLE_MEM 1 |
Definition at line 19 of file analysis_x86_cs.c.
#define CYCLE_REG 0 |
Definition at line 18 of file analysis_x86_cs.c.
#define DST2_AR 2 |
Definition at line 49 of file analysis_x86_cs.c.
#define DST_AR 1 |
Definition at line 45 of file analysis_x86_cs.c.
#define DST_R_AR 1 |
Definition at line 46 of file analysis_x86_cs.c.
#define DST_W_AR 2 |
Definition at line 47 of file analysis_x86_cs.c.
#define DSTADD_AR 3 |
Definition at line 50 of file analysis_x86_cs.c.
#define HAVE_CSGRP_PRIVILEGE 0 |
Definition at line 27 of file analysis_x86_cs.c.
#define INSOP | ( | n | ) | insn->detail->x86.operands[n] |
Definition at line 35 of file analysis_x86_cs.c.
#define INSOPS insn->detail->x86.op_count |
Definition at line 36 of file analysis_x86_cs.c.
#define ISIMM | ( | x | ) | insn->detail->x86.operands[x].type == X86_OP_IMM |
Definition at line 37 of file analysis_x86_cs.c.
#define ISMEM | ( | x | ) | insn->detail->x86.operands[x].type == X86_OP_MEM |
Definition at line 38 of file analysis_x86_cs.c.
#define KW | ( | d, | |
ds, | |||
m, | |||
ms | |||
) | rz_list_append(l, rz_search_keyword_new((const ut8 *)d, ds, (const ut8 *)m, ms, NULL)) |
#define opexprintf | ( | op, | |
fmt, | |||
... | |||
) | rz_strbuf_setf(&op->opex, fmt, ##__VA_ARGS__) |
Definition at line 34 of file analysis_x86_cs.c.
#define SRC2_AR 2 |
Definition at line 48 of file analysis_x86_cs.c.
#define SRC_AR 0 |
Definition at line 44 of file analysis_x86_cs.c.
typedef struct x86_cs_context_t X86CSContext |
|
static |
Definition at line 3150 of file analysis_x86_cs.c.
References a, addr, anop(), anop_esil(), cond_x862r2(), CS_ARCH_X86, cs_close(), cs_disasm(), capstone::CS_ERR_OK, cs_free(), cs_insn_group(), cs_len_prefix_opcode(), cs_open(), CS_OPT_DETAIL, CS_OPT_ON, cs_option(), len, mask, n, op_fillval(), opex(), RZ_ANALYSIS_OP_FAMILY_CPU, RZ_ANALYSIS_OP_FAMILY_PRIV, RZ_ANALYSIS_OP_FAMILY_THREAD, RZ_ANALYSIS_OP_MASK_DISASM, RZ_ANALYSIS_OP_MASK_ESIL, RZ_ANALYSIS_OP_MASK_OPEX, RZ_ANALYSIS_OP_MASK_VAL, RZ_ANALYSIS_OP_PREFIX_LOCK, RZ_ANALYSIS_OP_PREFIX_REP, RZ_ANALYSIS_OP_PREFIX_REPNE, RZ_ANALYSIS_OP_TYPE_ILL, rz_str_newf(), select_mode(), set_opdir(), strdup(), X86_GRP_PRIVILEGE, X86_PREFIX_LOCK, X86_PREFIX_REP, and X86_PREFIX_REPNE.
|
static |
Definition at line 3703 of file analysis_x86_cs.c.
References rz_analysis_t::bits, KW, NULL, rz_list_free(), rz_list_newf(), and rz_search_keyword_free().
|
static |
Definition at line 2218 of file analysis_x86_cs.c.
References a, addr, cs_insn_group(), cs_reg_name(), CYCLE_JMP, CYCLE_MEM, CYCLE_REG, Getarg::handle, handle, imm, Getarg::insn, INSOP, int, mem, NULL, off, op0_memimmhandle(), op1_memimmhandle(), op_stackidx(), reg, RZ_ANALYSIS_OP_FAMILY_CPU, RZ_ANALYSIS_OP_FAMILY_CRYPTO, RZ_ANALYSIS_OP_FAMILY_FPU, RZ_ANALYSIS_OP_FAMILY_MMX, RZ_ANALYSIS_OP_FAMILY_PRIV, RZ_ANALYSIS_OP_FAMILY_SSE, RZ_ANALYSIS_OP_FAMILY_THREAD, RZ_ANALYSIS_OP_TYPE_ABS, RZ_ANALYSIS_OP_TYPE_ACMP, RZ_ANALYSIS_OP_TYPE_ADD, RZ_ANALYSIS_OP_TYPE_AND, RZ_ANALYSIS_OP_TYPE_CALL, RZ_ANALYSIS_OP_TYPE_CJMP, RZ_ANALYSIS_OP_TYPE_CMOV, RZ_ANALYSIS_OP_TYPE_CMP, RZ_ANALYSIS_OP_TYPE_COND, RZ_ANALYSIS_OP_TYPE_DIV, RZ_ANALYSIS_OP_TYPE_IO, RZ_ANALYSIS_OP_TYPE_IRCALL, RZ_ANALYSIS_OP_TYPE_IRJMP, RZ_ANALYSIS_OP_TYPE_JMP, RZ_ANALYSIS_OP_TYPE_LEA, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_ANALYSIS_OP_TYPE_MJMP, RZ_ANALYSIS_OP_TYPE_MOV, RZ_ANALYSIS_OP_TYPE_MUL, RZ_ANALYSIS_OP_TYPE_NOP, RZ_ANALYSIS_OP_TYPE_NOT, RZ_ANALYSIS_OP_TYPE_OR, RZ_ANALYSIS_OP_TYPE_POP, RZ_ANALYSIS_OP_TYPE_PUSH, RZ_ANALYSIS_OP_TYPE_RCALL, RZ_ANALYSIS_OP_TYPE_REG, RZ_ANALYSIS_OP_TYPE_RET, RZ_ANALYSIS_OP_TYPE_RJMP, RZ_ANALYSIS_OP_TYPE_ROL, RZ_ANALYSIS_OP_TYPE_ROR, RZ_ANALYSIS_OP_TYPE_RPUSH, RZ_ANALYSIS_OP_TYPE_SAL, RZ_ANALYSIS_OP_TYPE_SAR, RZ_ANALYSIS_OP_TYPE_SHL, RZ_ANALYSIS_OP_TYPE_SHR, RZ_ANALYSIS_OP_TYPE_STORE, RZ_ANALYSIS_OP_TYPE_SUB, RZ_ANALYSIS_OP_TYPE_SWI, RZ_ANALYSIS_OP_TYPE_TRAP, RZ_ANALYSIS_OP_TYPE_UCALL, RZ_ANALYSIS_OP_TYPE_UJMP, RZ_ANALYSIS_OP_TYPE_UPUSH, RZ_ANALYSIS_OP_TYPE_XOR, RZ_ANALYSIS_STACK_GET, RZ_ANALYSIS_STACK_INC, RZ_ANALYSIS_STACK_SET, type, ut64(), UT64_MAX, X86_GRP_MMX, X86_GRP_SSE1, X86_GRP_SSE2, X86_GRP_SSE3, X86_INS_AAM, X86_INS_ADC, X86_INS_ADD, X86_INS_ADDPD, X86_INS_ADDPS, X86_INS_ADDSD, X86_INS_ADDSS, X86_INS_ADDSUBPD, X86_INS_ADDSUBPS, X86_INS_AESDEC, X86_INS_AESDECLAST, X86_INS_AESENC, X86_INS_AESENCLAST, X86_INS_AESIMC, X86_INS_AESKEYGENASSIST, X86_INS_AND, X86_INS_ANDN, X86_INS_ANDNPD, X86_INS_ANDNPS, X86_INS_ANDPD, X86_INS_ANDPS, X86_INS_BT, X86_INS_BTC, X86_INS_BTR, X86_INS_BTS, X86_INS_CALL, X86_INS_CLAC, X86_INS_CLC, X86_INS_CLD, X86_INS_CLGI, X86_INS_CLI, X86_INS_CLTS, X86_INS_CLWB, X86_INS_CMOVA, X86_INS_CMOVAE, X86_INS_CMOVB, X86_INS_CMOVBE, X86_INS_CMOVE, X86_INS_CMOVG, X86_INS_CMOVGE, X86_INS_CMOVL, X86_INS_CMOVLE, X86_INS_CMOVNE, X86_INS_CMOVNO, X86_INS_CMOVNP, X86_INS_CMOVNS, X86_INS_CMOVO, X86_INS_CMOVP, X86_INS_CMOVS, X86_INS_CMP, X86_INS_CMPPD, X86_INS_CMPPS, X86_INS_CMPSB, X86_INS_CMPSD, X86_INS_CMPSQ, X86_INS_CMPSS, X86_INS_CMPSW, X86_INS_CPUID, X86_INS_CRC32, X86_INS_CVTSS2SD, X86_INS_DEC, X86_INS_DIV, X86_INS_ENTER, X86_INS_FABS, X86_INS_FADD, X86_INS_FADDP, X86_INS_FBLD, X86_INS_FBSTP, X86_INS_FCMOVB, X86_INS_FCMOVBE, X86_INS_FCMOVE, X86_INS_FCMOVNB, X86_INS_FCMOVNBE, X86_INS_FCMOVNE, X86_INS_FCMOVNU, X86_INS_FCMOVU, X86_INS_FCOMPP, X86_INS_FDECSTP, X86_INS_FDIV, X86_INS_FDIVP, X86_INS_FDIVR, X86_INS_FDIVRP, X86_INS_FEMMS, X86_INS_FFREE, X86_INS_FFREEP, X86_INS_FICOM, X86_INS_FICOMP, X86_INS_FIDIV, X86_INS_FIDIVR, X86_INS_FIMUL, X86_INS_FINCSTP, X86_INS_FIST, X86_INS_FISTP, X86_INS_FISTTP, X86_INS_FISUB, X86_INS_FISUBR, X86_INS_FLD, X86_INS_FLD1, X86_INS_FLDCW, X86_INS_FLDENV, X86_INS_FLDL2E, X86_INS_FLDL2T, X86_INS_FLDLG2, X86_INS_FLDLN2, X86_INS_FLDPI, X86_INS_FLDZ, X86_INS_FMUL, X86_INS_FMULP, X86_INS_FNCLEX, X86_INS_FNINIT, X86_INS_FNOP, X86_INS_FNSAVE, X86_INS_FNSTCW, X86_INS_FNSTENV, X86_INS_FNSTSW, X86_INS_FPATAN, X86_INS_FPREM, X86_INS_FPREM1, X86_INS_FPTAN, X86_INS_FRNDINT, X86_INS_FRSTOR, X86_INS_FSCALE, X86_INS_FSETPM, X86_INS_FSINCOS, X86_INS_FSQRT, X86_INS_FST, X86_INS_FSTP, X86_INS_FSTPNCE, X86_INS_FSUB, X86_INS_FSUBP, X86_INS_FSUBR, X86_INS_FSUBRP, X86_INS_FTST, X86_INS_FUCOM, X86_INS_FUCOMI, X86_INS_FUCOMP, X86_INS_FUCOMPP, X86_INS_FXAM, X86_INS_FXCH, X86_INS_FXRSTOR, X86_INS_FXRSTOR64, X86_INS_FXSAVE, X86_INS_FXSAVE64, X86_INS_FXTRACT, X86_INS_FYL2X, X86_INS_FYL2XP1, X86_INS_HLT, X86_INS_IDIV, X86_INS_IMUL, X86_INS_IN, X86_INS_INC, X86_INS_INSB, X86_INS_INSD, X86_INS_INSW, X86_INS_INT, X86_INS_INT1, X86_INS_INT3, X86_INS_INTO, X86_INS_IRET, X86_INS_IRETD, X86_INS_IRETQ, X86_INS_JA, X86_INS_JAE, X86_INS_JB, X86_INS_JBE, X86_INS_JCXZ, X86_INS_JE, X86_INS_JECXZ, X86_INS_JG, X86_INS_JGE, X86_INS_JL, X86_INS_JLE, X86_INS_JMP, X86_INS_JNE, X86_INS_JNO, X86_INS_JNP, X86_INS_JNS, X86_INS_JO, X86_INS_JP, X86_INS_JRCXZ, X86_INS_JS, X86_INS_KXORW, X86_INS_LCALL, X86_INS_LEA, X86_INS_LEAVE, X86_INS_LFENCE, X86_INS_LIDT, X86_INS_LJMP, X86_INS_LODSB, X86_INS_LODSD, X86_INS_LODSQ, X86_INS_LODSW, X86_INS_LOOP, X86_INS_LOOPE, X86_INS_LOOPNE, X86_INS_MFENCE, X86_INS_MOV, X86_INS_MOVABS, X86_INS_MOVAPD, X86_INS_MOVAPS, X86_INS_MOVBE, X86_INS_MOVD, X86_INS_MOVDQ2Q, X86_INS_MOVHPD, X86_INS_MOVHPS, X86_INS_MOVLPD, X86_INS_MOVLPS, X86_INS_MOVNTDQ, X86_INS_MOVNTDQA, X86_INS_MOVNTI, X86_INS_MOVNTPD, X86_INS_MOVNTPS, X86_INS_MOVNTQ, X86_INS_MOVNTSD, X86_INS_MOVNTSS, X86_INS_MOVQ, X86_INS_MOVSB, X86_INS_MOVSD, X86_INS_MOVSQ, X86_INS_MOVSS, X86_INS_MOVSW, X86_INS_MOVSX, X86_INS_MOVSXD, X86_INS_MOVUPS, X86_INS_MOVZX, X86_INS_MUL, X86_INS_MULPD, X86_INS_MULPS, X86_INS_MULSD, X86_INS_MULSS, X86_INS_MULX, X86_INS_NEG, X86_INS_NOP, X86_INS_NOT, X86_INS_OR, X86_INS_OUT, X86_INS_OUTSB, X86_INS_OUTSD, X86_INS_OUTSW, X86_INS_PACKSSDW, X86_INS_PACKSSWB, X86_INS_PACKUSWB, X86_INS_PADDB, X86_INS_PADDD, X86_INS_PADDSB, X86_INS_PADDSW, X86_INS_PADDUSB, X86_INS_PADDUSW, X86_INS_PADDW, X86_INS_PALIGNR, X86_INS_PAUSE, X86_INS_PCMPEQB, X86_INS_PCMPEQD, X86_INS_PCMPEQQ, X86_INS_PCMPEQW, X86_INS_PCMPESTRI, X86_INS_PCMPESTRM, X86_INS_PCMPGTB, X86_INS_PCMPGTD, X86_INS_PCMPGTQ, X86_INS_PCMPGTW, X86_INS_PCMPISTRI, X86_INS_PCMPISTRM, X86_INS_POP, X86_INS_POPAL, X86_INS_POPAW, X86_INS_POPF, X86_INS_POPFD, X86_INS_POPFQ, X86_INS_PSUBB, X86_INS_PSUBD, X86_INS_PSUBQ, X86_INS_PSUBSB, X86_INS_PSUBSW, X86_INS_PSUBUSB, X86_INS_PSUBUSW, X86_INS_PSUBW, X86_INS_PUSH, X86_INS_PUSHAL, X86_INS_PUSHAW, X86_INS_PUSHF, X86_INS_PUSHFD, X86_INS_PUSHFQ, X86_INS_PXOR, X86_INS_RCL, X86_INS_RCR, X86_INS_RDMSR, X86_INS_RDPMC, X86_INS_RDRAND, X86_INS_RDSEED, X86_INS_RDTSC, X86_INS_RDTSCP, X86_INS_RET, X86_INS_RETF, X86_INS_RETFQ, X86_INS_ROL, X86_INS_ROR, X86_INS_SAL, X86_INS_SALC, X86_INS_SAR, X86_INS_SARX, X86_INS_SBB, X86_INS_SETA, X86_INS_SETAE, X86_INS_SETB, X86_INS_SETBE, X86_INS_SETE, X86_INS_SETG, X86_INS_SETGE, X86_INS_SETL, X86_INS_SETLE, X86_INS_SETNE, X86_INS_SETNO, X86_INS_SETNP, X86_INS_SETNS, X86_INS_SETO, X86_INS_SETP, X86_INS_SETS, X86_INS_SFENCE, X86_INS_SHA1MSG1, X86_INS_SHA1MSG2, X86_INS_SHA1NEXTE, X86_INS_SHA1RNDS4, X86_INS_SHA256MSG1, X86_INS_SHA256MSG2, X86_INS_SHA256RNDS2, X86_INS_SHL, X86_INS_SHLD, X86_INS_SHLX, X86_INS_SHR, X86_INS_SHRD, X86_INS_SHRX, X86_INS_SIDT, X86_INS_STAC, X86_INS_STC, X86_INS_STD, X86_INS_STGI, X86_INS_STI, X86_INS_STOSB, X86_INS_STOSD, X86_INS_STOSQ, X86_INS_STOSW, X86_INS_SUB, X86_INS_SUBSD, X86_INS_SYSCALL, X86_INS_SYSENTER, X86_INS_SYSEXIT, X86_INS_SYSRET, X86_INS_TEST, X86_INS_UD0, X86_INS_UD2, X86_INS_UD2B, X86_INS_VALIGND, X86_INS_VALIGNQ, X86_INS_VMCALL, X86_INS_VMMCALL, X86_INS_VMOVNTDQ, X86_INS_VMOVNTDQA, X86_INS_VMOVNTPD, X86_INS_VMOVNTPS, X86_INS_VPALIGNR, X86_INS_VPCMPB, X86_INS_VPCMPD, X86_INS_VPCMPEQB, X86_INS_VPCMPEQD, X86_INS_VPCMPEQQ, X86_INS_VPCMPEQW, X86_INS_VPCMPESTRI, X86_INS_VPCMPESTRM, X86_INS_VPCMPGTB, X86_INS_VPCMPGTD, X86_INS_VPCMPGTQ, X86_INS_VPCMPGTW, X86_INS_VPCMPISTRI, X86_INS_VPCMPISTRM, X86_INS_VPCMPQ, X86_INS_VPCMPUB, X86_INS_VPCMPUD, X86_INS_VPCMPUQ, X86_INS_VPCMPUW, X86_INS_VPCMPW, X86_INS_VPXOR, X86_INS_VPXORD, X86_INS_VPXORQ, X86_INS_VXORPD, X86_INS_VXORPS, X86_INS_XADD, X86_INS_XCHG, X86_INS_XOR, X86_INS_XORPS, X86_OP_IMM, X86_OP_MEM, X86_OP_REG, X86_REG_EBP, X86_REG_INVALID, X86_REG_RBP, and X86_REG_RIP.
Referenced by analop().
|
static |
Definition at line 382 of file analysis_x86_cs.c.
References a, addr, ARG0_AR, ARG1_AR, ARG2_AR, bits(), cleanup(), counter, cs_reg_name(), dst, DST2_AR, DST_AR, DST_R_AR, DST_W_AR, DSTADD_AR, esilprintf, getarg(), Getarg::handle, handle, imm, in, Getarg::insn, INSOP, INSOPS, int, is_xmm_reg(), ISIMM, mem, NULL, off, pc, PFMT64x, reg, reg32_to_name(), rs, RZ_ABS, RZ_ANALYSIS_OP_PREFIX_REP, rz_analysis_value_new(), RZ_LOG_ERROR, rz_reg_32_to_64(), rz_reg_get(), RZ_REG_TYPE_GPR, rz_strbuf_appendf(), si, sp, src, SRC2_AR, SRC_AR, type, ut64(), val, width, X86_INS_AAA, X86_INS_AAD, X86_INS_AAM, X86_INS_ADC, X86_INS_ADD, X86_INS_ADDPD, X86_INS_ADDPS, X86_INS_ADDSD, X86_INS_ADDSS, X86_INS_ADDSUBPD, X86_INS_ADDSUBPS, X86_INS_AESDEC, X86_INS_AESDECLAST, X86_INS_AESENC, X86_INS_AESENCLAST, X86_INS_AESIMC, X86_INS_AESKEYGENASSIST, X86_INS_AND, X86_INS_ANDN, X86_INS_ANDNPD, X86_INS_ANDNPS, X86_INS_ANDPD, X86_INS_ANDPS, X86_INS_BSF, X86_INS_BSR, X86_INS_BSWAP, X86_INS_BT, X86_INS_BTC, X86_INS_BTR, X86_INS_BTS, X86_INS_CALL, X86_INS_CBW, X86_INS_CDQ, X86_INS_CDQE, X86_INS_CLAC, X86_INS_CLC, X86_INS_CLD, X86_INS_CLGI, X86_INS_CLI, X86_INS_CLTS, X86_INS_CLWB, X86_INS_CMC, X86_INS_CMOVA, X86_INS_CMOVAE, X86_INS_CMOVB, X86_INS_CMOVBE, X86_INS_CMOVE, X86_INS_CMOVG, X86_INS_CMOVGE, X86_INS_CMOVL, X86_INS_CMOVLE, X86_INS_CMOVNE, X86_INS_CMOVNO, X86_INS_CMOVNP, X86_INS_CMOVNS, X86_INS_CMOVO, X86_INS_CMOVP, X86_INS_CMOVS, X86_INS_CMP, X86_INS_CMPPD, X86_INS_CMPPS, X86_INS_CMPSB, X86_INS_CMPSD, X86_INS_CMPSQ, X86_INS_CMPSS, X86_INS_CMPSW, X86_INS_CPUID, X86_INS_CRC32, X86_INS_CVTSS2SD, X86_INS_CWDE, X86_INS_DEC, X86_INS_DIV, X86_INS_ENTER, X86_INS_FABS, X86_INS_FADD, X86_INS_FADDP, X86_INS_FBLD, X86_INS_FBSTP, X86_INS_FCMOVB, X86_INS_FCMOVBE, X86_INS_FCMOVE, X86_INS_FCMOVNB, X86_INS_FCMOVNBE, X86_INS_FCMOVNE, X86_INS_FCMOVNU, X86_INS_FCMOVU, X86_INS_FCOMPP, X86_INS_FDECSTP, X86_INS_FDIV, X86_INS_FDIVP, X86_INS_FDIVR, X86_INS_FDIVRP, X86_INS_FEMMS, X86_INS_FFREE, X86_INS_FFREEP, X86_INS_FICOM, X86_INS_FICOMP, X86_INS_FIDIV, X86_INS_FIDIVR, X86_INS_FIMUL, X86_INS_FINCSTP, X86_INS_FIST, X86_INS_FISTP, X86_INS_FISTTP, X86_INS_FISUB, X86_INS_FISUBR, X86_INS_FLD, X86_INS_FLD1, X86_INS_FLDCW, X86_INS_FLDENV, X86_INS_FLDL2E, X86_INS_FLDL2T, X86_INS_FLDLG2, X86_INS_FLDLN2, X86_INS_FLDPI, X86_INS_FLDZ, X86_INS_FMUL, X86_INS_FMULP, X86_INS_FNCLEX, X86_INS_FNINIT, X86_INS_FNOP, X86_INS_FNSAVE, X86_INS_FNSTCW, X86_INS_FNSTENV, X86_INS_FNSTSW, X86_INS_FPATAN, X86_INS_FPREM, X86_INS_FPREM1, X86_INS_FPTAN, X86_INS_FRNDINT, X86_INS_FRSTOR, X86_INS_FSCALE, X86_INS_FSETPM, X86_INS_FSINCOS, X86_INS_FSQRT, X86_INS_FST, X86_INS_FSTP, X86_INS_FSTPNCE, X86_INS_FSUB, X86_INS_FSUBP, X86_INS_FSUBR, X86_INS_FSUBRP, X86_INS_FTST, X86_INS_FUCOM, X86_INS_FUCOMI, X86_INS_FUCOMP, X86_INS_FUCOMPP, X86_INS_FXAM, X86_INS_FXCH, X86_INS_FXRSTOR, X86_INS_FXRSTOR64, X86_INS_FXSAVE, X86_INS_FXSAVE64, X86_INS_FXTRACT, X86_INS_FYL2X, X86_INS_FYL2XP1, X86_INS_HLT, X86_INS_IDIV, X86_INS_IMUL, X86_INS_IN, X86_INS_INC, X86_INS_INSB, X86_INS_INSD, X86_INS_INSW, X86_INS_INT, X86_INS_INT1, X86_INS_INT3, X86_INS_INTO, X86_INS_IRET, X86_INS_IRETD, X86_INS_IRETQ, X86_INS_JA, X86_INS_JAE, X86_INS_JB, X86_INS_JBE, X86_INS_JCXZ, X86_INS_JE, X86_INS_JECXZ, X86_INS_JG, X86_INS_JGE, X86_INS_JL, X86_INS_JLE, X86_INS_JMP, X86_INS_JNE, X86_INS_JNO, X86_INS_JNP, X86_INS_JNS, X86_INS_JO, X86_INS_JP, X86_INS_JRCXZ, X86_INS_JS, X86_INS_KXORW, X86_INS_LCALL, X86_INS_LEA, X86_INS_LEAVE, X86_INS_LIDT, X86_INS_LJMP, X86_INS_LODSB, X86_INS_LODSD, X86_INS_LODSQ, X86_INS_LODSW, X86_INS_LOOP, X86_INS_LOOPE, X86_INS_LOOPNE, X86_INS_MOV, X86_INS_MOVABS, X86_INS_MOVAPD, X86_INS_MOVAPS, X86_INS_MOVBE, X86_INS_MOVD, X86_INS_MOVDQ2Q, X86_INS_MOVDQA, X86_INS_MOVDQU, X86_INS_MOVHPD, X86_INS_MOVHPS, X86_INS_MOVLPD, X86_INS_MOVLPS, X86_INS_MOVQ, X86_INS_MOVSB, X86_INS_MOVSD, X86_INS_MOVSQ, X86_INS_MOVSS, X86_INS_MOVSW, X86_INS_MOVSX, X86_INS_MOVSXD, X86_INS_MOVUPS, X86_INS_MOVZX, X86_INS_MUL, X86_INS_MULPD, X86_INS_MULPS, X86_INS_MULSD, X86_INS_MULSS, X86_INS_MULX, X86_INS_NEG, X86_INS_NOP, X86_INS_NOT, X86_INS_OR, X86_INS_OUT, X86_INS_OUTSB, X86_INS_OUTSD, X86_INS_OUTSW, X86_INS_PACKSSDW, X86_INS_PACKSSWB, X86_INS_PACKUSWB, X86_INS_PADDB, X86_INS_PADDD, X86_INS_PADDSB, X86_INS_PADDSW, X86_INS_PADDUSB, X86_INS_PADDUSW, X86_INS_PADDW, X86_INS_PAUSE, X86_INS_PEXTRB, X86_INS_PFADD, X86_INS_POP, X86_INS_POPAL, X86_INS_POPAW, X86_INS_POPF, X86_INS_POPFD, X86_INS_POPFQ, X86_INS_PSUBB, X86_INS_PSUBD, X86_INS_PSUBQ, X86_INS_PSUBSB, X86_INS_PSUBSW, X86_INS_PSUBUSB, X86_INS_PSUBUSW, X86_INS_PSUBW, X86_INS_PUSH, X86_INS_PUSHAL, X86_INS_PUSHAW, X86_INS_PUSHF, X86_INS_PUSHFD, X86_INS_PUSHFQ, X86_INS_PXOR, X86_INS_RCL, X86_INS_RCR, X86_INS_RDMSR, X86_INS_RDPMC, X86_INS_RDRAND, X86_INS_RDSEED, X86_INS_RDTSC, X86_INS_RDTSCP, X86_INS_RET, X86_INS_RETF, X86_INS_RETFQ, X86_INS_ROL, X86_INS_ROR, X86_INS_SAL, X86_INS_SALC, X86_INS_SAR, X86_INS_SARX, X86_INS_SBB, X86_INS_SETA, X86_INS_SETAE, X86_INS_SETB, X86_INS_SETBE, X86_INS_SETE, X86_INS_SETG, X86_INS_SETGE, X86_INS_SETL, X86_INS_SETLE, X86_INS_SETNE, X86_INS_SETNO, X86_INS_SETNP, X86_INS_SETNS, X86_INS_SETO, X86_INS_SETP, X86_INS_SETS, X86_INS_SHA1MSG1, X86_INS_SHA1MSG2, X86_INS_SHA1NEXTE, X86_INS_SHA1RNDS4, X86_INS_SHA256MSG1, X86_INS_SHA256MSG2, X86_INS_SHA256RNDS2, X86_INS_SHL, X86_INS_SHLD, X86_INS_SHLX, X86_INS_SHR, X86_INS_SHRD, X86_INS_SHRX, X86_INS_SIDT, X86_INS_STAC, X86_INS_STC, X86_INS_STD, X86_INS_STGI, X86_INS_STI, X86_INS_STOSB, X86_INS_STOSD, X86_INS_STOSQ, X86_INS_STOSW, X86_INS_SUB, X86_INS_SUBSD, X86_INS_SYSCALL, X86_INS_SYSENTER, X86_INS_SYSEXIT, X86_INS_SYSRET, X86_INS_TEST, X86_INS_VMCALL, X86_INS_VMMCALL, X86_INS_VPXOR, X86_INS_VPXORD, X86_INS_VPXORQ, X86_INS_VXORPD, X86_INS_VXORPS, X86_INS_XADD, X86_INS_XCHG, X86_INS_XOR, X86_INS_XORPS, X86_OP_IMM, X86_OP_MEM, X86_OP_REG, X86_REG_CS, X86_REG_DS, X86_REG_ES, X86_REG_FS, X86_REG_GS, X86_REG_INVALID, X86_REG_RIP, and X86_REG_SS.
Referenced by analop().
|
static |
Definition at line 3691 of file analysis_x86_cs.c.
References RZ_ANALYSIS_ARCHINFO_ALIGN, RZ_ANALYSIS_ARCHINFO_MAX_OP_SIZE, and RZ_ANALYSIS_ARCHINFO_MIN_OP_SIZE.
Definition at line 345 of file analysis_x86_cs.c.
References RZ_TYPE_COND_EQ, RZ_TYPE_COND_GE, RZ_TYPE_COND_GT, RZ_TYPE_COND_LE, RZ_TYPE_COND_LT, RZ_TYPE_COND_NE, X86_INS_JA, X86_INS_JAE, X86_INS_JB, X86_INS_JBE, X86_INS_JCXZ, X86_INS_JE, X86_INS_JECXZ, X86_INS_JG, X86_INS_JGE, X86_INS_JL, X86_INS_JLE, X86_INS_JNE, X86_INS_JNO, X86_INS_JNP, X86_INS_JNS, X86_INS_JO, X86_INS_JP, and X86_INS_JS.
Referenced by analop().
Definition at line 1872 of file analysis_x86_cs.c.
References cs_reg_name(), h, NULL, reg, rz_reg_get(), and X86_REG_INVALID.
Referenced by set_access_info(), and set_src_dst().
|
static |
Definition at line 3258 of file analysis_x86_cs.c.
|
static |
Definition at line 3230 of file analysis_x86_cs.c.
|
static |
Definition at line 3262 of file analysis_x86_cs.c.
References rz_analysis_t::bits, NULL, p, rz_analysis_cc_default(), rz_str_newf(), and strdup().
|
static |
Translates operand N to esil
handle | csh |
insn | cs_insn |
n | Operand index |
set | if 1 it adds set (=) to the operand |
setoper | Extra operation for the set (^, -, +, etc...) |
sel | Selector for output buffer in staic array |
Definition at line 236 of file analysis_x86_cs.c.
References AR_DIM, BUF_SZ, cs_reg_name(), Getarg::handle, handle, Getarg::insn, INSOP, INSOPS, n, NULL, op, out, PFMT64u, PFMT64x, sel(), setarg, snprintf, st64, ut64(), X86_OP_IMM, X86_OP_INVALID, X86_OP_MEM, and X86_OP_REG.
Referenced by anop_esil().
Definition at line 67 of file analysis_x86_cs.c.
References CS_MODE_16, CS_MODE_64, x, X86_INS_POPAL, X86_INS_POPAW, X86_INS_POPF, X86_INS_POPFD, X86_INS_POPFQ, X86_INS_PUSHAL, X86_INS_PUSHAW, X86_INS_PUSHF, X86_INS_PUSHFD, X86_INS_PUSHFQ, X86_OP_REG, and X86_REG_EFLAGS.
Referenced by opex().
Definition at line 187 of file analysis_x86_cs.c.
References X86_REG_XMM0, X86_REG_XMM1, X86_REG_XMM10, X86_REG_XMM11, X86_REG_XMM12, X86_REG_XMM13, X86_REG_XMM14, X86_REG_XMM15, X86_REG_XMM16, X86_REG_XMM17, X86_REG_XMM18, X86_REG_XMM19, X86_REG_XMM2, X86_REG_XMM20, X86_REG_XMM21, X86_REG_XMM22, X86_REG_XMM23, X86_REG_XMM24, X86_REG_XMM25, X86_REG_XMM26, X86_REG_XMM27, X86_REG_XMM28, X86_REG_XMM29, X86_REG_XMM3, X86_REG_XMM30, X86_REG_XMM31, X86_REG_XMM4, X86_REG_XMM5, X86_REG_XMM6, X86_REG_XMM7, X86_REG_XMM8, and X86_REG_XMM9.
Referenced by anop_esil().
|
static |
Definition at line 2111 of file analysis_x86_cs.c.
References addr, CYCLE_MEM, Getarg::insn, INSOP, mem, RZ_ANALYSIS_OP_TYPE_REG, RZ_ANALYSIS_STACK_SET, type, UT64_MAX, X86_OP_IMM, X86_OP_MEM, X86_OP_REG, X86_REG_EBP, X86_REG_INVALID, X86_REG_RBP, and X86_REG_RIP.
Referenced by anop().
|
static |
Definition at line 2148 of file analysis_x86_cs.c.
References addr, imm, Getarg::insn, INSOP, mem, reg, RZ_ANALYSIS_STACK_GET, type, UT64_MAX, X86_OP_IMM, X86_OP_MEM, X86_REG_EBP, X86_REG_ESP, X86_REG_INVALID, X86_REG_RBP, X86_REG_RIP, and X86_REG_RSP.
Referenced by anop().
|
static |
Definition at line 2072 of file analysis_x86_cs.c.
References a, CREATE_SRC_DST, handle, Getarg::insn, RZ_ANALYSIS_OP_TYPE_ACMP, RZ_ANALYSIS_OP_TYPE_ADD, RZ_ANALYSIS_OP_TYPE_AND, RZ_ANALYSIS_OP_TYPE_CMOV, RZ_ANALYSIS_OP_TYPE_CMP, RZ_ANALYSIS_OP_TYPE_LEA, RZ_ANALYSIS_OP_TYPE_MASK, RZ_ANALYSIS_OP_TYPE_MOV, RZ_ANALYSIS_OP_TYPE_NOT, RZ_ANALYSIS_OP_TYPE_OR, RZ_ANALYSIS_OP_TYPE_POP, RZ_ANALYSIS_OP_TYPE_REG, RZ_ANALYSIS_OP_TYPE_ROL, RZ_ANALYSIS_OP_TYPE_ROR, RZ_ANALYSIS_OP_TYPE_SAL, RZ_ANALYSIS_OP_TYPE_SAR, RZ_ANALYSIS_OP_TYPE_SHL, RZ_ANALYSIS_OP_TYPE_SHR, RZ_ANALYSIS_OP_TYPE_SUB, RZ_ANALYSIS_OP_TYPE_UPUSH, RZ_ANALYSIS_OP_TYPE_XCHG, RZ_ANALYSIS_OP_TYPE_XOR, set_access_info(), and set_src_dst().
Referenced by analop().
|
static |
Definition at line 2175 of file analysis_x86_cs.c.
References INSOP, reg, RZ_ANALYSIS_STACK_INC, type, X86_OP_IMM, X86_OP_REG, X86_REG_ESP, and X86_REG_RSP.
Referenced by anop().
|
static |
Definition at line 111 of file analysis_x86_cs.c.
References cs_reg_name(), hidden_op(), i, pj_end(), pj_free(), pj_ka(), pj_kb(), pj_ki(), pj_kN(), pj_ks(), pj_new(), pj_o(), pj_string(), rz_strbuf_append(), rz_strbuf_init(), x, X86_OP_IMM, X86_OP_MEM, X86_OP_REG, and X86_REG_INVALID.
Referenced by analop().
Definition at line 377 of file analysis_x86_cs.c.
References reg, and RZ_ARRAY_SIZE.
Referenced by anop_esil().
|
inlinestatic |
Definition at line 3137 of file analysis_x86_cs.c.
References a, CS_MODE_16, CS_MODE_32, and CS_MODE_64.
Referenced by analop().
|
static |
Definition at line 1879 of file analysis_x86_cs.c.
References access, CS_AC_INVALID, CS_AC_READ, CS_AC_WRITE, CS_MODE_64, cs_reg2reg(), cs_regs_access(), handle, i, Getarg::insn, INSOP, INSOPS, ip, mem, reg, RZ_ANALYSIS_ACC_R, RZ_ANALYSIS_ACC_UNKNOWN, RZ_ANALYSIS_ACC_W, RZ_ANALYSIS_VAL_MEM, RZ_ANALYSIS_VAL_REG, rz_analysis_value_free(), rz_analysis_value_new(), rz_list_append(), rz_list_newf(), sp, type, val, X86_INS_CALL, X86_INS_LCALL, X86_INS_PUSH, X86_INS_PUSHAL, X86_INS_PUSHAW, X86_INS_PUSHF, X86_INS_PUSHFD, X86_INS_PUSHFQ, X86_OP_MEM, X86_REG_EIP, X86_REG_ESP, X86_REG_RIP, and X86_REG_RSP.
Referenced by op_fillval().
|
static |
Definition at line 2188 of file analysis_x86_cs.c.
References INSOP, RZ_ANALYSIS_OP_DIR_EXEC, RZ_ANALYSIS_OP_DIR_READ, RZ_ANALYSIS_OP_DIR_REF, RZ_ANALYSIS_OP_DIR_WRITE, RZ_ANALYSIS_OP_TYPE_CALL, RZ_ANALYSIS_OP_TYPE_JMP, RZ_ANALYSIS_OP_TYPE_LEA, RZ_ANALYSIS_OP_TYPE_MASK, RZ_ANALYSIS_OP_TYPE_MOV, RZ_ANALYSIS_OP_TYPE_UCALL, RZ_ANALYSIS_OP_TYPE_UJMP, type, X86_OP_MEM, and X86_OP_REG.
Referenced by analop().
|
static |
Definition at line 2048 of file analysis_x86_cs.c.
References cs_reg2reg(), handle, INSOP, mem, reg, RZ_ANALYSIS_VAL_IMM, RZ_ANALYSIS_VAL_MEM, RZ_ANALYSIS_VAL_REG, type, val, x, X86_OP_IMM, X86_OP_MEM, and X86_OP_REG.
Referenced by op_fillval().
|
static |
Definition at line 3250 of file analysis_x86_cs.c.
References cs_close(), free(), and rz_return_val_if_fail.
|
static |
RZ_API RzLibStruct rizin_plugin |
Definition at line 3745 of file analysis_x86_cs.c.
RzAnalysisPlugin rz_analysis_plugin_x86_cs |
Definition at line 3726 of file analysis_x86_cs.c.