6 #include <capstone/capstone.h>
7 #include <capstone/x86.h>
24 #if CS_NEXT_VERSION > 0
25 #define HAVE_CSGRP_PRIVILEGE 1
27 #define HAVE_CSGRP_PRIVILEGE 0
31 #error Old Capstone not supported
34 #define opexprintf(op, fmt, ...) rz_strbuf_setf(&op->opex, fmt, ##__VA_ARGS__)
35 #define INSOP(n) insn->detail->x86.operands[n]
36 #define INSOPS insn->detail->x86.op_count
37 #define ISIMM(x) insn->detail->x86.operands[x].type == X86_OP_IMM
38 #define ISMEM(x) insn->detail->x86.operands[x].type == X86_OP_MEM
68 unsigned int id = insn->id;
112 cs_insn *insn =
ctx->insn;
119 cs_x86 *
x = &insn->detail->x86;
120 if (
x->op_count == 0) {
123 pj_ka(pj,
"operands");
124 for (
i = 0;
i <
x->op_count;
i++) {
128 #if CS_API_MAJOR >= 4
133 pj_ks(pj,
"type",
"reg");
137 pj_ks(pj,
"type",
"imm");
141 pj_ks(pj,
"type",
"mem");
151 pj_ki(pj,
"scale",
op->mem.scale);
152 pj_kN(pj,
"disp",
op->mem.disp);
155 pj_ks(pj,
"type",
"invalid");
162 pj_kb(pj,
"rex",
true);
165 pj_kb(pj,
"modrm",
true);
171 pj_kN(pj,
"disp",
x->disp);
174 pj_ki(pj,
"sib_scale",
x->sib_scale);
221 default:
return false;
239 char *
setarg = setop ? setop :
"";
240 cs_insn *insn = gop->
insn;
247 if (n < 0 || n >=
INSOPS) {
253 *bitsize =
op.size * 8;
256 #if CS_API_MAJOR == 3
279 char buf_[
BUF_SZ] = { 0 };
280 int component_count = 0;
283 int scale =
op.mem.scale;
307 if (component_count > 1) {
308 if (component_count > 2) {
321 int out_len = strlen(
out);
322 out[out_len > 0 ? out_len - 1 : 0] = 0;
331 }
else if (set == 0) {
378 const char *
const names[] = {
"eax",
"ecx",
"edx",
"ebx",
"esp",
"ebp",
"esi",
"edi" };
383 int rs =
a->bits / 8;
384 const char *
pc = (
a->bits == 16) ?
"ip" : (
a->bits == 32) ?
"eip"
386 const char *
sp = (
a->bits == 16) ?
"sp" : (
a->bits == 32) ?
"esp"
388 const char *bp = (
a->bits == 16) ?
"bp" : (
a->bits == 32) ?
"ebp"
390 const char *
si = (
a->bits == 16) ?
"si" : (
a->bits == 32) ?
"esi"
409 const char *
counter = (
a->bits == 16) ?
"cx" : (
a->bits == 32) ?
"ecx"
441 #if CS_API_MAJOR >= 4
524 #if CS_API_MAJOR >= 4
593 const char *conditional =
NULL;
599 conditional =
"cf,zf,|,!";
603 conditional =
"cf,!";
611 conditional =
"cf,zf,|";
619 conditional =
"zf,!,sf,of,^,!,&";
623 conditional =
"sf,of,^,!";
627 conditional =
"sf,of,^";
631 conditional =
"zf,sf,of,^,|";
635 conditional =
"zf,!";
639 conditional =
"of,!";
643 conditional =
"pf,!";
647 conditional =
"sf,!";
662 if (
src &&
dst && conditional) {
668 rz_strbuf_appendf(&
op->esil,
"al,di,=[1],df,?{,1,di,-=,},df,!,?{,1,di,+=,}");
670 rz_strbuf_appendf(&
op->esil,
"al,edi,=[1],df,?{,1,edi,-=,},df,!,?{,1,edi,+=,}");
675 rz_strbuf_appendf(&
op->esil,
"ax,di,=[2],df,?{,2,di,-=,},df,!,?{,2,di,+=,}");
677 rz_strbuf_appendf(&
op->esil,
"ax,edi,=[2],df,?{,2,edi,-=,},df,!,?{,2,edi,+=,}");
681 rz_strbuf_appendf(&
op->esil,
"eax,edi,=[4],df,?{,4,edi,-=,},df,!,?{,4,edi,+=,}");
684 rz_strbuf_appendf(&
op->esil,
"rax,rdi,=[8],df,?{,8,edi,-=,},df,!,?{,8,edi,+=,}");
687 rz_strbuf_appendf(&
op->esil,
"%s,[1],al,=,df,?{,1,%s,-=,},df,!,?{,1,%s,+=,}",
si,
si,
si);
690 rz_strbuf_appendf(&
op->esil,
"%s,[2],ax,=,df,?{,2,%s,-=,},df,!,?{,2,%s,+=,}",
si,
si,
si);
693 rz_strbuf_appendf(&
op->esil,
"esi,[4],eax,=,df,?{,4,esi,-=,},df,!,?{,4,esi,+=,}");
696 rz_strbuf_appendf(&
op->esil,
"rsi,[8],rax,=,df,?{,8,rsi,-=,},df,!,?{,8,rsi,+=,}");
729 "df,?{,%d,%s,-=,%d,%s,-=,},"
730 "df,!,?{,%d,%s,+=,%d,%s,+=,}",
738 esilprintf(
op,
"%s,[%d],%s,=[%d],df,?{,%d,%s,-=,%d,%s,-=,},"
739 "df,!,?{,%d,%s,+=,%d,%s,+=,}",
769 const char *
counter = (
a->bits == 16) ?
"cx" : (
a->bits == 32) ?
"ecx"
771 esilprintf(
op,
"%s,!,?{,BREAK,},%s,NUM,%s,NUM,"
772 "%s,[%d],%s,=[%d],df,?{,%d,%s,-=,%d,%s,-=,},"
773 "df,!,?{,%d,%s,+=,%d,%s,+=,},%s,--=,%s,"
793 op->scale =
INSOP(1).mem.scale;
802 if (
a->bits == 64 && dst64) {
862 esilprintf(
op,
"0xa,eax,=,0x756E6547,ebx,=,0x6C65746E,ecx,=,0x49656E69,edx,=");
871 esilprintf(
op,
"%s,%s,$z,zf,:=,$p,pf,:=,%d,$s,sf,:=",
src,
dst, bitsize - 1);
879 switch (gop.
insn->detail->x86.operands[0].size) {
890 val = 0x8000000000000000;
897 esilprintf (
op,
"%s,1,%s,>>,0x%"PFMT64x",%s,&,|,%s,=,1,%s,&,cf,=,1,REPEAT",
src,
dst,
val,
dst,
dst,
dst);
903 esilprintf(
op,
"0,cf,:=,1,%s,-,1,<<,%s,&,?{,1,cf,:=,},%s,%s,>>>>,%s,$z,zf,:=,$p,pf,:=,%d,$s,sf,:=",
904 src, dst_r,
src, dst_r, dst_w, bitsize - 1);
916 switch (gop.
insn->detail->x86.operands[0].size) {
927 val = 0x8000000000000000;
930 RZ_LOG_ERROR(
"x86: unknown operand size: %d\n", gop.
insn->detail->x86.operands[0].size);
938 esilprintf(
op,
"0,%s,!,!,?{,1,%s,-,%s,<<,0x%llx,&,!,!,^,},%s,%s,$z,zf,:=,$p,pf,:=,%d,$s,sf,:=,cf,=",
953 esilprintf(
op,
"0,cf,:=,1,%s,-,1,<<,%s,&,?{,1,cf,:=,},%s,%s,>>,%s,$z,zf,:=,$p,pf,:=,%d,$s,sf,:=",
954 src, dst_r,
src, dst_r, dst_w, bitsize - 1);
958 esilprintf(
op,
"al,ax,=,7,ax,>>,?{,0xff00,ax,|=,}");
961 esilprintf(
op,
"ax,eax,=,15,eax,>>,?{,0xffff0000,eax,|=,}");
964 esilprintf(
op,
"0,edx,=,31,eax,>>,?{,0xffffffff,edx,=,}");
967 esilprintf(
op,
"eax,rax,=,31,rax,>>,?{,0xffffffff00000000,rax,|=,}");
970 esilprintf(
op,
"0,cf,:=,0,af,:=,9,al,>,?{,10,al,-=,1,ah,+=,1,cf,:=,1,af,:=,}");
973 arg0 =
"0,zf,:=,0,sf,:=,0,pf,:=,10,ah,*,al,+,ax,=";
974 arg1 =
"0,al,==,?{,1,zf,:=,},2,al,%,0,==,?{,1,pf,:=,},7,al,>>,?{,1,sf,:=,}";
978 arg0 =
"0,zf,:=,0,sf,:=,0,pf,:=,10,al,/,ah,=,10,al,%,al,=";
979 arg1 =
"0,al,==,?{,1,zf,:=,},2,al,%,0,==,?{,1,pf,:=,},7,al,>>,?{,1,sf,:=,}";
996 if (!bitsize || bitsize > 64) {
1001 esilprintf(
op,
"0,%s,%s,&,==,$z,zf,:=,$p,pf,:=,%u,$s,sf,:=,0,cf,:=,0,of,:=",
1005 "%s,%s,==,$z,zf,:=,%u,$b,cf,:=,$p,pf,:=,%u,$s,sf,:=,"
1006 "%s,0x%" PFMT64x ",-,!,%u,$o,^,of,:=,3,$b,af,:=",
1007 src,
dst, bitsize, bitsize - 1,
src, 1ULL << (bitsize - 1), bitsize - 1);
1013 "%s,%s,==,$z,zf,:=,%u,$b,cf,:=,$p,pf,:=,%u,$s,sf,:=,%s,0x%" PFMT64x ","
1014 "-,!,%u,$o,^,of,:=,3,$b,af,:=,df,?{,%d,%s,-=,%d,%s,-=,}{,%d,%s,+=,%d,%s,+=,}",
1015 src,
dst, bitsize, bitsize - 1,
src, 1ULL << (bitsize - 1), bitsize - 1,
1029 "%d,%s,-=,%s,%s,=[%d],"
1030 "%d,%s,-=,%s,%s,=[%d],"
1031 "%d,%s,-=,%s,%s,=[%d],"
1032 "%d,%s,-=,%s,%s,=[%d],"
1033 "%d,%s,-=,%s,=[%d],"
1034 "%d,%s,-=,%s,%s,=[%d],"
1035 "%d,%s,-=,%s,%s,=[%d],"
1036 "%d,%s,-=,%s,%s,=[%d]",
1056 esilprintf(
op,
"%d,%s,-=,eflags,%s,=[%d]",
rs,
sp,
sp,
rs);
1059 esilprintf(
op,
"%s,%s,=,%s,[%d],%s,=,%d,%s,+=",
1065 "%s,[%d],%d,%s,+=,%s,=,"
1066 "%s,[%d],%d,%s,+=,%s,=,"
1067 "%s,[%d],%d,%s,+=,%s,=,"
1069 "%s,[%d],%d,%s,+=,%s,=,"
1070 "%s,[%d],%d,%s,+=,%s,=,"
1071 "%s,[%d],%d,%s,+=,%s,=,"
1072 "%s,[%d],%d,%s,+=,%s,=,"
1089 "%s,[%d],%s,%d,%s,+=",
1097 "%s,[%d],%s,=,%d,%s,+=",
1163 const char *cnt = (
a->bits == 16) ?
"cx" : (
a->bits == 32) ?
"ecx"
1168 esilprintf(
op,
"of,sf,^,?{,%s,%s,=,}",
dst,
pc);
1171 esilprintf(
op,
"of,sf,^,zf,|,?{,%s,%s,=,}",
dst,
pc);
1174 esilprintf(
op,
"cf,zf,|,!,?{,%s,%s,=,}",
dst,
pc);
1192 esilprintf(
op,
"of,!,sf,^,?{,%s,%s,=,}",
dst,
pc);
1198 esilprintf(
op,
"sf,of,!,^,zf,!,&,?{,%s,%s,=,}",
dst,
pc);
1213 esilprintf(
op,
"zf,cf,|,?{,%s,%s,=,}",
dst,
pc);
1225 esilprintf(
op,
"1,%s,-=,%s,?{,%s,%s,=,}", cnt, cnt,
dst,
pc);
1228 esilprintf(
op,
"1,%s,-=,%s,?{,zf,?{,%s,%s,=,},}",
1232 esilprintf(
op,
"1,%s,-=,%s,?{,zf,!,?{,%s,%s,=,},}",
1238 if (
a->read_at &&
a->bits != 16) {
1239 ut8 thunk[4] = { 0 };
1244 if (thunk[0] == 0x8b && thunk[3] == 0xc3 && (thunk[1] & 0xc7) == 4
1245 && (thunk[2] & 0x3f) == 0x24) {
1246 ut8 reg = (thunk[1] & 0x38) >> 3;
1266 "2,%s,-=,cs,%s,=[2],"
1267 "%d,%s,-=,%s,%s,=[],"
1273 "%s,%s,-=,%d,%s,=[],"
1304 if (
in.mem.index == 0 &&
in.mem.base == 0 &&
in.mem.scale == 1) {
1308 "4,%s,<<,0x%" PFMT64x ",+,[],%s,=",
1315 :
"unknown_segment_register",
1368 if (
a->bits == 64 && dst_reg64) {
1371 esilprintf(
op,
"%s,%s,^,0xffffffff,&,%s,=,$z,zf,:=,$p,pf,:=,%d,$s,sf,:=,0,cf,:=,0,of,:=",
1372 src, dst_reg64, dst_reg64, bitsize - 1);
1374 esilprintf(
op,
"%s,%s,$z,zf,:=,$p,pf,:=,%d,$s,sf,:=,0,cf,:=,0,of,:=",
1389 esilprintf(
op,
"%s,!,?{,1,zf,=,BREAK,},0,zf,=,"
1390 "%d,DUP,%d,-,1,<<,%s,&,?{,%d,-,%s,=,BREAK,},12,REPEAT",
1403 esilprintf(
op,
"%s,!,?{,1,zf,=,BREAK,},0,zf,=,"
1404 "%d,DUP,1,<<,%s,&,?{,%s,=,BREAK,},12,REPEAT",
1410 esilprintf(
op,
"0xff000000,24,%s,NUM,<<,&,24,%s,NUM,>>,|,"
1411 "8,0x00ff0000,%s,NUM,&,>>,|,"
1412 "8,0x0000ff00,%s,NUM,&,<<,|,"
1417 "56,%s,NUM,>>,|,40,0xff000000000000,%s,NUM,&,>>,|,"
1418 "40,0xff00,%s,NUM,&,<<,|,24,0xff0000000000,%s,NUM,&,>>,|,"
1419 "24,0xff0000,%s,NUM,&,<<,|,8,0xff00000000,%s,NUM,&,>>,|,"
1420 "8,0xff000000,%s,NUM,&,<<,|,"
1433 esilprintf(
op,
"%s,%s,%d,$s,sf,:=,$z,zf,:=,$p,pf,:=,0,of,:=,0,cf,:=",
1443 esilprintf(
op,
"%s,%d,$o,of,:=,%d,$s,sf,:=,$z,zf,:=,$p,pf,:=,3,$c,af,:=",
src, bitsize - 1, bitsize - 1);
1452 esilprintf(
op,
"%s,%d,$o,of,:=,%d,$s,sf,:=,$z,zf,:=,$p,pf,:=,3,$b,af,:=",
src, bitsize - 1, bitsize - 1);
1472 if (!bitsize || bitsize > 64) {
1479 esilprintf(
op,
"%s,%s,%s,0x%" PFMT64x ",-,!,%u,$o,^,of,:=,%u,$s,sf,:=,$z,zf,:=,$p,pf,:=,%u,$b,cf,:=,3,$b,af,:=",
1480 src,
dst,
src, 1ULL << (bitsize - 1), bitsize - 1, bitsize - 1, bitsize);
1488 esilprintf(
op,
"cf,%s,+,%s,-=,%d,$o,of,:=,%d,$s,sf,:=,$z,zf,:=,$p,pf,:=,%d,$b,cf,:=",
1489 src,
dst, bitsize - 1, bitsize - 1, bitsize);
1529 if (
a->bits == 64 && dst_reg64) {
1532 esilprintf(
op,
"%s,%s,&,0xffffffff,&,%s,=,$z,zf,:=,$p,pf,:=,%d,$s,sf,:=,0,cf,:=,0,of,:=",
1533 src, dst_reg64, dst_reg64, bitsize - 1);
1535 esilprintf(
op,
"%s,%s,$z,zf,:=,$p,pf,:=,%d,$s,sf,:=,0,cf,:=,0,of,:=",
src,
dst, bitsize - 1);
1545 if (!arg2 && !arg1) {
1555 const char *rz_quot = (
width == 1) ?
"al" : (
width == 2) ?
"ax"
1556 : (
width == 4) ?
"eax"
1558 const char *rz_rema = (
width == 1) ?
"ah" : (
width == 2) ?
"dx"
1559 : (
width == 4) ?
"edx"
1561 const char *rz_nume = (
width == 1) ?
"ax" : rz_quot;
1563 esilprintf(
op,
"%d,%s,~,%d,%s,<<,%s,+,~%%,%d,%s,~,%d,%s,<<,%s,+,~/,%s,=,%s,=",
1564 width * 8, arg0,
width * 8, rz_rema, rz_nume,
width * 8, arg0,
width * 8, rz_rema, rz_nume, rz_quot, rz_rema);
1571 esilprintf(
op,
"%d,%s,~,%d,%s,~,~/,%s,=",
width * 8, arg2,
width * 8, arg1, arg0);
1577 const char *rz_quot = (
width == 1) ?
"al" : (
width == 2) ?
"ax"
1578 : (
width == 4) ?
"eax"
1580 const char *rz_rema = (
width == 1) ?
"ah" : (
width == 2) ?
"dx"
1581 : (
width == 4) ?
"edx"
1583 const char *rz_nume = (
width == 1) ?
"ax" : rz_quot;
1586 esilprintf(
op,
"%s,%d,%s,<<,%s,+,%%,%s,%d,%s,<<,%s,+,/,%s,=,%s,=",
1587 dst,
width * 8, rz_rema, rz_nume,
dst,
width * 8, rz_rema, rz_nume, rz_quot, rz_rema);
1597 esilprintf(
op,
"%d,%s,~,%d,%s,~,*,DUP,%s,=,%s,-,?{,1,1,}{,0,0,},cf,:=,of,:=",
width * 8, arg2,
width * 8, arg1, arg0, arg0);
1600 esilprintf(
op,
"%d,%s,~,%d,%s,~,*,DUP,%s,=,%s,-,?{,1,1,}{,0,0,},cf,:=,of,:=",
width * 8, arg0,
width * 8, arg1, arg0, arg0);
1603 const char *rz_quot = (
width == 1) ?
"al" : (
width == 2) ?
"ax"
1604 : (
width == 4) ?
"eax"
1606 const char *rz_rema = (
width == 1) ?
"ah" : (
width == 2) ?
"dx"
1607 : (
width == 4) ?
"edx"
1609 const char *rz_nume = (
width == 1) ?
"ax" : rz_quot;
1612 esilprintf(
op,
"0xffffff00,eflags,&=,%s,%s,%%,eflags,|=,%s,%s,*,%s,=,0xff,eflags,&,%s,=,0xffffff00,eflags,&=,2,eflags,|=",
1613 arg0, rz_nume, arg0, rz_nume, rz_quot, rz_rema);
1616 esilprintf(
op,
"%d,%d,%s,~,%d,%s,~,*,>>,%s,=,%s,%s,*=,%d,%d,%s,~,>>,%s,-,?{,1,1,}{,0,0,},cf,:=,of,:=",
1617 width * 8,
width * 8, arg0,
width * 8, rz_nume, rz_rema, arg0, rz_nume,
width * 8,
width * 8, rz_nume, rz_rema);
1629 const char *rz_quot = (
width == 1) ?
"al" : (
width == 2) ?
"ax"
1630 : (
width == 4) ?
"eax"
1632 const char *rz_rema = (
width == 1) ?
"ah" : (
width == 2) ?
"dx"
1633 : (
width == 4) ?
"edx"
1635 const char *rz_nume = (
width == 1) ?
"ax" : rz_quot;
1638 esilprintf(
op,
"0xffffff00,eflags,&=,%s,%s,%%,eflags,|=,%s,%s,*,%s,=,0xff,eflags,&,%s,=,0xffffff00,eflags,&=,2,eflags,|=",
1639 src, rz_nume,
src, rz_nume, rz_quot, rz_rema);
1641 esilprintf(
op,
"%d,%s,%s,*,>>,%s,=,%s,%s,*=,%s,?{,1,1,}{,0,0,},cf,:=,of,:=",
1642 width * 8,
src, rz_nume, rz_rema,
src, rz_nume, rz_rema);
1686 xor = 0xffffffffffffffff;
1689 RZ_LOG_ERROR(
"x86: unhandled neg bitsize %d\n", bitsize);
1692 esilprintf(
op,
"%s,!,!,cf,:=,%s,0x%" PFMT64x ",^,1,+,%s,$z,zf,:=,0,of,:=,%d,$s,sf,:=,%d,$o,pf,:=",
1693 src,
src, xor,
dst, bitsize - 1, bitsize - 1);
1764 #if CS_API_MAJOR > 4
1796 esilprintf(
op,
"%s,%s,%d,$o,of,:=,%d,$s,sf,:=,$z,zf,:=,%d,$c,cf,:=,$p,pf,:=,3,$c,af,:=",
1797 src,
dst, bitsize - 1, bitsize - 1, bitsize - 1);
1810 esilprintf(
op,
"cf,%s,+,%s,%d,$o,of,:=,%d,$s,sf,:=,$z,zf,:=,%d,$c,cf,:=,$p,pf,:=,3,$c,af,:=",
1811 src,
dst, bitsize - 1, bitsize - 1, bitsize - 1);
1831 esilprintf(
op,
"0,cf,:=,%d,%s,%%,1,<<,%d,%s,/,%s,+,[%d],&,?{,1,cf,:=,}",
1836 rz_strbuf_appendf(&
op->esil,
",%d,%s,%%,1,<<,%d,%s,/,%s,+,%c=[%d]",
1842 rz_strbuf_appendf(&
op->esil,
",%d,%s,%%,1,<<,-1,^,%d,%s,/,%s,+,&=[%d]",
1850 esilprintf(
op,
"0,cf,:=,%d,%s,%%,1,<<,%s,&,?{,1,cf,:=,}",
1856 rz_strbuf_appendf(&
op->esil,
",%d,%s,%%,1,<<,%s",
width * 8,
src, dst_w);
1860 rz_strbuf_appendf(&
op->esil,
",%d,%s,%%,1,<<,-1,^,%s",
width * 8,
src, dst_w);
1868 rz_strbuf_appendf(&
op->esil,
",%s,--=,%s,?{,5,GOTO,}",
counter,
counter);
1908 #if CS_API_MAJOR >= 4
1910 cs_regs regs_read, regs_write;
1911 ut8 read_count, write_count;
1913 if (read_count > 0) {
1914 for (
i = 0;
i < read_count;
i++) {
1922 if (write_count > 0) {
1923 for (
i = 0;
i < write_count;
i++) {
1997 val->delta = -regsz;
1998 val->memref = regsz;
2010 #if CS_API_MAJOR >= 4
2042 #define CREATE_SRC_DST(op) \
2043 (op)->src[0] = rz_analysis_value_new(); \
2044 (op)->src[1] = rz_analysis_value_new(); \
2045 (op)->src[2] = rz_analysis_value_new(); \
2046 (op)->dst = rz_analysis_value_new();
2126 op->stackptr = regsz;
2129 if (
op->ptr < 0x1000) {
2158 op->stackptr = regsz;
2226 case 64: regsz = 8;
break;
2227 case 16: regsz = 2;
break;
2228 default: regsz = 4;
break;
2258 #if CS_API_MAJOR >= 4
2355 #if CS_API_MAJOR >= 4
2469 #if CS_API_MAJOR >= 4
2486 #if CS_API_MAJOR >= 4
2491 #if CS_API_MAJOR >= 4
2588 op->stackptr = regsz;
2608 op->stackptr = regsz;
2639 op->stackptr = regsz;
2661 op->stackptr = regsz * 8;
2693 op->stackptr = regsz;
2698 op->stackptr = -regsz;
2706 op->stackptr = -regsz;
2712 op->stackptr = -regsz * 8;
2725 op->stackptr = -regsz;
2728 #if CS_API_MAJOR >= 4
2732 #if CS_API_MAJOR == 4
2811 op->jump = (seg <<
a->seggrn) +
off;
2832 op->scale =
INSOP(0).mem.scale;
2860 op->jump = (seg <<
a->seggrn) +
off;
2886 op->scale =
INSOP(0).mem.scale;
3074 #if CS_API_MAJOR == 4
3131 for (
i = 0;
i < 4;
i++) {
3132 len += (item[
i] != 0) ? 1 : 0;
3157 if (
ctx->handle != 0) {
3163 if (
ctx->handle == 0) {
3182 ctx->insn->mnemonic,
3183 ctx->insn->op_str[0] ?
" " :
"",
3188 op->size =
ctx->insn->size;
3189 op->id =
ctx->insn->id;
3193 switch (
ctx->insn->detail->x86.prefix[0]) {
3219 #if HAVE_CSGRP_PRIVILEGE
3263 const char *
p =
NULL;
3264 switch (analysis->
bits) {
3297 "gpr flags .16 56 0\n"
3298 "flg cf .1 .448 0\n"
3299 "flg pf .1 .449 0\n"
3300 "flg af .1 .450 0\n"
3301 "flg zf .1 .451 0\n"
3302 "flg sf .1 .452 0\n"
3303 "flg tf .1 .453 0\n"
3304 "flg if .1 .454 0\n"
3305 "flg df .1 .455 0\n"
3306 "flg of .1 .456 0\n"
3307 "flg rf .1 .457 0\n";
3312 "drx dr3 .32 12 0\n"
3315 "drx dr6 .32 24 0\n"
3316 "drx dr7 .32 28 0\n"
3331 "gpr oeax .32 44 0\n"
3332 "gpr eax .32 24 0\n"
3348 "gpr esi .32 12 0\n"
3350 "gpr edi .32 16 0\n"
3352 "gpr esp .32 60 0\n"
3354 "gpr ebp .32 20 0\n"
3356 "gpr eip .32 48 0\n"
3358 "seg xfs .32 36 0\n"
3359 "seg xgs .32 40 0\n"
3360 "seg xcs .32 52 0\n"
3362 "seg xss .32 52 0\n"
3363 "flg eflags .32 .448 0 c1p.a.zstido.n.rv\n"
3364 "flg flags .16 .448 0\n"
3365 "flg cf .1 .448 0\n"
3366 "flg pf .1 .450 0\n"
3367 "flg af .1 .452 0\n"
3368 "flg zf .1 .454 0\n"
3369 "flg sf .1 .455 0\n"
3370 "flg tf .1 .456 0\n"
3371 "flg if .1 .457 0\n"
3372 "flg df .1 .458 0\n"
3373 "flg of .1 .459 0\n"
3374 "flg nt .1 .462 0\n"
3375 "flg rf .1 .464 0\n"
3376 "flg vm .1 .465 0\n"
3380 "drx dr3 .32 12 0\n"
3383 "drx dr6 .32 24 0\n"
3384 "drx dr7 .32 28 0\n"
3385 "xmm@fpu xmm0 .128 160 4\n"
3386 "fpu xmm0l .64 160 0\n"
3387 "fpu xmm0h .64 168 0\n"
3389 "xmm@fpu xmm1 .128 176 4\n"
3390 "fpu xmm1l .64 176 0\n"
3391 "fpu xmm1h .64 184 0\n"
3393 "xmm@fpu xmm2 .128 192 4\n"
3394 "fpu xmm2l .64 192 0\n"
3395 "fpu xmm2h .64 200 0\n"
3397 "xmm@fpu xmm3 .128 208 4\n"
3398 "fpu xmm3l .64 208 0\n"
3399 "fpu xmm3h .64 216 0\n"
3401 "xmm@fpu xmm4 .128 224 4\n"
3402 "fpu xmm4l .64 224 0\n"
3403 "fpu xmm4h .64 232 0\n"
3405 "xmm@fpu xmm5 .128 240 4\n"
3406 "fpu xmm5l .64 240 0\n"
3407 "fpu xmm5h .64 248 0\n"
3409 "xmm@fpu xmm6 .128 256 4\n"
3410 "fpu xmm6l .64 256 0\n"
3411 "fpu xmm6h .64 264 0\n"
3413 "xmm@fpu xmm7 .128 272 4\n"
3414 "fpu xmm7l .64 272 0\n"
3415 "fpu xmm7h .64 280 0\n";
3420 const char *args_prof = cc && !strcmp(cc,
"ms")
3422 "# RAX return value\n"
3423 "# RCX argument 1\n"
3424 "# RDX argument 2\n"
3427 "# R10-R11 syscall/sysret\n"
3428 "# R12-R15 GP preserved\n"
3429 "# RSI preserved source\n"
3430 "# RDI preserved destination\n"
3431 "# RSP stack pointer\n"
3454 "gpr rax .64 80 0\n"
3455 "gpr eax .32 80 0\n"
3459 "gpr rbx .64 40 0\n"
3460 "gpr ebx .32 40 0\n"
3464 "gpr rcx .64 88 0\n"
3465 "gpr ecx .32 88 0\n"
3469 "gpr rdx .64 96 0\n"
3470 "gpr edx .32 96 0\n"
3474 "gpr rsi .64 104 0\n"
3475 "gpr esi .32 104 0\n"
3476 "gpr si .16 104 0\n"
3477 "gpr sil .8 104 0\n"
3478 "gpr rdi .64 112 0\n"
3479 "gpr edi .32 112 0\n"
3480 "gpr di .16 112 0\n"
3481 "gpr dil .8 112 0\n"
3483 "gpr r8d .32 72 0\n"
3484 "gpr r8w .16 72 0\n"
3487 "gpr r9d .32 64 0\n"
3488 "gpr r9w .16 64 0\n"
3490 "gpr r10 .64 56 0\n"
3491 "gpr r10d .32 56 0\n"
3492 "gpr r10w .16 56 0\n"
3493 "gpr r10b .8 56 0\n"
3494 "gpr r11 .64 48 0\n"
3495 "gpr r11d .32 48 0\n"
3496 "gpr r11w .16 48 0\n"
3497 "gpr r11b .8 48 0\n"
3498 "gpr r12 .64 24 0\n"
3499 "gpr r12d .32 24 0\n"
3500 "gpr r12w .16 24 0\n"
3501 "gpr r12b .8 24 0\n"
3502 "gpr r13 .64 16 0\n"
3503 "gpr r13d .32 16 0\n"
3504 "gpr r13w .16 16 0\n"
3505 "gpr r13b .8 16 0\n"
3507 "gpr r14d .32 8 0\n"
3508 "gpr r14w .16 8 0\n"
3511 "gpr r15d .32 0 0\n"
3512 "gpr r15w .16 0 0\n"
3514 "gpr rip .64 128 0\n"
3515 "gpr rbp .64 32 0\n"
3516 "gpr ebp .32 32 0\n"
3519 "seg cs .64 136 0\n"
3520 "flg rflags .64 144 0 c1p.a.zstido.n.rv\n"
3521 "flg eflags .32 144 0 c1p.a.zstido.n.rv\n"
3522 "flg cf .1 144.0 0 carry\n"
3523 "flg pf .1 144.2 0 parity\n"
3526 "flg af .1 144.4 0 adjust\n"
3527 "flg zf .1 144.6 0 zero\n"
3528 "flg sf .1 144.7 0 sign\n"
3529 "flg tf .1 .1160 0 trap\n"
3530 "flg if .1 .1161 0 interrupt\n"
3531 "flg df .1 .1162 0 direction\n"
3532 "flg of .1 .1163 0 overflow\n"
3534 "gpr rsp .64 152 0\n"
3535 "gpr esp .32 152 0\n"
3536 "gpr sp .16 152 0\n"
3537 "gpr spl .8 152 0\n"
3538 "seg ss .64 160 0\n"
3539 "seg fs_base .64 168 0\n"
3540 "seg gs_base .64 176 0\n"
3541 "seg ds .64 184 0\n"
3542 "seg es .64 192 0\n"
3543 "seg fs .64 200 0\n"
3544 "seg gs .64 208 0\n"
3547 "drx dr2 .64 16 0\n"
3548 "drx dr3 .64 24 0\n"
3551 "drx dr6 .64 48 0\n"
3552 "drx dr7 .64 56 0\n"
3573 "fpu frip .64 8 0\n"
3574 "fpu frdp .64 16 0\n"
3575 "fpu mxcsr .32 24 0\n"
3576 "fpu mxcr_mask .32 28 0\n"
3578 "fpu st0 .64 32 0\n"
3579 "fpu st1 .64 48 0\n"
3580 "fpu st2 .64 64 0\n"
3581 "fpu st3 .64 80 0\n"
3582 "fpu st4 .64 96 0\n"
3583 "fpu st5 .64 112 0\n"
3584 "fpu st6 .64 128 0\n"
3585 "fpu st7 .64 144 0\n"
3587 "xmm@fpu xmm0 .128 160 4\n"
3588 "fpu xmm0l .64 160 0\n"
3589 "fpu xmm0h .64 168 0\n"
3591 "xmm@fpu xmm1 .128 176 4\n"
3592 "fpu xmm1l .64 176 0\n"
3593 "fpu xmm1h .64 184 0\n"
3595 "xmm@fpu xmm2 .128 192 4\n"
3596 "fpu xmm2l .64 192 0\n"
3597 "fpu xmm2h .64 200 0\n"
3599 "xmm@fpu xmm3 .128 208 4\n"
3600 "fpu xmm3l .64 208 0\n"
3601 "fpu xmm3h .64 216 0\n"
3603 "xmm@fpu xmm4 .128 224 4\n"
3604 "fpu xmm4l .64 224 0\n"
3605 "fpu xmm4h .64 232 0\n"
3607 "xmm@fpu xmm5 .128 240 4\n"
3608 "fpu xmm5l .64 240 0\n"
3609 "fpu xmm5h .64 248 0\n"
3611 "xmm@fpu xmm6 .128 256 4\n"
3612 "fpu xmm6l .64 256 0\n"
3613 "fpu xmm6h .64 264 0\n"
3615 "xmm@fpu xmm7 .128 272 4\n"
3616 "fpu xmm7l .64 272 0\n"
3617 "fpu xmm7h .64 280 0\n"
3618 "fpu x64 .64 288 0\n");
3630 "# no profile defined for x86-64\n"
3633 "gpr r13 .64 16 0\n"
3634 "gpr r12 .64 24 0\n"
3635 "gpr rbp .64 32 0\n"
3636 "gpr ebp .32 32 0\n"
3637 "gpr rbx .64 40 0\n"
3638 "gpr ebx .32 40 0\n"
3642 "gpr r11 .64 48 0\n"
3643 "gpr r10 .64 56 0\n"
3646 "gpr rax .64 80 0\n"
3647 "gpr eax .32 80 0\n"
3648 "gpr rcx .64 88 0\n"
3649 "gpr ecx .32 88 0\n"
3650 "gpr rdx .64 96 0\n"
3651 "gpr edx .32 96 0\n"
3652 "gpr rsi .64 104 0\n"
3653 "gpr esi .32 104 0\n"
3654 "gpr rdi .64 112 0\n"
3655 "gpr edi .32 112 0\n"
3656 "gpr oeax .64 120 0\n"
3657 "gpr rip .64 128 0\n"
3658 "seg cs .64 136 0\n"
3660 "gpr eflags .32 144 0 c1p.a.zstido.n.rv\n"
3661 "flg cf .1 .1152 0\n"
3662 "flg pf .1 .1153 0\n"
3663 "flg af .1 .1154 0\n"
3664 "flg zf .1 .1155 0\n"
3665 "flg sf .1 .1156 0\n"
3666 "flg tf .1 .1157 0\n"
3667 "flg if .1 .1158 0\n"
3668 "flg df .1 .1159 0\n"
3669 "flg of .1 .1160 0\n"
3670 "flg rf .1 .1161 0\n"
3671 "gpr rsp .64 152 0\n"
3672 "seg ss .64 160 0\n"
3673 "seg fs_base .64 168 0\n"
3674 "seg gs_base .64 176 0\n"
3675 "seg ds .64 184 0\n"
3676 "seg es .64 192 0\n"
3677 "seg fs .64 200 0\n"
3678 "seg gs .64 208 0\n"
3682 "drx dr3 .32 12 0\n"
3683 "drx dr6 .32 24 0\n"
3684 "drx dr7 .32 28 0\n";
3704 #define KW(d, ds, m, ms) rz_list_append(l, rz_search_keyword_new((const ut8 *)d, ds, (const ut8 *)m, ms, NULL))
3706 switch (analysis->
bits) {
3708 KW(
"\x8b\xff\x55\x8b\xec", 5,
NULL, 0);
3709 KW(
"\x55\x89\xe5", 3,
NULL, 0);
3710 KW(
"\x55\x8b\xec", 3,
NULL, 0);
3711 KW(
"\xf3\x0f\x1e\xfb", 4,
NULL, 0);
3714 KW(
"\x55\x48\x89\xe5", 4,
NULL, 0);
3715 KW(
"\x55\x48\x8b\xec", 4,
NULL, 0);
3716 KW(
"\xf3\x0f\x1e\xfa", 4,
NULL, 0);
3728 .desc =
"Capstone X86 analysis",
3732 .bits = 16 | 32 | 64,
3744 #ifndef RZ_PLUGIN_INCORE
RZ_API void rz_analysis_value_free(RzAnalysisValue *value)
RZ_API RzAnalysisValue * rz_analysis_value_new(void)
static int esil_x86_cs_init(RzAnalysisEsil *esil)
static void opex(RzStrBuf *buf, X86CSContext *ctx, int mode)
static bool x86_fini(void *user)
static void set_access_info(RzReg *reg, RzAnalysisOp *op, csh *handle, cs_insn *insn, int mode)
static void hidden_op(cs_insn *insn, cs_x86 *x, int mode)
static void anop_esil(RzAnalysis *a, RzAnalysisOp *op, ut64 addr, const ut8 *buf, int len, csh *handle, cs_insn *insn)
#define CREATE_SRC_DST(op)
static char * get_reg_profile(RzAnalysis *analysis)
static void set_opdir(RzAnalysisOp *op, cs_insn *insn)
RzAnalysisPlugin rz_analysis_plugin_x86_cs
static int select_mode(RzAnalysis *a)
static char * getarg(struct Getarg *gop, int n, int set, char *setop, int sel, ut32 *bitsize)
static void op1_memimmhandle(RzAnalysisOp *op, cs_insn *insn, ut64 addr, int regsz)
static void op_fillval(RzAnalysis *a, RzAnalysisOp *op, csh *handle, cs_insn *insn, int mode)
static void op0_memimmhandle(RzAnalysisOp *op, cs_insn *insn, ut64 addr, int regsz)
static const char * reg32_to_name(ut8 reg)
static bool x86_init(void **user)
static bool is_xmm_reg(cs_x86_op op)
static int analop(RzAnalysis *a, RzAnalysisOp *op, ut64 addr, const ut8 *buf, int len, RzAnalysisOpMask mask)
RZ_API RzLibStruct rizin_plugin
struct x86_cs_context_t X86CSContext
static void op_stackidx(RzAnalysisOp *op, cs_insn *insn, bool minus)
static RzRegItem * cs_reg2reg(RzReg *reg, csh *h, int id)
static void set_src_dst(RzReg *reg, RzAnalysisValue *val, csh *handle, cs_insn *insn, int x)
static int esil_x86_cs_fini(RzAnalysisEsil *esil)
static int cond_x862r2(int id)
static int archinfo(RzAnalysis *analysis, int q)
static void anop(RzAnalysis *a, RzAnalysisOp *op, ut64 addr, const ut8 *buf, int len, csh *handle, cs_insn *insn)
static RzList * analysis_preludes(RzAnalysis *analysis)
static int cs_len_prefix_opcode(uint8_t *item)
#define setarg(i, v, pos, size)
static RzILOpEffect * sel(cs_insn *insn, bool is_thumb)
static mcore_handle handle
int bits(struct state *s, int need)
const lzma_allocator const uint8_t * in
const lzma_allocator const uint8_t size_t uint8_t * out
@ CS_ARCH_X86
X86 architecture (including x86 & x86-64)
@ CS_MODE_64
64-bit mode (X86, PPC)
@ CS_MODE_32
32-bit mode (X86)
@ CS_MODE_16
16-bit mode (X86)
@ CS_OPT_DETAIL
Break down instruction structure into details.
@ CS_OPT_ON
Turn ON an option (CS_OPT_DETAIL, CS_OPT_SKIPDATA).
@ CS_AC_INVALID
Uninitialized/invalid access type.
@ CS_AC_READ
Operand read from memory or register.
@ CS_AC_WRITE
Operand write to memory or register.
@ X86_PREFIX_LOCK
lock (cs_x86.prefix[0]
@ X86_PREFIX_REPNE
repne/repnz (cs_x86.prefix[0]
@ X86_PREFIX_REP
rep (cs_x86.prefix[0]
@ X86_INS_AESKEYGENASSIST
@ X86_OP_IMM
= CS_OP_IMM (Immediate operand).
@ X86_OP_INVALID
= CS_OP_INVALID (Uninitialized).
@ X86_OP_REG
= CS_OP_REG (Register operand).
@ X86_OP_MEM
= CS_OP_MEM (Memory operand).
@ X86_GRP_PRIVILEGE
= CS_GRP_PRIVILEGE
RZ_API const char * rz_analysis_cc_default(RzAnalysis *analysis)
CAPSTONE_EXPORT cs_err CAPSTONE_API cs_regs_access(csh ud, const cs_insn *insn, cs_regs regs_read, uint8_t *regs_read_count, cs_regs regs_write, uint8_t *regs_write_count)
CAPSTONE_EXPORT size_t CAPSTONE_API cs_disasm(csh ud, const uint8_t *buffer, size_t size, uint64_t offset, size_t count, cs_insn **insn)
CAPSTONE_EXPORT cs_err CAPSTONE_API cs_open(cs_arch arch, cs_mode mode, csh *handle)
CAPSTONE_EXPORT bool CAPSTONE_API cs_insn_group(csh ud, const cs_insn *insn, unsigned int group_id)
CAPSTONE_EXPORT void CAPSTONE_API cs_free(cs_insn *insn, size_t count)
CAPSTONE_EXPORT const char *CAPSTONE_API cs_reg_name(csh ud, unsigned int reg)
CAPSTONE_EXPORT cs_err CAPSTONE_API cs_close(csh *handle)
CAPSTONE_EXPORT cs_err CAPSTONE_API cs_option(csh ud, cs_opt_type type, size_t value)
RZ_API void Ht_() free(HtName_(Ht) *ht)
RZ_API void rz_search_keyword_free(RzSearchKeyword *kw)
RZ_API RZ_OWN RzList * rz_list_newf(RzListFree f)
Returns a new initialized RzList pointer and sets the free method.
RZ_API RZ_BORROW RzListIter * rz_list_append(RZ_NONNULL RzList *list, void *data)
Appends at the end of the list a new element.
RZ_API void rz_list_free(RZ_NONNULL RzList *list)
Empties the list and frees the list pointer.
return strdup("=SP r13\n" "=LR r14\n" "=PC r15\n" "=A0 r0\n" "=A1 r1\n" "=A2 r2\n" "=A3 r3\n" "=ZF zf\n" "=SF nf\n" "=OF vf\n" "=CF cf\n" "=SN or0\n" "gpr lr .32 56 0\n" "gpr pc .32 60 0\n" "gpr cpsr .32 64 0 ____tfiae_________________qvczn\n" "gpr or0 .32 68 0\n" "gpr tf .1 64.5 0 thumb\n" "gpr ef .1 64.9 0 endian\n" "gpr jf .1 64.24 0 java\n" "gpr qf .1 64.27 0 sticky_overflow\n" "gpr vf .1 64.28 0 overflow\n" "gpr cf .1 64.29 0 carry\n" "gpr zf .1 64.30 0 zero\n" "gpr nf .1 64.31 0 negative\n" "gpr itc .4 64.10 0 if_then_count\n" "gpr gef .4 64.16 0 great_or_equal\n" "gpr r0 .32 0 0\n" "gpr r1 .32 4 0\n" "gpr r2 .32 8 0\n" "gpr r3 .32 12 0\n" "gpr r4 .32 16 0\n" "gpr r5 .32 20 0\n" "gpr r6 .32 24 0\n" "gpr r7 .32 28 0\n" "gpr r8 .32 32 0\n" "gpr r9 .32 36 0\n" "gpr r10 .32 40 0\n" "gpr r11 .32 44 0\n" "gpr r12 .32 48 0\n" "gpr r13 .32 52 0\n" "gpr r14 .32 56 0\n" "gpr r15 .32 60 0\n" "gpr r16 .32 64 0\n" "gpr r17 .32 68 0\n")
static static fork const void static count static fd const char static mode const char static pathname const char static path const char static dev const char static group static getpid static getuid void void static data static pause access
RZ_API RzRegItem * rz_reg_get(RzReg *reg, const char *name, int type)
RZ_API const char * rz_reg_32_to_64(RzReg *reg, const char *rreg32)
#define RZ_ANALYSIS_ARCHINFO_ALIGN
#define esilprintf(op, fmt,...)
@ RZ_ANALYSIS_OP_FAMILY_FPU
@ RZ_ANALYSIS_OP_FAMILY_THREAD
@ RZ_ANALYSIS_OP_FAMILY_CRYPTO
@ RZ_ANALYSIS_OP_FAMILY_SSE
@ RZ_ANALYSIS_OP_FAMILY_PRIV
@ RZ_ANALYSIS_OP_FAMILY_CPU
@ RZ_ANALYSIS_OP_FAMILY_MMX
#define RZ_ANALYSIS_ARCHINFO_MAX_OP_SIZE
@ RZ_ANALYSIS_OP_PREFIX_REP
@ RZ_ANALYSIS_OP_PREFIX_LOCK
@ RZ_ANALYSIS_OP_PREFIX_REPNE
@ RZ_ANALYSIS_OP_DIR_READ
@ RZ_ANALYSIS_OP_DIR_EXEC
@ RZ_ANALYSIS_OP_DIR_WRITE
@ RZ_ANALYSIS_OP_MASK_DISASM
@ RZ_ANALYSIS_OP_MASK_VAL
@ RZ_ANALYSIS_OP_MASK_OPEX
@ RZ_ANALYSIS_OP_MASK_ESIL
#define RZ_ANALYSIS_OP_TYPE_MASK
@ RZ_ANALYSIS_ACC_UNKNOWN
#define RZ_ANALYSIS_ARCHINFO_MIN_OP_SIZE
@ RZ_ANALYSIS_OP_TYPE_CMP
@ RZ_ANALYSIS_OP_TYPE_SUB
@ RZ_ANALYSIS_OP_TYPE_LOAD
@ RZ_ANALYSIS_OP_TYPE_MUL
@ RZ_ANALYSIS_OP_TYPE_ROL
@ RZ_ANALYSIS_OP_TYPE_JMP
@ RZ_ANALYSIS_OP_TYPE_AND
@ RZ_ANALYSIS_OP_TYPE_SAL
@ RZ_ANALYSIS_OP_TYPE_UPUSH
@ RZ_ANALYSIS_OP_TYPE_RPUSH
@ RZ_ANALYSIS_OP_TYPE_UJMP
@ RZ_ANALYSIS_OP_TYPE_MJMP
@ RZ_ANALYSIS_OP_TYPE_ROR
@ RZ_ANALYSIS_OP_TYPE_SWI
@ RZ_ANALYSIS_OP_TYPE_SAR
@ RZ_ANALYSIS_OP_TYPE_ABS
@ RZ_ANALYSIS_OP_TYPE_CMOV
@ RZ_ANALYSIS_OP_TYPE_TRAP
@ RZ_ANALYSIS_OP_TYPE_XCHG
@ RZ_ANALYSIS_OP_TYPE_CALL
@ RZ_ANALYSIS_OP_TYPE_ADD
@ RZ_ANALYSIS_OP_TYPE_STORE
@ RZ_ANALYSIS_OP_TYPE_REG
@ RZ_ANALYSIS_OP_TYPE_PUSH
@ RZ_ANALYSIS_OP_TYPE_SHR
@ RZ_ANALYSIS_OP_TYPE_IRJMP
@ RZ_ANALYSIS_OP_TYPE_POP
@ RZ_ANALYSIS_OP_TYPE_RJMP
@ RZ_ANALYSIS_OP_TYPE_CJMP
@ RZ_ANALYSIS_OP_TYPE_DIV
@ RZ_ANALYSIS_OP_TYPE_COND
@ RZ_ANALYSIS_OP_TYPE_MOV
@ RZ_ANALYSIS_OP_TYPE_SHL
@ RZ_ANALYSIS_OP_TYPE_ILL
@ RZ_ANALYSIS_OP_TYPE_UCALL
@ RZ_ANALYSIS_OP_TYPE_NOT
@ RZ_ANALYSIS_OP_TYPE_RET
@ RZ_ANALYSIS_OP_TYPE_NOP
@ RZ_ANALYSIS_OP_TYPE_ACMP
@ RZ_ANALYSIS_OP_TYPE_LEA
@ RZ_ANALYSIS_OP_TYPE_RCALL
@ RZ_ANALYSIS_OP_TYPE_XOR
@ RZ_ANALYSIS_OP_TYPE_IRCALL
#define rz_return_val_if_fail(expr, val)
void(* RzListFree)(void *ptr)
#define RZ_LOG_ERROR(fmtstr,...)
RZ_API PJ * pj_ka(PJ *j, const char *k)
RZ_API PJ * pj_kb(PJ *j, const char *k, bool v)
RZ_API PJ * pj_ki(PJ *j, const char *k, int d)
RZ_API PJ * pj_end(PJ *j)
RZ_API const char * pj_string(PJ *pj)
RZ_API void pj_free(PJ *j)
RZ_API PJ * pj_ks(PJ *j, const char *k, const char *v)
RZ_API PJ * pj_kN(PJ *j, const char *k, st64 n)
RZ_API char * rz_str_newf(const char *fmt,...) RZ_PRINTF_CHECK(1
RZ_API bool rz_strbuf_append(RzStrBuf *sb, const char *s)
RZ_API bool rz_strbuf_appendf(RzStrBuf *sb, const char *fmt,...) RZ_PRINTF_CHECK(2
RZ_API void rz_strbuf_init(RzStrBuf *sb)
@ RZ_TYPE_COND_LE
Less or equal.
@ RZ_TYPE_COND_GE
Greater or equal.
@ RZ_TYPE_COND_NE
Not equal.
@ RZ_TYPE_COND_GT
Greater than.
@ RZ_TYPE_COND_LT
Less than.
ut64(WINAPI *w32_GetEnabledXStateFeatures)()