Rizin
unix-like reverse engineering framework and cli tools
analysis_malbolge.c
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2015 condret <condr3t@protonmail.com>
2 // SPDX-License-Identifier: LGPL-3.0-only
3 
4 #include <rz_analysis.h>
5 #include <rz_types.h>
6 #include <rz_lib.h>
7 
8 static int mal_analysis(RzAnalysis *analysis, RzAnalysisOp *op, ut64 addr, const ut8 *data, int len, RzAnalysisOpMask mask) {
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 }
39 
41  .name = "malbolge",
42  .desc = "Malbolge analysis plugin",
43  .arch = "malbolge",
44  .license = "LGPL3",
45  .bits = 32,
46  .op = &mal_analysis,
47 };
48 
49 #ifndef RZ_PLUGIN_INCORE
54 };
55 #endif
size_t len
Definition: 6502dis.c:15
#define mask()
static int mal_analysis(RzAnalysis *analysis, RzAnalysisOp *op, ut64 addr, const ut8 *data, int len, RzAnalysisOpMask mask)
RzAnalysisPlugin rz_analysis_plugin_malbolge
RZ_API RzLibStruct rizin_plugin
#define RZ_API
uint8_t ut8
Definition: lh5801.h:11
RzAnalysisOpMask
Definition: rz_analysis.h:439
@ 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
@ 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: dis.c:32
ut64(WINAPI *w32_GetEnabledXStateFeatures)()
static int addr
Definition: z80asm.c:58