Rizin
unix-like reverse engineering framework and cli tools
analysis_malbolge.c File Reference
#include <rz_analysis.h>
#include <rz_types.h>
#include <rz_lib.h>

Go to the source code of this file.

Functions

static int mal_analysis (RzAnalysis *analysis, RzAnalysisOp *op, ut64 addr, const ut8 *data, int len, RzAnalysisOpMask mask)
 

Variables

RzAnalysisPlugin rz_analysis_plugin_malbolge
 
RZ_API RzLibStruct rizin_plugin
 

Function Documentation

◆ mal_analysis()

static int mal_analysis ( RzAnalysis analysis,
RzAnalysisOp op,
ut64  addr,
const ut8 data,
int  len,
RzAnalysisOpMask  mask 
)
static

Definition at line 8 of file analysis_malbolge.c.

8  {
9  if (len) {
10  switch ((data[0] + addr) % 94) {
11  case 4:
13  break;
14  case 5:
15  case 23:
16  op->type = RZ_ANALYSIS_OP_TYPE_IO;
17  break;
18  case 39:
21  break;
22  case 40:
24  break;
25  case 62:
28  break;
29  case 81:
31  break;
32  default:
34  }
35  return op->size = 1;
36  }
37  return false;
38 }
size_t len
Definition: 6502dis.c:15
@ RZ_ANALYSIS_OP_TYPE_LOAD
Definition: rz_analysis.h:416
@ RZ_ANALYSIS_OP_TYPE_UJMP
Definition: rz_analysis.h:369
@ RZ_ANALYSIS_OP_TYPE_IO
Definition: rz_analysis.h:403
@ RZ_ANALYSIS_OP_TYPE_ROR
Definition: rz_analysis.h:419
@ RZ_ANALYSIS_OP_TYPE_TRAP
Definition: rz_analysis.h:392
@ RZ_ANALYSIS_OP_TYPE_NOP
Definition: rz_analysis.h:389
@ RZ_ANALYSIS_OP_TYPE_XOR
Definition: rz_analysis.h:412
Definition: dis.c:32
static int addr
Definition: z80asm.c:58

References addr, len, RZ_ANALYSIS_OP_TYPE_IO, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_ANALYSIS_OP_TYPE_NOP, RZ_ANALYSIS_OP_TYPE_ROR, RZ_ANALYSIS_OP_TYPE_TRAP, RZ_ANALYSIS_OP_TYPE_UJMP, and RZ_ANALYSIS_OP_TYPE_XOR.

Variable Documentation

◆ rizin_plugin

RZ_API RzLibStruct rizin_plugin
Initial value:
= {
}
RzAnalysisPlugin rz_analysis_plugin_malbolge
@ RZ_LIB_TYPE_ANALYSIS
Definition: rz_lib.h:73
#define RZ_VERSION
Definition: rz_version.h:8
const char * version
Definition: rz_analysis.h:1239

Definition at line 50 of file analysis_malbolge.c.

◆ rz_analysis_plugin_malbolge

RzAnalysisPlugin rz_analysis_plugin_malbolge
Initial value:
= {
.name = "malbolge",
.desc = "Malbolge analysis plugin",
.arch = "malbolge",
.license = "LGPL3",
.bits = 32,
.op = &mal_analysis,
}
static int mal_analysis(RzAnalysis *analysis, RzAnalysisOp *op, ut64 addr, const ut8 *data, int len, RzAnalysisOpMask mask)

Definition at line 40 of file analysis_malbolge.c.