101 if (
len > 0 && analysis->
cur && analysis->
cur->
op) {
120 if (
op->nopcode < 1) {
123 }
else if (!memcmp(data,
"\xff\xff\xff\xff",
RZ_MIN(4,
len))) {
127 if (
op->cycles == 0) {
132 RZ_LOG_DEBUG(
"Warning: unhandled RZ_ANALYSIS_OP_MASK_DISASM in rz_analysis_op\n");
167 rz_list_foreach (
op->access, it,
val) {
337 char *cstr, ret[128];
390 snprintf(ret,
sizeof(ret),
"%s()",
f->name);
400 snprintf(ret,
sizeof(ret),
"if (%s) %s()", cstr,
f->name);
407 snprintf(ret,
sizeof(ret),
"if (unk) %s()",
f->name);
414 if (!a1 || !strcmp(
a0, a1)) {
421 if (!a1 || !strcmp(
a0, a1)) {
428 if (!a1 || !strcmp(
a0, a1)) {
435 if (!a1 || !strcmp(
a0, a1)) {
442 if (!a1 || !strcmp(
a0, a1)) {
449 if (!a1 || !strcmp(
a0, a1)) {
456 if (!a1 || !strcmp(
a0, a1)) {
477 snprintf(ret,
sizeof(ret),
"if (%s) ret", cstr);
480 strcpy(ret,
"if (unk) ret");
487 if (!a1 || !strcmp(
a0, a1)) {
490 snprintf(ret,
sizeof(ret),
"%s = %s %% %s",
r0,
a0, a1);
494 if (!a1 || !strcmp(
a0, a1)) {
539 static const struct {
595 if (hint->
type > 0) {
634 if (
op.dst &&
op.dst->reg &&
op.dst->reg->name && (!
name || !strcmp(
op.dst->reg->name,
name))) {
RZ_API char * rz_analysis_value_to_string(RzAnalysisValue *value)
RZ_API void rz_analysis_value_free(RzAnalysisValue *value)
RZ_API RzAnalysisValue * rz_analysis_value_copy(RzAnalysisValue *ov)
RZ_API RzAnalysisBlock * rz_analysis_find_most_relevant_block_in(RzAnalysis *analysis, ut64 off)
RZ_API char * rz_analysis_cond_to_string(RzAnalysisCond *cond)
RZ_DEPRECATE RZ_API RzAnalysisFunction * rz_analysis_get_fcn_in(RzAnalysis *analysis, ut64 addr, int type)
RZ_API RzAnalysisHint * rz_analysis_hint_get(RzAnalysis *a, ut64 addr)
RZ_API void rz_analysis_hint_free(RzAnalysisHint *h)
RZ_API void Ht_() free(HtName_(Ht) *ht)
RZ_API void rz_il_op_effect_free(RZ_NULLABLE RzILOpEffect *op)
return memset(p, 0, total)
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
static void list(RzEgg *egg)
RZ_API RZ_OWN RzList * rz_list_newf(RzListFree f)
Returns a new initialized RzList pointer and sets the free method.
RZ_API RZ_OWN RzList * rz_list_new(void)
Returns a new initialized RzList pointer (free method is not initialized)
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")
RZ_API int rz_analysis_op_reg_delta(RzAnalysis *analysis, ut64 addr, const char *name)
RZ_API RzAnalysisOp * rz_analysis_op_copy(RzAnalysisOp *op)
RZ_API void rz_analysis_op_free(void *op)
RZ_API bool rz_analysis_op_fini(RzAnalysisOp *op)
RZ_API char * rz_analysis_op_to_string(RzAnalysis *analysis, RzAnalysisOp *op)
RZ_API int rz_analysis_op_hint(RzAnalysisOp *op, RzAnalysisHint *hint)
RZ_API const char * rz_analysis_optype_to_string(int type)
static int defaultCycles(RzAnalysisOp *op)
RZ_API bool rz_analysis_op_nonlinear(int t)
static const struct @7 op_families[]
RZ_API int rz_analysis_optype_from_string(RZ_NONNULL const char *name)
RZ_API const char * rz_analysis_op_to_esil_string(RzAnalysis *analysis, RzAnalysisOp *op)
RZ_API RzAnalysisOp * rz_analysis_op_new(void)
RZ_API void rz_analysis_op_init(RzAnalysisOp *op)
RZ_API int rz_analysis_op_family_from_string(RZ_NONNULL const char *name)
RZ_API const char * rz_analysis_stackop_tostring(int s)
RZ_API int rz_analysis_op(RzAnalysis *analysis, RzAnalysisOp *op, ut64 addr, const ut8 *data, int len, RzAnalysisOpMask mask)
RZ_API const char * rz_analysis_op_family_to_string(int id)
static struct optype optypes[]
RZ_API bool rz_analysis_op_ismemref(int t)
RZ_API RzList * rz_analysis_op_list_new(void)
@ RZ_ANALYSIS_FCN_TYPE_NULL
@ RZ_ANALYSIS_STACK_RESET
@ RZ_ANALYSIS_OP_FAMILY_FPU
@ RZ_ANALYSIS_OP_FAMILY_THREAD
@ RZ_ANALYSIS_OP_FAMILY_CRYPTO
@ RZ_ANALYSIS_OP_FAMILY_SSE
@ RZ_ANALYSIS_OP_FAMILY_UNKNOWN
@ RZ_ANALYSIS_OP_FAMILY_PRIV
@ RZ_ANALYSIS_OP_FAMILY_CPU
@ RZ_ANALYSIS_OP_FAMILY_MMX
@ RZ_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_ADD
@ RZ_ANALYSIS_OP_TYPE_SWITCH
@ RZ_ANALYSIS_OP_TYPE_STORE
@ RZ_ANALYSIS_OP_TYPE_CPL
@ RZ_ANALYSIS_OP_TYPE_CRET
@ 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_CSWI
@ RZ_ANALYSIS_OP_TYPE_CAST
@ RZ_ANALYSIS_OP_TYPE_UCJMP
@ 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_NEW
@ RZ_ANALYSIS_OP_TYPE_IRCALL
#define rz_return_val_if_fail(expr, val)
void(* RzListFree)(void *ptr)
#define RZ_LOG_DEBUG(fmtstr,...)
RZ_API const char * rz_strbuf_set(RzStrBuf *sb, const char *s)
RZ_API char * rz_strbuf_get(RzStrBuf *sb)
RZ_API bool rz_strbuf_copy(RzStrBuf *dst, RzStrBuf *src)
RZ_API void rz_strbuf_fini(RzStrBuf *sb)
RZ_API void rz_strbuf_init(RzStrBuf *sb)
struct rz_analysis_plugin_t * cur
RzCoreSeekArchBits archbits
RZ_API void rz_analysis_switch_op_free(RzAnalysisSwitchOp *swop)
ut64(WINAPI *w32_GetEnabledXStateFeatures)()