miasm
Reverse engineering framework
JitCore_msp430.h
Go to the documentation of this file.
1 
2 struct vm_cpu {
3  uint32_t exception_flags;
4 
5  /* gpregs */
6  uint32_t PC;
7  uint32_t SP;
8  uint32_t R3;
9  uint32_t R4;
10  uint32_t R5;
11  uint32_t R6;
12  uint32_t R7;
13  uint32_t R8;
14  uint32_t R9;
15  uint32_t R10;
16  uint32_t R11;
17  uint32_t R12;
18  uint32_t R13;
19  uint32_t R14;
20  uint32_t R15;
21 
22  /* eflag */
23  uint32_t zf;
24  uint32_t nf;
25  uint32_t of;
26  uint32_t cf;
27 
28  uint32_t cpuoff;
29  uint32_t gie;
30  uint32_t osc;
31  uint32_t scg0;
32  uint32_t scg1;
33  uint32_t res;
34 
35 };
36 
37 #define RETURN_PC return BlockDst;
38 
39 _MIASM_EXPORT void dump_gpregs(struct vm_cpu* vmcpu);
40 
41 _MIASM_EXPORT void MEM_WRITE_08(JitCpu* jitcpu, uint64_t addr, uint8_t src);
42 _MIASM_EXPORT void MEM_WRITE_16(JitCpu* jitcpu, uint64_t addr, uint16_t src);
43 _MIASM_EXPORT void MEM_WRITE_32(JitCpu* jitcpu, uint64_t addr, uint32_t src);
44 _MIASM_EXPORT void MEM_WRITE_64(JitCpu* jitcpu, uint64_t addr, uint64_t src);
dse_crackme.found
bool found
Definition: dse_crackme.py:270
vm_cpu::of
uint32_t of
Definition: JitCore_aarch64.h:46
vm_cpu::R3
uint32_t R3
Definition: JitCore_arm.h:10
get_gpreg_offset_all
PyObject * get_gpreg_offset_all(void)
Definition: JitCore_msp430.c:268
miasm.arch.msp430.regs.res
res
Definition: regs.py:71
vm_cpu::scg0
uint32_t scg0
Definition: JitCore_msp430.h:31
cpu_get_gpreg
PyObject * cpu_get_gpreg(JitCpu *self)
Definition: JitCore_msp430.c:49
_reg_dict
Definition: JitCore.h:194
MOD_DEF
#define MOD_DEF(ob, name, doc, methods)
Definition: compat_py23.h:218
PyGetInt_uint32_t
#define PyGetInt_uint32_t(item, value)
Definition: compat_py23.h:194
dump_gpregs
_MIASM_EXPORT void dump_gpregs(struct vm_cpu *vmcpu)
Definition: JitCore_aarch64.c:170
JitCpu_new
PyObject * JitCpu_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
Definition: JitCore.c:20
MEM_WRITE_08
void MEM_WRITE_08(JitCpu *jitcpu, uint64_t addr, uint8_t src)
Definition: JitCore_msp430.c:186
JitCore_msp430.h
vm_MEM_WRITE_32
void vm_MEM_WRITE_32(vm_mngr_t *vm_mngr, uint64_t addr, unsigned int src)
Definition: vm_mngr.c:473
vm_cpu::R6
uint32_t R6
Definition: JitCore_arm.h:13
RET_MODULE
#define RET_MODULE
Definition: compat_py23.h:221
vm_cpu::R7
uint32_t R7
Definition: JitCore_arm.h:14
JitCpu_get_vmmngr
PyObject * JitCpu_get_vmmngr(JitCpu *self, void *closure)
Definition: JitCore.c:28
modint.i
i
Definition: modint.py:70
vm_cpu::res
uint32_t res
Definition: JitCore_msp430.h:33
miasm.arch.aarch64.regs.cf
cf
Definition: regs.py:166
vm_cpu::osc
uint32_t osc
Definition: JitCore_msp430.h:30
gpreg_dict
reg_dict gpreg_dict[]
Definition: JitCore_msp430.c:14
miasm.arch.aarch64.regs.zf
zf
Definition: regs.py:163
MEM_WRITE_64
_MIASM_EXPORT void MEM_WRITE_64(JitCpu *jitcpu, uint64_t addr, uint64_t src)
Definition: JitCore_aarch64.c:249
miasm.arch.aarch64.regs.of
of
Definition: regs.py:165
vm_cpu::R11
uint32_t R11
Definition: JitCore_arm.h:18
vm_cpu::nf
uint32_t nf
Definition: JitCore_aarch64.h:45
MEM_WRITE_16
void MEM_WRITE_16(JitCpu *jitcpu, uint64_t addr, uint16_t src)
Definition: JitCore_msp430.c:191
get_reg
#define get_reg(reg)
Definition: JitCore.h:152
vm_cpu::R8
uint32_t R8
Definition: JitCore_arm.h:15
vm_cpu::R9
uint32_t R9
Definition: JitCore_arm.h:16
PyGetStr
#define PyGetStr(dest, name)
Definition: compat_py23.h:181
cpu_dump_gpregs
PyObject * cpu_dump_gpregs(JitCpu *self, PyObject *args)
Definition: JitCore_msp430.c:150
vm_cpu::R4
uint32_t R4
Definition: JitCore_arm.h:11
vm_MEM_WRITE_64
void vm_MEM_WRITE_64(vm_mngr_t *vm_mngr, uint64_t addr, uint64_t src)
Definition: vm_mngr.c:478
JitCpu_set_vmmngr
PyObject * JitCpu_set_vmmngr(JitCpu *self, PyObject *value, void *closure)
Definition: JitCore.c:38
MEM_WRITE_64
void MEM_WRITE_64(JitCpu *jitcpu, uint64_t addr, uint64_t src)
Definition: JitCore_msp430.c:201
cpu_init_regs
PyObject * cpu_init_regs(JitCpu *self)
Definition: JitCore_msp430.c:125
miasm.arch.arm.regs.R8
list R8
Definition: regs.py:25
cpu_dump_gpregs_with_attrib
PyObject * cpu_dump_gpregs_with_attrib(JitCpu *self, PyObject *args)
Definition: JitCore_msp430.c:160
miasm.arch.msp430.regs.R14
list R14
Definition: regs.py:29
_reg_dict::name
char * name
Definition: JitCore.h:195
JitCpu_set_jitter
PyObject * JitCpu_set_jitter(JitCpu *self, PyObject *value, void *closure)
Definition: JitCore.c:73
miasm.arch.arm.regs.R10
list R10
Definition: regs.py:27
vm_cpu::cf
uint32_t cf
Definition: JitCore_aarch64.h:47
vm_cpu::PC
uint64_t PC
Definition: JitCore_aarch64.h:41
RAISE
#define RAISE(errtype, msg)
Definition: JitCore.h:19
export_llvm.name
name
Definition: export_llvm.py:70
VmMngr
Definition: vm_mngr_py.h:8
MEM_WRITE_32
void MEM_WRITE_32(JitCpu *jitcpu, uint64_t addr, uint32_t src)
Definition: JitCore_msp430.c:196
vm_cpu::gie
uint32_t gie
Definition: JitCore_msp430.h:29
vm_MEM_WRITE_08
void vm_MEM_WRITE_08(vm_mngr_t *vm_mngr, uint64_t addr, unsigned char src)
Definition: vm_mngr.c:462
cpu_set_exception
PyObject * cpu_set_exception(JitCpu *self, PyObject *args)
Definition: JitCore_msp430.c:166
vm_cpu::scg1
uint32_t scg1
Definition: JitCore_msp430.h:32
vm_cpu::R10
uint32_t R10
Definition: JitCore_arm.h:17
JitCpu_get_jitter
PyObject * JitCpu_get_jitter(JitCpu *self, void *closure)
Definition: JitCore.c:63
vm_MEM_WRITE_16
void vm_MEM_WRITE_16(vm_mngr_t *vm_mngr, uint64_t addr, unsigned short src)
Definition: vm_mngr.c:468
dse_crackme.stderr
stderr
Definition: dse_crackme.py:320
miasm.arch.arm.regs.SP
list SP
Definition: regs.py:30
miasm.arch.msp430.regs.R15
list R15
Definition: regs.py:30
MEM_WRITE_16
_MIASM_EXPORT void MEM_WRITE_16(JitCpu *jitcpu, uint64_t addr, uint16_t src)
Definition: JitCore_aarch64.c:239
vm_cpu::zf
uint32_t zf
Definition: JitCore_aarch64.h:44
miasm.arch.msp430.regs.cpuoff
cpuoff
Definition: regs.py:66
MOD_INIT
MOD_INIT(JitCore_msp430)
Definition: JitCore_msp430.c:406
vm_cpu::exception_flags
uint32_t exception_flags
Definition: JitCore_aarch64.h:3
MEM_WRITE_32
_MIASM_EXPORT void MEM_WRITE_32(JitCpu *jitcpu, uint64_t addr, uint32_t src)
Definition: JitCore_aarch64.c:244
_MIASM_EXPORT
#define _MIASM_EXPORT
Definition: JitCore_x86.h:6
miasm.arch.msp430.regs.scg0
scg0
Definition: regs.py:69
vm_cpu::cpuoff
uint32_t cpuoff
Definition: JitCore_msp430.h:28
miasm.arch.aarch64.regs.nf
nf
Definition: regs.py:164
shellcode.args
args
Definition: shellcode.py:26
_reg_dict::offset
size_t offset
Definition: JitCore.h:196
dump_gpregs
void dump_gpregs(struct vm_cpu *vmcpu)
Definition: JitCore_msp430.c:134
miasm.arch.msp430.regs.gie
gie
Definition: regs.py:67
miasm.arch.msp430.regs.scg1
scg1
Definition: regs.py:70
miasm.arch.arm.regs.R11
list R11
Definition: regs.py:28
JitCpu::pyvm
PyObject_HEAD VmMngr * pyvm
Definition: JitCore.h:188
miasm.arch.arm.regs.R5
list R5
Definition: regs.py:22
miasm.arch.msp430.regs.R13
list R13
Definition: regs.py:28
miasm.arch.arm.regs.R9
list R9
Definition: regs.py:26
JitCpu_dealloc
void JitCpu_dealloc(JitCpu *self)
Definition: JitCore.c:14
vm_cpu::R15
uint32_t R15
Definition: JitCore_msp430.h:20
getset_reg_u16
getset_reg_u16(PC)
miasm.arch.arm.regs.R3
list R3
Definition: regs.py:20
miasm.arch.aarch64.regs.PC
PC
Definition: regs.py:137
dis_binary.addr
addr
Definition: dis_binary.py:24
MEM_WRITE_08
_MIASM_EXPORT void MEM_WRITE_08(JitCpu *jitcpu, uint64_t addr, uint8_t src)
Definition: JitCore_aarch64.c:234
miasm.arch.msp430.regs.osc
osc
Definition: regs.py:68
miasm.arch.arm.regs.R4
list R4
Definition: regs.py:21
vm_cpu::R14
uint32_t R14
Definition: JitCore_msp430.h:19
get_reg_off
#define get_reg_off(reg)
Definition: JitCore.h:170
simplification_tools.o
o
Definition: simplification_tools.py:24
vm_cpu::SP
uint64_t SP
Definition: JitCore_aarch64.h:39
example_types.val
val
Definition: example_types.py:218
miasm.arch.arm.regs.R6
list R6
Definition: regs.py:23
vm_cpu::R5
uint32_t R5
Definition: JitCore_arm.h:12
cpu_set_gpreg
PyObject * cpu_set_gpreg(JitCpu *self, PyObject *args)
Definition: JitCore_msp430.c:88
miasm.arch.arm.regs.R12
list R12
Definition: regs.py:29
vm_cpu::R13
uint32_t R13
Definition: JitCore_msp430.h:18
miasm.arch.aarch64.regs.exception_flags
exception_flags
Definition: regs.py:7
JitCpu
Definition: JitCore.h:186
vm_cpu
Definition: JitCore_aarch64.h:2
vm_cpu::R12
uint32_t R12
Definition: JitCore_arm.h:19
cpu_get_exception
PyObject * cpu_get_exception(JitCpu *self, PyObject *args)
Definition: JitCore_msp430.c:181
miasm.arch.arm.regs.R7
list R7
Definition: regs.py:24