|
miasm
Reverse engineering framework
|
Go to the documentation of this file.
7 #define _MIASM_EXPORT __declspec(dllexport)
8 #define _MIASM_IMPORT __declspec(dllimport)
20 #define parity(a) parity_table[(a) & 0xFF]
49 uint ## sizeA ## _t udiv ## sizeA (uint ## sizeA ## _t a, uint ## sizeA ## _t b) \
51 uint ## sizeA ## _t r; \
53 fprintf(stderr, "Should not happen\n"); \
62 uint ## sizeA ## _t umod ## sizeA (uint ## sizeA ## _t a, uint ## sizeA ## _t b) \
64 uint ## sizeA ## _t r; \
66 fprintf(stderr, "Should not happen\n"); \
75 int ## sizeA ## _t sdiv ## sizeA (int ## sizeA ## _t a, int ## sizeA ## _t b) \
77 int ## sizeA ## _t r; \
79 fprintf(stderr, "Should not happen\n"); \
88 int ## sizeA ## _t smod ## sizeA (int ## sizeA ## _t a, int ## sizeA ## _t b) \
90 int ## sizeA ## _t r; \
92 fprintf(stderr, "Should not happen\n"); \
157 #define SHIFT_RIGHT_ARITH(size, value, shift) \
158 ((uint ## size ## _t)((((uint64_t) (shift)) > ((size) - 1))? \
159 (((int ## size ## _t) (value)) < 0 ? -1 : 0) : \
160 (((int ## size ## _t) (value)) >> (shift))))
162 #define SHIFT_RIGHT_LOGIC(size, value, shift) \
163 ((uint ## size ## _t)((((uint64_t) (shift)) > ((size) - 1))? \
165 (((uint ## size ## _t) (value)) >> (shift))))
167 #define SHIFT_LEFT_LOGIC(size, value, shift) \
168 ((uint ## size ## _t)((((uint64_t) (shift)) > ((size) - 1))? \
170 (((uint ## size ## _t) (value)) << (shift))))
has_delayslot
Definition: llvmconvert.py:269
unsigned int fpu_fcom_c2(double a, double b)
Definition: op_semantics.c:741
my_args
Definition: llvmconvert.py:532
bs
Definition: jitload.py:221
def disasm_cb(self)
Definition: jitcore.py:296
arch_name
Definition: jitcore.py:48
def init_run(self, pc)
Definition: jitload.py:392
Definition: new_cstruct.py:171
def add_dlldesc(self, new_dll)
Definition: pe.py:1013
def add_exception_handler(self, flag, callback)
Definition: jitload.py:324
int(* jitted_func)(block_id *, PyObject *)
Definition: Jitgcc.c:11
uint16_t bcdadd_16(uint16_t a, uint16_t b)
Definition: op_semantics.c:43
cname2addr
Definition: utils.py:33
def __updt_jitcode_mem_range(self, vm)
Definition: jitcore.py:204
uint64_t rot_left(uint64_t size, uint64_t a, uint64_t b)
Definition: op_semantics.c:172
_MIASM_EXPORT int8_t sdiv8(int8_t a, int8_t b)
def disasm_and_jit_block(self, addr, vm)
Definition: jitcore.py:126
def remove_key(self, key)
Definition: jitload.py:115
unsigned int x86_cpuid(unsigned int a, unsigned int reg_num)
Definition: op_semantics.c:299
def lib_get_add_func(self, libad, imp_ord_or_name, dst_ad=None)
Definition: utils.py:59
log
Definition: full.py:20
Definition: jitload.py:156
SymbExecClass
Definition: jitcore_python.py:17
def load_code(self, label, fname_so)
Definition: jitcore_gcc.py:36
def gen_C_source(ir_arch, func_code)
Definition: jitcore_cc_base.py:127
def sete(self, entries)
Definition: pe.py:1174
def gen_post_instr_checks(self, attrib, next_instr)
Definition: llvmconvert.py:1433
_MIASM_EXPORT uint32_t sint_to_fp_32(int32_t a)
Definition: op_semantics.c:763
_MIASM_EXPORT uint16_t umod16(uint16_t a, uint16_t b)
Definition: jitcore_llvm.py:1
def align_sections(self, f_align=None, s_align=None)
Definition: pe.py:212
_MIASM_EXPORT uint16_t bcdadd_cf_16(uint16_t a, uint16_t b)
Definition: op_semantics.c:67
ir_arch
Definition: llvmconvert.py:227
def remove_callback(self, callback)
Definition: jitload.py:92
res
Definition: regs.py:71
Definition: expression.py:931
def get_funcvirt(self, dllname, funcname)
Definition: pe.py:618
parent_head
Definition: new_cstruct.py:176
def cache_getbuffer(module)
Definition: llvmconvert.py:437
_MIASM_EXPORT uint32_t udiv32(uint32_t a, uint32_t b)
Definition: jitcore_cc_base.py:42
def insert(self, index, entry)
Definition: pe.py:331
uint32_t fpu_fsqrt32(uint32_t a)
Definition: op_semantics.c:642
C_Gen
Definition: jitload.py:180
#define MOD_DEF(ob, name, doc, methods)
Definition: compat_py23.h:218
def get_funcvirt(self, addr)
Definition: pe.py:1111
def clear_jitted_blocks(self)
Definition: jitcore.py:80
dictionary arch_dependent_libs
Definition: jitcore_llvm.py:22
Python jitter Core #.
Definition: jitcore_python.py:14
def get_assembly(self)
Definition: llvmconvert.py:1812
def __repr__(self)
Definition: pe.py:1470
def create(self, name='default.dll')
Definition: pe.py:758
def __repr__(self)
Definition: pe.py:1571
def build_content(self, raw)
Definition: pe.py:459
Definition: emulatedsymbexec.py:1
all_exported_lib
Definition: utils.py:35
Definition: jitload.py:138
Definition: locationdb.py:1
Definition: llvmconvert.py:219
def __init__(self, ir_arch, bin_stream)
Definition: jitcore_gcc.py:20
_MIASM_EXPORT int32_t sdiv32(int32_t a, int32_t b)
Definition: jitcore_cc_base.py:51
_MIASM_EXPORT uint64_t sint_to_fp_64(int64_t a)
Definition: op_semantics.c:756
def __len__(self)
Definition: pe.py:1199
Definition: elf_init.py:813
main_stream
Definition: llvmconvert.py:751
def set_rva(self, rva, size=None)
Definition: pe.py:942
def set_rva(self, rva, size=None)
Definition: pe.py:1180
def global_constant(self, name, value)
Definition: llvmconvert.py:642
def init_codegen(self, codegen)
Definition: jitcore_cc_base.py:103
def __str__(self)
Definition: pe.py:317
def force_bytes(value)
Definition: utils.py:87
def memory_lookup(self, func, addr, size)
Definition: llvmconvert.py:481
run_iterator
Definition: jitload.py:396
def canon_libname_libfunc(libname, libfunc)
Definition: utils.py:14
options
Definition: jitcore.py:60
PC
Definition: llvmconvert.py:261
_MIASM_EXPORT unsigned int imul_lo_op_08(char a, char b)
Definition: op_semantics.c:124
def init_fc(self)
Definition: llvmconvert.py:721
def optimise_level(self, level=2)
Definition: llvmconvert.py:105
#define UDIV(sizeA)
Definition: op_semantics.h:48
int64_t fp64_to_sint64(uint64_t a)
Definition: op_semantics.c:780
Definition: expression.py:1
def get_pe_dependencies(pe_obj)
Definition: pe.py:24
codegen
Definition: jitcore_cc_base.py:108
def init_regs(test)
Definition: mn_pushpop.py:9
def get_import_address_pe(e)
Definition: pe.py:62
float flt
Definition: op_semantics.c:443
Definition: __init__.py:1
def __len__(self)
Definition: pe.py:726
Definition: jitcore.py:30
def gets(self, raw, off)
Definition: pe.py:265
def add_ir(self, expr)
Definition: llvmconvert.py:763
Definition: strpatchwork.py:1
int imul_hi_op_08(char a, char b)
Definition: op_semantics.c:139
Definition: locationdb.py:11
def sete(self, value)
Definition: pe.py:1132
def __init__(self, ir_arch, bin_stream)
Definition: jitcore_llvm.py:31
def get_breakpoint(self, addr)
Definition: jitload.py:301
def build_content(self, raw)
Definition: pe.py:978
uint64_t fpu_fadd64(uint64_t a, uint64_t b)
Definition: op_semantics.c:468
_MIASM_EXPORT unsigned int fpu_fcom_c0(double a, double b)
Definition: op_semantics.c:728
#define RET_MODULE
Definition: compat_py23.h:221
def build_content(self, raw)
Definition: pe.py:1362
Definition: new_cstruct.py:1
libbase_ad
Definition: utils.py:29
def __getitem__(self, item)
Definition: pe.py:240
def new_module(self, name="mod")
Definition: llvmconvert.py:252
def init_exceptions_handler(self)
Definition: jitload.py:264
_MIASM_EXPORT unsigned int my_imul08(unsigned int a, unsigned int b)
Definition: op_semantics.c:286
def fptype(cls, size)
Definition: llvmconvert.py:66
i
Definition: modint.py:70
branch_counter
Definition: llvmconvert.py:537
_MIASM_EXPORT double fpu_fcos(double a)
Definition: op_semantics.c:608
def init_stack(self)
Definition: jitload.py:446
def __init__(self, ir_arch, jit_type="gcc")
Definition: jitload.py:182
Definition: jitload.py:558
def gete(self, raw, off)
Definition: pe.py:1296
def set_data(self, data)
Definition: pe.py:149
uint64_t fpu_fabs64(uint64_t a)
Definition: op_semantics.c:667
def as_llvm_mod(self)
Definition: llvmconvert.py:1798
uint64_t rot_right(uint64_t size, uint64_t a, uint64_t b)
Definition: op_semantics.c:210
#define SMOD(sizeA)
Definition: op_semantics.h:87
_MIASM_EXPORT int16_t smod16(int16_t a, int16_t b)
def __str__(self)
Definition: llvmconvert.py:1790
def get_passmanager(self)
Definition: llvmconvert.py:134
uint64_t fpu_fprem64(uint64_t a, uint64_t b)
Definition: op_semantics.c:680
_MIASM_EXPORT unsigned int imul_lo_op_16(short a, short b)
Definition: op_semantics.c:129
local_vars
Definition: llvmconvert.py:744
dlldescname
Definition: pe.py:660
def gen_c_code(self, block)
Definition: jitcore_cc_base.py:110
_MIASM_EXPORT uint64_t fp32_to_fp64(uint32_t a)
Definition: op_semantics.c:809
vm_mngr_t vm_mngr
Definition: vm_mngr_py.h:11
vmcpu
Definition: llvmconvert.py:231
_MIASM_EXPORT double fpu_f2xm1(double a)
Definition: op_semantics.c:631
def run_at(self, pc)
Definition: jitload.py:331
def add_memlookups(self)
Definition: llvmconvert.py:278
Definition: op_semantics.c:441
_MIASM_EXPORT int imul_hi_op_08(char a, char b)
Definition: op_semantics.c:139
_MIASM_EXPORT int32_t fp32_to_sint32(uint32_t a)
Definition: op_semantics.c:770
def vm_load_pe_and_dependencies(vm, fname, name2module, runtime_lib, lib_path_base, **kwargs)
Definition: pe.py:585
uint32_t fpu_fdiv32(uint32_t a, uint32_t b)
Definition: op_semantics.c:543
lib_imp2dstad
Definition: utils.py:31
unsigned int fpu_fcom_c3(double a, double b)
Definition: op_semantics.c:747
def add_function(self, dllname, imp_ord_or_name, addr)
Definition: pe.py:432
split_dis
Definition: jitcore.py:65
def hash_block(self, block)
Definition: jitcore.py:277
Definition: llvmconvert.py:1
def __repr__(self)
Definition: pe.py:1135
vm
Definition: example_types.py:161
Definition: expression.py:1103
def gen_bad_block(self, asmblock)
Definition: llvmconvert.py:1627
def __bytes__(self)
Definition: pe.py:1207
MOD_INIT(Jitgcc)
Definition: Jitgcc.c:93
def __repr__(self)
Definition: pe.py:740
_MIASM_EXPORT int8_t smod8(int8_t a, int8_t b)
unsigned int imul_lo_op_08(char a, char b)
Definition: op_semantics.c:124
_MIASM_EXPORT uint64_t rot_left(uint64_t size, uint64_t a, uint64_t b)
Definition: op_semantics.c:172
_MIASM_EXPORT unsigned int fpu_fcom_c2(double a, double b)
Definition: op_semantics.c:741
def set_callback(self, key, *args)
Definition: jitload.py:84
def ret(self)
Definition: jitcore_cc_base.py:38
double fpu_fpatan(double a, double b)
Definition: op_semantics.c:717
fad2info
Definition: utils.py:34
def gen_jump2dst(self, attrib, instr_offsets, dst)
Definition: llvmconvert.py:1472
double fpu_frndint(double a)
Definition: op_semantics.c:584
def deleteCB(self, offset)
Definition: jitcore_cc_base.py:72
string FUNCNAME
Definition: jitcore.py:35
def gete(self, raw, off)
Definition: pe.py:1128
fad2cname
Definition: utils.py:32
impdesc
Definition: pe.py:578
def remove_breakpoints_by_address(self, address)
Definition: jitload.py:316
def new_branch_name(self)
Definition: llvmconvert.py:543
def printf(self, format, *args)
Definition: llvmconvert.py:665
def append(self, section)
Definition: pe.py:246
_MIASM_EXPORT double fpu_fchs(double a)
Definition: op_semantics.c:695
def gen_C_source(ir_arch, func_code)
Definition: jitcore_gcc.py:136
_MIASM_EXPORT uint32_t fpu_fadd32(uint32_t a, uint32_t b)
Definition: op_semantics.c:453
def get_funcrva(self, dllname, funcname)
Definition: pe.py:586
def load(self)
Definition: jitcore_llvm.py:56
def get_data(self)
Definition: pe.py:144
libs
Definition: jitcore_cc_base.py:69
breakpoints_handler
Definition: jitload.py:259
def vm_load_pe_libs(vm, libs_name, libs, lib_path_base, **kargs)
Definition: pe.py:314
def add_dlldesc(self, new_dll)
Definition: pe.py:516
def pop(ir, instr, a)
Definition: sem.py:1279
_MIASM_EXPORT int16_t sdiv16(int16_t a, int16_t b)
def set_rva(self, rva, size=None)
Definition: pe.py:416
_MIASM_EXPORT int imul_hi_op_16(short a, short b)
Definition: op_semantics.c:146
def add_breakpoint(self, addr, callback)
Definition: jitload.py:283
def eval_expr(self, expr)
Definition: jitload.py:530
#define _MIASM_IMPORT
Definition: op_semantics.h:11
Definition: expression.py:816
PyObject * llvm_exec_block(PyObject *self, PyObject *args)
Definition: Jitllvm.c:15
bool log_regs
Definition: llvmconvert.py:511
def check_memory_exception(self, offset, restricted_exception=False)
Definition: llvmconvert.py:1307
def add_op(self)
Definition: llvmconvert.py:155
local_vars_pointers
Definition: llvmconvert.py:745
target_machine
Definition: llvmconvert.py:92
def ret(arg1)
Definition: sem.py:1796
def set_breakpoint(self, addr, *args)
Definition: jitload.py:293
def get_c_str(self, addr, max_char=None)
Definition: jitload.py:462
def gete(self, raw, off)
Definition: pe.py:851
def size2mask(size)
Definition: utils.py:136
exec_cb
Definition: jitload.py:262
def add_block(self, block)
Definition: jitcore_gcc.py:44
lib_imp2ad
Definition: utils.py:30
ir_arch
Definition: jitcore.py:46
unsigned int umul16_hi(unsigned short a, unsigned short b)
Definition: op_semantics.c:165
def CreateEntryBlockAlloca(self, var_type, default_value=None)
Definition: llvmconvert.py:562
def arch_specific(self)
Definition: llvmconvert.py:258
def set_rva(self, rva, size=None)
Definition: pe.py:1428
def get_bytecode(self)
Definition: llvmconvert.py:1808
def get_import_address_elf(e)
Definition: elf.py:24
Definition: jitcore_python.py:1
uint32_t fpu_fadd32(uint32_t a, uint32_t b)
Definition: op_semantics.c:453
def __len__(self)
Definition: pe.py:243
Definition: asmblock.py:1
Definition: jitload.py:71
def __len__(self)
Definition: pe.py:1392
name
Definition: llvmconvert.py:538
def init_fc(self)
Definition: llvmconvert.py:1865
def set_cpu_vm(self, cpu, vm)
Definition: jitcore_python.py:33
def get_module(self)
Definition: llvmconvert.py:138
name2bbl
Definition: llvmconvert.py:752
llvm_context
Definition: llvmconvert.py:527
def set_trace_log(self, trace_instr=True, trace_regs=True, trace_new_blocks=False)
Definition: jitload.py:539
_MIASM_EXPORT uint8_t udiv8(uint8_t a, uint8_t b)
int32_t fp64_to_sint32(uint64_t a)
Definition: op_semantics.c:790
def get_callbacks(self, key)
Definition: jitload.py:88
uint64_t fpu_fsqrt64(uint64_t a)
Definition: op_semantics.c:654
expr_cache
Definition: llvmconvert.py:750
def gen_new_lib(self, target_pe, filter_import=lambda peobj, True ad, **kwargs)
Definition: pe.py:527
Definition: codegen.py:27
def sete(self, _)
Definition: pe.py:678
def add(arg1, arg2, arg3)
Definition: sem.py:975
_llvm_mod
Definition: llvmconvert.py:539
_MIASM_EXPORT double fpu_ftan(double a)
Definition: op_semantics.c:573
def get_ptr_by_expr(self, expr)
Definition: llvmconvert.py:576
c
Definition: basic_op.py:15
_MIASM_EXPORT int64_t smod64(int64_t a, int64_t b)
def gete(self, raw, off)
Definition: pe.py:644
mdis
Definition: jitcore.py:66
def blocks_to_memrange(self, blocks)
Definition: jitcore.py:195
def __init__(self, llvm_context, name="fc", new_module=True)
Definition: llvmconvert.py:525
name_s
Definition: pe.py:1537
stack_size
Definition: jitload.py:255
_MIASM_EXPORT uint64_t udiv64(uint64_t a, uint64_t b)
def add_callback(self, key, callback)
Definition: jitload.py:78
PyObject * gcc_exec_block(PyObject *self, PyObject *args)
Definition: Jitgcc.c:14
Definition: jitcore_gcc.py:1
void init_code_bloc_pool(vm_mngr_t *vm_mngr)
Definition: vm_mngr.c:743
_MIASM_EXPORT unsigned int mul_lo_op(unsigned int size, unsigned int a, unsigned int b)
Definition: op_semantics.c:89
uint64_t sint_to_fp_64(int64_t a)
Definition: op_semantics.c:756
uint32_t u32
Definition: op_semantics.c:442
Definition: expression_helper.py:1
def load(self)
Definition: jitcore_python.py:37
def __init__(self, *args, **kwargs)
Definition: pe.py:426
Definition: jitcore_cc_base.py:33
def get_optehdr_num(nthdr)
Definition: pe.py:69
resolvers
Definition: jitcore_cc_base.py:45
def dot(self)
Definition: llvmconvert.py:1794
builder
Definition: llvmconvert.py:534
_MIASM_EXPORT unsigned int imul_lo_op_32(int a, int b)
Definition: op_semantics.c:134
double fpu_fyl2x(double a, double b)
Definition: op_semantics.c:706
def j(arg1)
Definition: sem.py:156
def __eq__(self, to_cmp)
Definition: jitload.py:167
def __repr__(self)
Definition: pe.py:1218
_MIASM_EXPORT unsigned int fpu_fcom_c1(double a, double b)
Definition: op_semantics.c:736
log_newbloc
Definition: jitcore.py:59
def gen_irblock(self, irblock)
Definition: llvmconvert.py:1900
_MIASM_EXPORT unsigned int fpu_fcom_c3(double a, double b)
Definition: op_semantics.c:747
callbacks
Definition: jitload.py:76
fake_libs
Definition: utils.py:36
include_files
Definition: jitcore_cc_base.py:70
uint32_t sint_to_fp_32(int32_t a)
Definition: op_semantics.c:763
void add_memory_page(vm_mngr_t *vm_mngr, struct memory_page_node *mpn_a)
Definition: vm_mngr.c:836
Definition: llvmconvert.py:476
ircfg
Definition: jitcore.py:47
_MIASM_EXPORT unsigned int mul_hi_op(unsigned int size, unsigned int a, unsigned int b)
Definition: op_semantics.c:105
def __init__(self, offset)
Definition: jitcore_cc_base.py:35
def preload_pe(vm, e, runtime_lib, patch_vm_imp=True)
Definition: pe.py:93
def del_reloc(self, taboffset)
Definition: pe.py:1276
symbexec
Definition: jitload.py:224
_MIASM_EXPORT const uint8_t parity_table[256]
Definition: op_semantics.c:8
cpu
Definition: jitload.py:219
mod
Definition: llvmconvert.py:126
run
Definition: jitload.py:398
Definition: pe_init.py:184
def __init__(self, *args, **kwargs)
Definition: jitload.py:565
unsigned int imul_lo_op_16(short a, short b)
Definition: op_semantics.c:129
states
Definition: jitcore_cc_base.py:59
Definition: emulatedsymbexec.py:7
_MIASM_EXPORT uint64_t cntleadzeros(uint64_t size, uint64_t src)
Definition: op_semantics.c:256
_MIASM_EXPORT uint64_t fpu_fmul64(uint64_t a, uint64_t b)
Definition: op_semantics.c:528
tempdir
Definition: jitcore_cc_base.py:60
def __ne__(self, to_cmp)
Definition: jitload.py:172
_MIASM_EXPORT uint64_t umod64(uint64_t a, uint64_t b)
uint8_t is_local
Definition: JitCore.h:180
double fpu_fscale(double a, double b)
Definition: op_semantics.c:620
uint32_t fp64_to_fp32(uint64_t a)
Definition: op_semantics.c:800
def memory_write(self, func, addr, size, value)
Definition: llvmconvert.py:214
Definition: jitcore_cc_base.py:1
#define SDIV(sizeA)
Definition: op_semantics.h:74
uint16_t bcdadd_cf_16(uint16_t a, uint16_t b)
Definition: op_semantics.c:67
def __repr__(self)
Definition: pe.py:506
_MIASM_EXPORT double fpu_fsin(double a)
Definition: op_semantics.c:597
Definition: llvmconvert.py:1841
uint32_t fpround_towardszero_fp32(uint32_t a)
Definition: op_semantics.c:818
def possible_values(expr)
Definition: expression_helper.py:564
def guess_arch(pe)
Definition: pe.py:694
delaydesc
Definition: pe.py:1077
_MIASM_EXPORT unsigned int cnttrailzeros(uint64_t size, uint64_t src)
Definition: op_semantics.c:275
bool log_mn
Definition: llvmconvert.py:510
def get_funcrva(self, f_str)
Definition: pe.py:817
def gen_post_code(self, attributes, pc_value)
Definition: llvmconvert.py:1422
def get_funcrva(self, func)
Definition: pe.py:1085
exceptions_handler
Definition: jitload.py:260
tuple mask
Definition: modularintervals.py:32
Definition: elf_init.py:489
def set_rva(self, rva, size=None)
Definition: pe.py:702
def __call__(self, key, *args)
Definition: jitload.py:133
def vm_load_pe(vm, fdata, align_s=True, load_hdr=True, name="", winobjs=None, **kargs)
Definition: pe.py:172
exec_engine
Definition: llvmconvert.py:122
library_filenames
Definition: llvmconvert.py:226
log_regs
Definition: jitcore.py:58
_MIASM_EXPORT uint64_t fpu_fsqrt64(uint64_t a)
Definition: op_semantics.c:654
Definition: elf_init.py:300
def has_callbacks(self, key)
Definition: jitload.py:112
def preload_elf(vm, e, runtime_lib, patch_vm_imp=True, loc_db=None)
Definition: elf.py:35
jit
Definition: jitload.py:241
def __call__(self, *args)
Definition: llvmconvert.py:1820
Definition: jitcore_gcc.py:17
def run_until(self, addr, trace=False)
Definition: jitload.py:433
def __len__(self)
Definition: pe.py:402
Definition: __init__.py:1
def gen_irblock(self, instr_attrib, attributes, instr_offsets, irblock)
Definition: llvmconvert.py:1534
def __repr__(self)
Definition: pe.py:1003
Definition: callback.py:1
def build_content(self, raw)
Definition: pe.py:1611
def add_disassembly_splits(self, *args)
Definition: jitcore.py:86
def build_content(self, raw)
Definition: pe.py:681
Definition: expression.py:1030
#define CC_P
Definition: op_semantics.h:14
def __repr__(self)
Definition: pe.py:230
attrib
Definition: jitload.py:192
exec_wrapper
Definition: jitcore_llvm.py:43
def add_name(self, name, rva=0xdeadc0fe)
Definition: pe.py:787
ret_type
Definition: llvmconvert.py:533
def memory_write(self, func, addr, size, value)
Definition: llvmconvert.py:383
def check_cpu_exception(self, offset, restricted_exception=False)
Definition: llvmconvert.py:1360
double fpu_fchs(double a)
Definition: op_semantics.c:695
def add_export_lib(self, e, name)
Definition: pe.py:452
exit_bbl
Definition: llvmconvert.py:1875
double fpu_fsin(double a)
Definition: op_semantics.c:597
uint64_t cntleadzeros(uint64_t size, uint64_t src)
Definition: op_semantics.c:256
unsigned int umul16_lo(unsigned short a, unsigned short b)
Definition: op_semantics.c:160
def __init__(self, target_class, raw, off, cstr, num=None)
Definition: pe.py:290
exec_wrapper
Definition: jitcore_cc_base.py:68
tempdir
Definition: jitcore_llvm.py:47
def add_block(self, block)
Definition: jitcore_llvm.py:98
def get_str_ansi(self, addr, max_char=None)
Definition: jitload.py:483
int imul_hi_op_32(int a, int b)
Definition: op_semantics.c:153
_MIASM_EXPORT double fpu_fpatan(double a, double b)
Definition: op_semantics.c:717
Definition: llvmconvert.py:502
func
Definition: export_llvm.py:31
libs
Definition: jitload.py:521
stderr
Definition: dse_crackme.py:320
_MIASM_EXPORT uint64_t fpround_towardszero_fp64(uint64_t a)
Definition: op_semantics.c:826
unsigned int mul_lo_op(unsigned int size, unsigned int a, unsigned int b)
Definition: op_semantics.c:89
def set_vmcpu(self, lookup_table)
Definition: llvmconvert.py:333
int32_t fp32_to_sint32(uint32_t a)
Definition: op_semantics.c:770
def get_ptr_from_cache(self, file_name, func_name)
Definition: llvmconvert.py:464
except_flag
Definition: jitload.py:161
arch
Definition: jitcore_llvm.py:88
double dbl
Definition: op_semantics.c:449
def __str__(self)
Definition: pe.py:1213
def assign(self, src, dst)
Definition: llvmconvert.py:705
def remove_disassembly_splits(self, *args)
Definition: jitcore.py:91
def get_caller_name(caller_num=0)
Definition: utils.py:59
def get_export_name_addr_list(e)
Definition: pe.py:139
def gen_core(arch, attrib)
Definition: jitcore_cc_base.py:15
_MIASM_EXPORT uint16_t udiv16(uint16_t a, uint16_t b)
unsigned int fpu_fcom_c1(double a, double b)
Definition: op_semantics.c:736
def encode_hex(value)
Definition: utils.py:133
def new_module(self, name="mod")
Definition: llvmconvert.py:124
Definition: llvmconvert.py:77
_MIASM_EXPORT uint64_t fpu_fdiv64(uint64_t a, uint64_t b)
Definition: op_semantics.c:558
name2off
Definition: utils.py:27
blocks_mem_interval
Definition: jitcore.py:54
def named_arguments(func)
Definition: jitload.py:34
def gen_jump2dst(self, _attrib, _instr_offsets, dst)
Definition: llvmconvert.py:1877
def build_content(self, raw)
Definition: pe.py:1191
def gets(self, raw, off)
Definition: pe.py:1518
_MIASM_EXPORT uint32_t fp64_to_fp32(uint64_t a)
Definition: op_semantics.c:800
Definition: cstruct.py:49
def from_asmblock(self, asmblock)
Definition: llvmconvert.py:1697
def add_block(self, block)
Definition: jitcore.py:120
_MIASM_EXPORT int32_t fp64_to_sint32(uint64_t a)
Definition: op_semantics.c:790
_MIASM_EXPORT uint8_t umod8(uint8_t a, uint8_t b)
Definition: simplifications.py:1
def expr2cases(self, expr)
Definition: llvmconvert.py:1448
context
Definition: jitcore_llvm.py:82
args
Definition: shellcode.py:26
pass_manager
Definition: llvmconvert.py:116
ir_arch
Definition: jitload.py:220
_MIASM_EXPORT double fpu_frndint(double a)
Definition: op_semantics.c:584
def generic(cls, e)
Definition: llvmconvert.py:56
_MIASM_EXPORT uint64_t fpu_fadd64(uint64_t a, uint64_t b)
Definition: op_semantics.c:468
MOD_INIT(Jitllvm)
Definition: Jitllvm.c:89
def verify(self)
Definition: llvmconvert.py:1804
def add_get_exceptionflag(self)
Definition: llvmconvert.py:319
Definition: expression.py:742
Definition: elf_init.py:463
def memory_lookup(self, func, addr, size)
Definition: llvmconvert.py:338
uint32_t fpu_fsub32(uint32_t a, uint32_t b)
Definition: op_semantics.c:483
_MIASM_EXPORT uint64_t fpu_fabs64(uint64_t a)
Definition: op_semantics.c:667
def is_redirected_export(pe_obj, addr)
Definition: pe.py:111
def get_function_pointer(self)
Definition: llvmconvert.py:1830
f_address
Definition: pe.py:662
def __len__(self)
Definition: pe.py:325
def add_block_to_mem_interval(self, vm, block)
Definition: jitcore.py:112
_MIASM_EXPORT uint32_t fpu_fdiv32(uint32_t a, uint32_t b)
Definition: op_semantics.c:543
def updt_automod_code_range(self, vm, mem_range)
Definition: jitcore.py:258
offset_to_jitted_func
Definition: jitcore.py:51
def set_options(self, **kwargs)
Definition: jitcore.py:76
unsigned int imul_lo_op_32(int a, int b)
Definition: op_semantics.c:134
def exec_wrapper(self, loc_key, cpu, _offset_to_jitted_func, _stop_offsets, _max_exec_per_call)
Definition: jitcore_python.py:208
_MIASM_EXPORT unsigned int umul16_lo(unsigned short a, unsigned short b)
Definition: op_semantics.c:160
def add_lib_handler(self, libs, user_globals=None)
Definition: jitload.py:513
def __len__(self)
Definition: pe.py:928
uint64_t fp32_to_fp64(uint32_t a)
Definition: op_semantics.c:809
_MIASM_EXPORT uint32_t fpu_fmul32(uint32_t a, uint32_t b)
Definition: op_semantics.c:513
Definition: op_semantics.c:447
PyObject_HEAD VmMngr * pyvm
Definition: JitCore.h:188
Definition: asmblock.py:1161
def gete(self, raw, off)
Definition: pe.py:1143
def fabs(ir, instr, arg1, arg2)
Definition: sem.py:1921
def del_block_in_range(self, ad1, ad2)
Definition: jitcore.py:216
uint64_t fpround_towardszero_fp64(uint64_t a)
Definition: op_semantics.c:826
dictionary op_translate_with_suffix_size
Add the size as suffix.
Definition: llvmconvert.py:520
def get_basic_block_by_loc_key(self, loc_key)
Definition: llvmconvert.py:635
uint64_t address
Definition: JitCore.h:181
offset
Definition: jitcore_cc_base.py:36
def vm_fix_imports_pe_libs(lib_imgs, libs, lib_path_base, patch_vm_imp=True, **kargs)
Definition: pe.py:330
def sets(self, value)
Definition: pe.py:269
arch
Definition: jitload.py:191
_MIASM_EXPORT uint32_t fpu_fsqrt32(uint32_t a)
Definition: op_semantics.c:642
def __init__(self)
Definition: jitload.py:75
uint64_t fpu_fsub64(uint64_t a, uint64_t b)
Definition: op_semantics.c:498
loc_key_to_block
Definition: jitcore.py:53
unsigned int cnttrailzeros(uint64_t size, uint64_t src)
Definition: op_semantics.c:275
Definition: bin_stream.py:1
def get_resolver(self, offset)
Definition: jitcore_cc_base.py:47
def vm2pe(myjit, fname, libs=None, e_orig=None, min_addr=None, max_addr=None, min_section_offset=0x1000, img_base=None, added_funcs=None, **kwargs)
Definition: pe.py:336
def guess_arch(elf)
Definition: elf.py:336
_MIASM_EXPORT uint32_t umod32(uint32_t a, uint32_t b)
_MIASM_EXPORT uint64_t fpu_fprem64(uint64_t a, uint64_t b)
Definition: op_semantics.c:680
_MIASM_EXPORT int64_t sdiv64(int64_t a, int64_t b)
def add_shared_library(self, filename)
Definition: llvmconvert.py:142
def set_ret(self, var)
Definition: llvmconvert.py:627
jitter
Definition: example_types.py:160
_MIASM_EXPORT uint32_t fpround_towardszero_fp32(uint32_t a)
Definition: op_semantics.c:818
def load(self)
Definition: jitcore.py:95
def decode_hex(value)
Definition: utils.py:130
symbexec
Definition: jitcore_python.py:26
double fpu_fcos(double a)
Definition: op_semantics.c:608
def add_log_functions(self)
Definition: llvmconvert.py:325
def vm_load_pe_lib(vm, fname_in, libs, lib_path_base, **kargs)
Definition: pe.py:295
cgen_class
Definition: llvmconvert.py:268
def __init__(self)
Definition: jitcore_cc_base.py:44
Definition: bin_stream.py:286
def apply_reloc_x86(elf, vm, section, base_addr, loc_db)
Definition: elf.py:166
def call_callbacks(self, bitflag, *args)
Definition: jitload.py:142
def __bytes__(self)
Definition: new_cstruct.py:250
data
Definition: pe.py:1534
void init_memory_breakpoint(vm_mngr_t *vm_mngr)
Definition: vm_mngr.c:755
_MIASM_EXPORT double fpu_fscale(double a, double b)
Definition: op_semantics.c:620
def append(self, entry)
Definition: pe.py:328
def sete(self, entries)
Definition: pe.py:925
def append_basic_block(self, label, overwrite=True)
Definition: llvmconvert.py:548
def set_c_str(self, addr, value)
Definition: jitload.py:476
int jitted_block_max_size
Definition: jitcore.py:38
def init_exec_engine(self)
Definition: llvmconvert.py:118
int imul_hi_op_16(short a, short b)
Definition: op_semantics.c:146
f_nameordinals
Definition: pe.py:668
def updt_automod_code(self, vm)
Definition: jitcore.py:268
def optimise(self)
Definition: llvmconvert.py:1816
def handle_function(self, f_addr)
Definition: jitload.py:509
_MIASM_EXPORT int64_t fp64_to_sint64(uint64_t a)
Definition: op_semantics.c:780
def enable_cache(self)
Definition: llvmconvert.py:447
_MIASM_EXPORT double fpu_fyl2x(double a, double b)
Definition: op_semantics.c:706
def call(ir, instr, a)
Definition: sem.py:284
unsigned int mul_hi_op(unsigned int size, unsigned int a, unsigned int b)
Definition: op_semantics.c:105
def lib_get_add_base(self, name)
Definition: utils.py:38
def set_rva(self, rva, size=None)
Definition: pe.py:1618
pc
Definition: jitload.py:344
def run_at(self, cpu, offset, stop_offsets)
Definition: jitcore.py:162
def sets(self, value)
Definition: pe.py:1522
def add_block(self, asmblock)
Definition: jitcore_python.py:57
def set_block_min_max(self, cur_block)
Definition: jitcore.py:99
jitted_block_delete_cb
Definition: jitcore.py:37
def canonize_label_name(self, label)
Definition: llvmconvert.py:95
dictionary op_translate
Basics.
Definition: llvmconvert.py:515
def fill_loc_db_with_symbols(elf, loc_db, base_addr=0)
Definition: elf.py:60
def memoryBreakpoint(cls)
Definition: jitload.py:164
uint64_t u64
Definition: op_semantics.c:448
const uint8_t parity_table[256]
Definition: op_semantics.c:8
logging_func
Definition: llvmconvert.py:262
user_globals
Definition: jitload.py:525
_MIASM_EXPORT uint64_t rot_right(uint64_t size, uint64_t a, uint64_t b)
Definition: op_semantics.c:210
def __bytes__(self)
Definition: pe.py:311
Definition: interval.py:35
def add_reloc(self, rels, rtype=3, patchrel=True)
Definition: pe.py:1235
void init_memory_page_pool(vm_mngr_t *vm_mngr)
Definition: vm_mngr.c:736
Definition: vm_mngr.h:110
Definition: elf_init.py:308
def load_libraries(self)
Definition: llvmconvert.py:233
dictionary known_fc
Definition: llvmconvert.py:81
def load(self)
Definition: jitcore_cc_base.py:75
max_exec_per_call
Definition: trace.py:53
#define _MIASM_EXPORT
Definition: op_semantics.h:10
Definition: jitcore_llvm.py:18
def sete(self, entries)
Definition: pe.py:399
_MIASM_EXPORT uint32_t fpu_fsub32(uint32_t a, uint32_t b)
Definition: op_semantics.c:483
def handle_lib(jitter)
Definition: jitload.py:490
def __init__(self, ir_arch, bin_stream)
Definition: jitcore_python.py:19
Definition: llvmconvert.py:36
def update_cache(self, name, value)
Definition: llvmconvert.py:621
unsigned int fpu_fcom_c0(double a, double b)
Definition: op_semantics.c:728
def set_cache_filename(self, func, fname_out)
Definition: llvmconvert.py:459
def add_fc(self, fc, readonly=False)
Definition: llvmconvert.py:146
uint64_t fpu_fmul64(uint64_t a, uint64_t b)
Definition: op_semantics.c:528
fc
Definition: llvmconvert.py:755
uint32_t fpu_fmul32(uint32_t a, uint32_t b)
Definition: op_semantics.c:513
def get_str_unic(self, addr, max_char=None)
Definition: jitload.py:486
created_redirected_imports
Definition: pe.py:429
void dump_float(void)
Definition: op_semantics.c:427
_MIASM_EXPORT int imul_hi_op_32(int a, int b)
Definition: op_semantics.c:153
def __init__(self, except_flag)
Definition: jitload.py:160
mod
Definition: llvmconvert.py:530
unsigned int my_imul08(unsigned int a, unsigned int b)
Definition: op_semantics.c:286
_MIASM_EXPORT uint16_t bcdadd_16(uint16_t a, uint16_t b)
Definition: op_semantics.c:43
def get_dlldesc(self)
Definition: pe.py:492
dictionary int_cache
Definition: llvmconvert.py:40
def remove_breakpoints_by_callback(self, callback)
Definition: jitload.py:308
expdesc
Definition: pe.py:759
double fpu_f2xm1(double a)
Definition: op_semantics.c:631
def get_funcvirt(self, addr)
Definition: pe.py:828
def gen_finalize(self, asmblock, codegen)
Definition: llvmconvert.py:1647
def get_exception(self)
Definition: jitload.py:458
_MIASM_EXPORT int32_t smod32(int32_t a, int32_t b)
def gete(self, raw, off)
Definition: pe.py:339
offsettosubdir
Definition: pe.py:1556
def __init__(self, name="mod")
Definition: llvmconvert.py:83
Definition: elf_init.py:304
ircfg
Definition: jitload.py:222
def gen_pre_code(self, instr_attrib)
Definition: llvmconvert.py:1412
dictionary op_translate_with_size
Add the size as first argument.
Definition: llvmconvert.py:518
Definition: interval.py:1
vm
Definition: jitload.py:218
a
Definition: basic_op.py:9
Definition: jitload.py:176
struct vm_cpu * cpu
Definition: JitCore.h:190
#define UMOD(sizeA)
Definition: op_semantics.h:61
def __init__(self, ir_arch, bin_stream)
Definition: jitcore_cc_base.py:54
Definition: JitCore.h:179
libbase2lastad
Definition: utils.py:28
def pointer(cls, addr)
Definition: llvmconvert.py:51
def code_sentinelle(jitter)
Definition: jitload.py:23
_MIASM_EXPORT unsigned int x86_cpuid(unsigned int a, unsigned int reg_num)
Definition: op_semantics.c:299
Definition: expression.py:879
def cache_notify(module, buffer)
Definition: llvmconvert.py:424
def force_str(value)
Definition: utils.py:100
def memory_lookup(self, func, addr, size)
Definition: llvmconvert.py:210
size
Definition: shellcode.py:32
b
Definition: basic_op.py:10
def IntType(cls, size=32)
Definition: llvmconvert.py:43
Definition: JitCore.h:186
Definition: strpatchwork.py:25
_MIASM_EXPORT uint64_t fpu_fsub64(uint64_t a, uint64_t b)
Definition: op_semantics.c:498
def __init__(self, ir_arch, bin_stream)
Definition: jitcore.py:40
address
Definition: minidump_to_pe.py:37
uint64_t fpu_fdiv64(uint64_t a, uint64_t b)
Definition: op_semantics.c:558
def __init__(self, library_filenames, ir_arch, name="mod")
Definition: llvmconvert.py:224
Definition: JitCore_aarch64.h:2
log_mn
Definition: jitcore.py:57
def __getitem__(self, item)
Definition: pe.py:322
_MIASM_EXPORT unsigned int umul16_hi(unsigned short a, unsigned short b)
Definition: op_semantics.c:165
stack_base
Definition: jitload.py:256
resolver
Definition: jitcore_cc_base.py:57
def vm_load_elf(vm, fdata, name="", base_addr=0, loc_db=None, apply_reloc=False, **kargs)
Definition: elf.py:257
Definition: expression.py:1432
def deleteCB(self, offset)
Definition: jitcore_gcc.py:24
f_names
Definition: pe.py:665
def make_bytearray(self, buf)
Definition: llvmconvert.py:655
Definition: __init__.py:1
def get_execengine(self)
Definition: llvmconvert.py:130
def from_ircfg(self, ircfg, append_ret=True)
Definition: llvmconvert.py:1908
def memory_write(self, func, addr, size, value)
Definition: llvmconvert.py:491
def add_section(self, name="default", data=b"", **args)
Definition: pe.py:160
def runiter_once(self, pc)
Definition: jitload.py:340
double fpu_ftan(double a)
Definition: op_semantics.c:573
def arch_specific(self)
Definition: jitcore_python.py:41
def continue_run(self, step=False, trace=False)
Definition: jitload.py:400
def call_callbacks(self, key, *args)
Definition: jitload.py:121
entry_bbl
Definition: llvmconvert.py:535