Rizin
unix-like reverse engineering framework and cli tools
bin_ne.c File Reference
#include <rz_bin.h>
#include "../i/private.h"
#include "../format/ne/ne.h"

Go to the source code of this file.

Functions

static bool check_buffer (RzBuffer *b)
 
static bool load_buffer (RzBinFile *bf, RzBinObject *obj, RzBuffer *buf, Sdb *sdb)
 
static void destroy (RzBinFile *bf)
 
static void header (RzBinFile *bf)
 
RzBinInfoinfo (RzBinFile *bf)
 
RzListentries (RzBinFile *bf)
 
RzListsymbols (RzBinFile *bf)
 
RzListimports (RzBinFile *bf)
 
RzListsections (RzBinFile *bf)
 
RzListrelocs (RzBinFile *bf)
 

Variables

RzBinPlugin rz_bin_plugin_ne
 
RZ_API RzLibStruct rizin_plugin
 

Function Documentation

◆ check_buffer()

static bool check_buffer ( RzBuffer b)
static

Definition at line 11 of file bin_ne.c.

11  {
13  if (length <= 0x3d) {
14  return false;
15  }
16 
17  ut16 idx;
18  if (!rz_buf_read_le16_at(b, 0x3c, &idx)) {
19  return false;
20  }
21 
22  if ((ut64)idx + 26 < length) {
23  ut8 buf[2];
24  rz_buf_read_at(b, 0, buf, sizeof(buf));
25  if (!memcmp(buf, "MZ", 2)) {
26  rz_buf_read_at(b, idx, buf, sizeof(buf));
27  if (!memcmp(buf, "NE", 2)) {
28  return true;
29  }
30  }
31  }
32  return false;
33 }
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len static semflg const void static shmflg const struct timespec struct timespec static rem const char static group const void length
Definition: sflib.h:133
uint16_t ut16
voidpf void * buf
Definition: ioapi.h:138
uint8_t ut8
Definition: lh5801.h:11
int idx
Definition: setup.py:197
#define rz_buf_read_le16_at(b, addr, result)
Definition: rz_buf.h:270
RZ_API st64 rz_buf_read_at(RZ_NONNULL RzBuffer *b, ut64 addr, RZ_NONNULL RZ_OUT ut8 *buf, ut64 len)
Read len bytes of the buffer at the specified address.
Definition: buf.c:1136
RZ_API ut64 rz_buf_size(RZ_NONNULL RzBuffer *b)
Return the size of the buffer.
Definition: buf.c:1225
#define b(i)
Definition: sha256.c:42
ut64(WINAPI *w32_GetEnabledXStateFeatures)()

References b, setup::idx, length, rz_buf_read_at(), rz_buf_read_le16_at, rz_buf_size(), and ut64().

◆ destroy()

static void destroy ( RzBinFile bf)
static

Definition at line 45 of file bin_ne.c.

45  {
46  rz_bin_ne_free(bf->o->bin_obj);
47 }
void rz_bin_ne_free(rz_bin_ne_obj_t *bin)
Definition: ne.c:659
RzBinObject * o
Definition: rz_bin.h:305
void * bin_obj
Definition: rz_bin.h:293

References rz_bin_object_t::bin_obj, rz_bin_file_t::o, and rz_bin_ne_free().

◆ entries()

◆ header()

static void header ( RzBinFile bf)
static

Definition at line 49 of file bin_ne.c.

49  {
50  struct rz_bin_t *rbin = bf->rbin;
51  rz_bin_ne_obj_t *ne = bf->o->bin_obj;
52  rbin->cb_printf("Signature: NE\n");
53  rbin->cb_printf("MajLinkerVersion: %d\n", ne->ne_header->MajLinkerVersion);
54  rbin->cb_printf("MinLinkerVersion: %d\n", ne->ne_header->MinLinkerVersion);
55  rbin->cb_printf("EntryTableOffset: 0x%04x\n", ne->ne_header->EntryTableOffset);
56  rbin->cb_printf("EntryTableLength: %d\n", ne->ne_header->EntryTableLength);
57  rbin->cb_printf("FileLoadCRC: %08x\n", ne->ne_header->FileLoadCRC);
58  rbin->cb_printf("ProgFlags: %d\n", ne->ne_header->ProgFlags);
59  rbin->cb_printf("ApplFlags: %d\n", ne->ne_header->ApplFlags);
60  rbin->cb_printf("AutoDataSegIndex: %d\n", ne->ne_header->AutoDataSegIndex);
61  rbin->cb_printf("InitHeapSize: %d\n", ne->ne_header->InitHeapSize);
62  rbin->cb_printf("InitStackSize: %d\n", ne->ne_header->InitStackSize);
63  rbin->cb_printf("EntryPointCSIndex: %d\n", ne->ne_header->csEntryPoint);
64  rbin->cb_printf("EntryPointIPOff: 0x%04x\n", ne->ne_header->ipEntryPoint);
65  rbin->cb_printf("InitStack: %d\n", ne->ne_header->InitStack);
66  rbin->cb_printf("SegCount: %d\n", ne->ne_header->SegCount);
67  rbin->cb_printf("ModuleRefsCount: %d\n", ne->ne_header->ModRefs);
68  rbin->cb_printf("NonResNamesTblSiz: 0x%x\n", ne->ne_header->NoResNamesTabSiz);
69  rbin->cb_printf("SegTableOffset: 0x%x\n", ne->ne_header->SegTableOffset);
70  rbin->cb_printf("ResourceTblOff: 0x%x\n", ne->ne_header->ResTableOffset);
71  rbin->cb_printf("ResidentNameTblOff: 0x%x\n", ne->ne_header->ResidNamTable);
72  rbin->cb_printf("ModuleRefTblOff: 0x%x\n", ne->ne_header->ModRefTable);
73  rbin->cb_printf("ImportNameTblOff: 0x%x\n", ne->ne_header->ImportNameTable);
74  rbin->cb_printf("OffStartNonResTab: %d\n", ne->ne_header->OffStartNonResTab);
75  rbin->cb_printf("MovEntryCount: %d\n", ne->ne_header->MovEntryCount);
76  rbin->cb_printf("FileAlnSzShftCnt: %d\n", ne->ne_header->FileAlnSzShftCnt);
77  rbin->cb_printf("nResTabEntries: %d\n", ne->ne_header->nResTabEntries);
78  rbin->cb_printf("OS: %s\n", ne->os);
79  rbin->cb_printf("OS2EXEFlags: %x\n", ne->ne_header->OS2EXEFlags);
80  rbin->cb_printf("retThunkOffset: %d\n", ne->ne_header->retThunkOffset);
81  rbin->cb_printf("segRefThunksOff: %d\n", ne->ne_header->segrefthunksoff);
82  rbin->cb_printf("mincodeswap: %d\n", ne->ne_header->mincodeswap);
83  rbin->cb_printf("winver: %d.%d\n", ne->ne_header->expctwinver[1], ne->ne_header->expctwinver[0]);
84 }
struct rz_bin_t * rbin
Definition: rz_bin.h:316
PrintfCallback cb_printf
Definition: rz_bin.h:345

References rz_bin_object_t::bin_obj, rz_bin_t::cb_printf, ne, rz_bin_file_t::o, and rz_bin_file_t::rbin.

◆ imports()

◆ info()

RzBinInfo* info ( RzBinFile bf)

Definition at line 86 of file bin_ne.c.

86  {
87  rz_bin_ne_obj_t *ne = bf->o->bin_obj;
89  if (i) {
90  i->bits = 16;
91  i->arch = strdup("x86");
92  i->os = strdup(ne->os);
93  i->claimed_checksum = rz_str_newf("%08x", ne->ne_header->FileLoadCRC);
94  }
95  return i;
96 }
lzma_index ** i
Definition: index.h:629
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 char * rz_str_newf(const char *fmt,...) RZ_PRINTF_CHECK(1
#define RZ_NEW0(x)
Definition: rz_types.h:284

References rz_bin_object_t::bin_obj, i, ne, rz_bin_file_t::o, RZ_NEW0, rz_str_newf(), and strdup().

Referenced by __is_windows_ten(), _extract_pid_info(), _luac_build_info(), _print_insn_mips(), aarch64_ext_addr_offset(), aarch64_ext_addr_regoff(), aarch64_ext_addr_simm(), aarch64_ext_addr_simm10(), aarch64_ext_addr_simple(), aarch64_ext_addr_uimm12(), aarch64_ext_advsimd_imm_modified(), aarch64_ext_advsimd_imm_shift(), aarch64_ext_aimm(), aarch64_ext_barrier(), aarch64_ext_cond(), aarch64_ext_fbits(), aarch64_ext_fpimm(), aarch64_ext_ft(), aarch64_ext_hint(), aarch64_ext_imm(), aarch64_ext_imm_half(), aarch64_ext_imm_rotate1(), aarch64_ext_imm_rotate2(), aarch64_ext_inv_limm(), aarch64_ext_ldst_elemlist(), aarch64_ext_ldst_reglist(), aarch64_ext_ldst_reglist_r(), aarch64_ext_limm(), aarch64_ext_prfop(), aarch64_ext_pstatefield(), aarch64_ext_reg_extended(), aarch64_ext_reg_shifted(), aarch64_ext_reglane(), aarch64_ext_reglist(), aarch64_ext_regno(), aarch64_ext_regno_pair(), aarch64_ext_regrt_sysins(), aarch64_ext_shll_imm(), aarch64_ext_simd_addr_post(), aarch64_ext_sve_addr_reg_imm(), aarch64_ext_sve_addr_reg_mul_vl(), aarch64_ext_sve_addr_ri_s4(), aarch64_ext_sve_addr_ri_s4xvl(), aarch64_ext_sve_addr_ri_s6xvl(), aarch64_ext_sve_addr_ri_s9xvl(), aarch64_ext_sve_addr_ri_u6(), aarch64_ext_sve_addr_rr_lsl(), aarch64_ext_sve_addr_rz_xtw(), aarch64_ext_sve_addr_zi_u5(), aarch64_ext_sve_addr_zz(), aarch64_ext_sve_addr_zz_lsl(), aarch64_ext_sve_addr_zz_sxtw(), aarch64_ext_sve_addr_zz_uxtw(), aarch64_ext_sve_aimm(), aarch64_ext_sve_asimm(), aarch64_ext_sve_float_half_one(), aarch64_ext_sve_float_half_two(), aarch64_ext_sve_float_zero_one(), aarch64_ext_sve_index(), aarch64_ext_sve_limm_mov(), aarch64_ext_sve_quad_index(), aarch64_ext_sve_reglist(), aarch64_ext_sve_scale(), aarch64_ext_sve_shlimm(), aarch64_ext_sve_shrimm(), aarch64_ext_sysins_op(), aarch64_ext_sysreg(), aarch64_extract_operand(), add_dt_dynamic_entry(), add_reg_to_rw_list(), ARC_CGEN_EXTRACT_FN(), arcAnalyzeInstr(), ARCTangent_decodeInstr(), bin_dwarf(), bin_versioninfo(), build_3bit_d(), build_3bit_ea(), build_absolute_jump_with_immediate(), build_bcc(), build_bitfield_ins(), build_cas2(), build_chk2_cmp2(), build_cpush_cinv(), build_d(), build_d_d_ea(), build_dbcc(), build_dbxx(), build_ea(), build_ea_a(), build_ea_ea(), build_er_1(), build_er_gen_1(), build_illegal(), build_imm(), build_imm_ea(), build_imm_special_reg(), build_init_op(), build_invalid(), build_link(), build_mm(), build_move16(), build_movem_er(), build_movem_re(), build_movep_er(), build_movep_re(), build_moves(), build_pi_pi(), build_r(), build_re_1(), build_re_gen_1(), build_regs_read_write_counts(), build_relative_branch(), build_rr(), build_trap(), clusterCommand(), core_bin_file_print(), core_file_do_load_for_debug(), core_file_do_load_for_io_plugin(), create_agraph_from_graph(), cris_parse_disassembler_options(), d68000_1010(), d68000_1111(), d68000_abcd_mm(), d68000_abcd_rr(), d68000_add_er_16(), d68000_add_er_32(), d68000_add_er_8(), d68000_add_re_16(), d68000_add_re_32(), d68000_add_re_8(), d68000_adda_16(), d68000_adda_32(), d68000_addi_16(), d68000_addi_32(), d68000_addi_8(), d68000_addq_16(), d68000_addq_32(), d68000_addq_8(), d68000_addx_mm_16(), d68000_addx_mm_32(), d68000_addx_mm_8(), d68000_addx_rr_16(), d68000_addx_rr_32(), d68000_addx_rr_8(), d68000_and_er_16(), d68000_and_er_32(), d68000_and_er_8(), d68000_and_re_16(), d68000_and_re_32(), d68000_and_re_8(), d68000_andi_16(), d68000_andi_32(), d68000_andi_8(), d68000_andi_to_ccr(), d68000_andi_to_sr(), d68000_asl_ea(), d68000_asl_r_16(), d68000_asl_r_32(), d68000_asl_r_8(), d68000_asl_s_16(), d68000_asl_s_32(), d68000_asl_s_8(), d68000_asr_ea(), d68000_asr_r_16(), d68000_asr_r_32(), d68000_asr_r_8(), d68000_asr_s_16(), d68000_asr_s_32(), d68000_asr_s_8(), d68000_bcc_16(), d68000_bcc_8(), d68000_bchg_r(), d68000_bchg_s(), d68000_bclr_r(), d68000_bclr_s(), d68000_bra_16(), d68000_bra_8(), d68000_bset_r(), d68000_bset_s(), d68000_bsr_16(), d68000_bsr_8(), d68000_btst_r(), d68000_btst_s(), d68000_chk_16(), d68000_clr_16(), d68000_clr_32(), d68000_clr_8(), d68000_cmp_16(), d68000_cmp_32(), d68000_cmp_8(), d68000_cmpa_16(), d68000_cmpa_32(), d68000_cmpi_16(), d68000_cmpi_32(), d68000_cmpi_8(), d68000_cmpm_16(), d68000_cmpm_32(), d68000_cmpm_8(), d68000_dbcc(), d68000_dbra(), d68000_divs(), d68000_divu(), d68000_eor_16(), d68000_eor_32(), d68000_eor_8(), d68000_eori_16(), d68000_eori_32(), d68000_eori_8(), d68000_eori_to_ccr(), d68000_eori_to_sr(), d68000_exg_aa(), d68000_exg_da(), d68000_exg_dd(), d68000_ext_16(), d68000_ext_32(), d68000_illegal(), d68000_invalid(), d68000_jmp(), d68000_jsr(), d68000_lea(), d68000_link_16(), d68000_lsl_ea(), d68000_lsl_r_16(), d68000_lsl_r_32(), d68000_lsl_r_8(), d68000_lsl_s_16(), d68000_lsl_s_32(), d68000_lsl_s_8(), d68000_lsr_ea(), d68000_lsr_r_16(), d68000_lsr_r_32(), d68000_lsr_r_8(), d68000_lsr_s_16(), d68000_lsr_s_32(), d68000_lsr_s_8(), d68000_move_16(), d68000_move_32(), d68000_move_8(), d68000_move_fr_sr(), d68000_move_fr_usp(), d68000_move_to_ccr(), d68000_move_to_sr(), d68000_move_to_usp(), d68000_movea_16(), d68000_movea_32(), d68000_movem_er_16(), d68000_movem_er_32(), d68000_movem_pd_16(), d68000_movem_pd_32(), d68000_movem_re_16(), d68000_movem_re_32(), d68000_movep_er_16(), d68000_movep_er_32(), d68000_movep_re_16(), d68000_movep_re_32(), d68000_moveq(), d68000_muls(), d68000_mulu(), d68000_nbcd(), d68000_neg_16(), d68000_neg_32(), d68000_neg_8(), d68000_negx_16(), d68000_negx_32(), d68000_negx_8(), d68000_nop(), d68000_not_16(), d68000_not_32(), d68000_not_8(), d68000_or_er_16(), d68000_or_er_32(), d68000_or_er_8(), d68000_or_re_16(), d68000_or_re_32(), d68000_or_re_8(), d68000_ori_16(), d68000_ori_32(), d68000_ori_8(), d68000_ori_to_ccr(), d68000_ori_to_sr(), d68000_pea(), d68000_reset(), d68000_rol_ea(), d68000_rol_r_16(), d68000_rol_r_32(), d68000_rol_r_8(), d68000_rol_s_16(), d68000_rol_s_32(), d68000_rol_s_8(), d68000_ror_ea(), d68000_ror_r_16(), d68000_ror_r_32(), d68000_ror_r_8(), d68000_ror_s_16(), d68000_ror_s_32(), d68000_ror_s_8(), d68000_roxl_ea(), d68000_roxl_r_16(), d68000_roxl_r_32(), d68000_roxl_r_8(), d68000_roxl_s_16(), d68000_roxl_s_32(), d68000_roxl_s_8(), d68000_roxr_ea(), d68000_roxr_r_16(), d68000_roxr_r_32(), d68000_roxr_r_8(), d68000_roxr_s_16(), d68000_roxr_s_32(), d68000_roxr_s_8(), d68000_rte(), d68000_rtr(), d68000_rts(), d68000_sbcd_mm(), d68000_sbcd_rr(), d68000_scc(), d68000_stop(), d68000_sub_er_16(), d68000_sub_er_32(), d68000_sub_er_8(), d68000_sub_re_16(), d68000_sub_re_32(), d68000_sub_re_8(), d68000_suba_16(), d68000_suba_32(), d68000_subi_16(), d68000_subi_32(), d68000_subi_8(), d68000_subq_16(), d68000_subq_32(), d68000_subq_8(), d68000_subx_mm_16(), d68000_subx_mm_32(), d68000_subx_mm_8(), d68000_subx_rr_16(), d68000_subx_rr_32(), d68000_subx_rr_8(), d68000_swap(), d68000_tas(), d68000_trap(), d68000_trapv(), d68000_tst_16(), d68000_tst_32(), d68000_tst_8(), d68000_unlk(), d68010_bkpt(), d68010_move_fr_ccr(), d68010_movec(), d68010_moves_16(), d68010_moves_32(), d68010_moves_8(), d68010_rtd(), d68020_bcc_32(), d68020_bfchg(), d68020_bfclr(), d68020_bfexts(), d68020_bfextu(), d68020_bfffo(), d68020_bfins(), d68020_bfset(), d68020_bftst(), d68020_bra_32(), d68020_bsr_32(), d68020_callm(), d68020_cas2_16(), d68020_cas2_32(), d68020_cas_16(), d68020_cas_32(), d68020_cas_8(), d68020_chk2_cmp2_16(), d68020_chk2_cmp2_32(), d68020_chk2_cmp2_8(), d68020_chk_32(), d68020_cmpi_pcdi_16(), d68020_cmpi_pcdi_32(), d68020_cmpi_pcdi_8(), d68020_cmpi_pcix_16(), d68020_cmpi_pcix_32(), d68020_cmpi_pcix_8(), d68020_cpbcc_16(), d68020_cpbcc_32(), d68020_cpdbcc(), d68020_cpgen(), d68020_cprestore(), d68020_cpsave(), d68020_cpscc(), d68020_cptrapcc_0(), d68020_cptrapcc_16(), d68020_cptrapcc_32(), d68020_divl(), d68020_extb_32(), d68020_link_32(), d68020_mull(), d68020_pack_mm(), d68020_pack_rr(), d68020_rtm(), d68020_trapcc_0(), d68020_trapcc_16(), d68020_trapcc_32(), d68020_tst_a_16(), d68020_tst_a_32(), d68020_tst_i_16(), d68020_tst_i_32(), d68020_tst_i_8(), d68020_tst_pcdi_16(), d68020_tst_pcdi_32(), d68020_tst_pcdi_8(), d68020_tst_pcix_16(), d68020_tst_pcix_32(), d68020_tst_pcix_8(), d68020_unpk_mm(), d68020_unpk_rr(), d68040_cinv(), d68040_cpush(), d68040_move16_ai_al(), d68040_move16_al_ai(), d68040_move16_al_pi(), d68040_move16_pi_al(), d68040_move16_pi_pi(), decode_auipc_set_addr(), decode_disp_set_addr(), decode_from_table(), decode_ldr_set_addr(), decode_lui_set_addr(), decode_pcp_insn(), decode_ptr_set_addr(), decode_sve_aimm(), decode_tricore_insn(), decode_val_add_addr(), decode_val_set_addr(), decode_val_set_size(), decompress_file_allocDst(), dsmOneArcInst(), expand_info(), extract_slice(), fetch_data(), fill_pid_info(), fmove_fpcr(), fmovem(), fput_const(), fput_creg(), fput_fp_reg(), fput_fp_reg_r(), fput_reg(), fs__scandir(), fs__unlink(), FUZZ_dataProducer_frameInfo(), FUZZ_randomFrameInfo(), get_block_size(), get_dt_info(), get_ea_mode_op(), get_filename(), get_frame_base(), get_full_file_path(), get_kernel_base(), get_main_arena_with_symbol(), get_sym_code_type(), get_with_index_address_mode(), GetHeapBlocks(), GetHeapGlobalsOffset(), go_is_sign_match(), golang_recover_string_arm32(), golang_recover_string_arm64(), golang_recover_string_mips32(), golang_recover_string_mips64(), golang_recover_string_ppc64(), golang_recover_string_riscv64(), golang_recover_string_x64(), golang_recover_string_x86(), handle_arm_hint(), hash_append(), index_cat_helper(), init_symbols_info_aux(), initializeEsil(), instruction_is_valid(), linux_add_new_thread(), linux_pid_list(), linux_thread_list(), m68k_disassemble(), M68K_getInstruction(), M68K_printInst(), m68k_read_disassembler_16(), m68k_read_disassembler_32(), m68k_read_disassembler_64(), m68k_read_safe_16(), m68k_read_safe_32(), m68k_read_safe_64(), m68k_setup_internals(), mach0_info_free(), main(), meta_for_reloc(), nios2_disassemble(), nios2_print_insn_arg(), parse_comp_unit(), parse_die(), parse_info_raw(), parse_line_raw(), parse_opcodes(), parse_relocation_info(), peek_imm_16(), peek_imm_32(), peek_imm_64(), peek_imm_8(), print_aarch64_insn(), print_arch(), print_comment(), print_decoded_insn(), print_insn_aarch64(), print_insn_aarch64_word(), print_insn_arg(), print_insn_args(), print_insn_big_mips(), print_insn_big_nios2(), print_insn_cris_generic(), print_insn_cris_with_register_prefix(), print_insn_cris_without_register_prefix(), print_insn_crisv10_v32_with_register_prefix(), print_insn_crisv10_v32_without_register_prefix(), print_insn_crisv32_with_register_prefix(), print_insn_crisv32_without_register_prefix(), print_insn_data(), print_insn_hppa(), print_insn_lanai(), print_insn_little_mips(), print_insn_little_nios2(), print_insn_mips(), print_insn_mips16(), print_insn_mode(), print_insn_nios2(), print_insn_sparc(), print_insn_tricore(), print_insn_vax(), print_insn_xtensa(), print_mips16_insn_arg(), print_mnemonic_name(), print_operands(), print_with_operands(), print_xtensa_operand(), read_imm_16(), read_imm_32(), read_imm_64(), read_imm_8(), read_slot16(), read_slot32(), read_unwind_info(), rebase_info_populate(), rtti_itanium_type_info_free(), run_old_command(), rz_analysis_dwarf_process_info(), rz_analysis_function_list_ascii_handler(), rz_bin_dwarf_line_header_get_full_file_path(), rz_bin_dwarf_line_op_run(), rz_bin_dwarf_parse_info(), rz_bin_dwarf_parse_line(), rz_bin_elf_get_dt_info(), rz_bin_file_set_hashes(), rz_bin_language_detect(), rz_bin_mdmp_init_directory_entry(), rz_bin_object_find_by_arch_bits(), rz_bin_pdb_download(), rz_cmd_info_hashes_handler(), rz_cmd_info_section_bars_handler(), rz_cons_get_cur_line(), rz_core_analysis_bbs_asciiart(), rz_core_bin_apply_all_info(), rz_core_bin_apply_config(), rz_core_bin_apply_dwarf(), rz_core_bin_apply_imports(), rz_core_bin_apply_info(), rz_core_bin_apply_resources(), rz_core_bin_apply_symbols(), rz_core_bin_archs_print(), rz_core_bin_info_print(), rz_core_bin_load(), rz_core_bin_pdb_get_filename(), rz_core_file_info_print(), rz_core_flirt_dump_file(), rz_core_io_map_info_free(), rz_core_io_map_info_new(), rz_coresym_cache_element_new(), rz_debug_dmp_init(), rz_debug_traces_info(), rz_dyld_locsym_new(), rz_graph_free_node_info(), rz_listinfo_free(), rz_listinfo_new(), rz_open_binary_list_ascii_handler(), rz_open_maps_list_ascii_handler(), rz_serialize_result_info_free(), rz_sign_flirt_info_fini(), rz_sign_flirt_parse_compressed_pattern_from_buffer(), rz_sign_flirt_parse_header_compressed_pattern_from_buffer(), rz_sign_flirt_parse_string_pattern_from_buffer(), rz_table_visual_list(), rz_th_physical_core_number(), sep64_xtr_ctx_get_slice(), set_default_mips_dis_options(), set_insn_group(), setup_workers(), sigdb_signature_resolve_details(), store_line_sample(), task_suspend_count(), trycatch(), unwind_function(), update_am_reg_list(), update_bits_range(), update_op_reg_list(), update_reg_list_regbits(), uv__fd_hash_add(), uv__fd_hash_get(), uv__fd_hash_remove(), uv__init_global_job_handle(), uv_cpu_info(), uv_get_free_memory(), uv_get_total_memory(), uv_loadavg(), uv_resident_set_memory(), uv_spawn(), uv_tty_clear(), uv_tty_get_winsize(), uv_tty_make_real_coord(), uv_tty_move_caret(), uv_tty_restore_state(), uv_tty_save_state(), uv_tty_set_style(), uv_tty_update_virtual_window(), uv_udp_set_socket(), uv_uptime(), uv_wsarecv_workaround(), uv_wsarecvfrom_workaround(), windbg_info(), xnu_dbg_maps(), xnu_dbg_modules(), and xnu_get_vmmap_entries_for_pid().

◆ load_buffer()

static bool load_buffer ( RzBinFile bf,
RzBinObject obj,
RzBuffer buf,
Sdb sdb 
)
static

Definition at line 35 of file bin_ne.c.

35  {
36  rz_return_val_if_fail(bf && obj && buf, false);
38  if (res) {
39  obj->bin_obj = res;
40  return true;
41  }
42  return false;
43 }
rz_bin_ne_obj_t * rz_bin_ne_new_buf(RzBuffer *buf, bool verbose)
Definition: ne.c:672
#define rz_return_val_if_fail(expr, val)
Definition: rz_assert.h:108
bool verbose
Definition: rz_bin.h:359

References rz_bin_object_t::bin_obj, rz_bin_file_t::rbin, rz_bin_ne_new_buf(), rz_return_val_if_fail, and rz_bin_t::verbose.

◆ relocs()

◆ sections()

◆ symbols()

Variable Documentation

◆ rizin_plugin

RZ_API RzLibStruct rizin_plugin
Initial value:
= {
.type = RZ_LIB_TYPE_BIN,
.data = &rz_bin_plugin_ne,
}
RzBinPlugin rz_bin_plugin_ne
Definition: bin_ne.c:118
@ RZ_LIB_TYPE_BIN
Definition: rz_lib.h:75
#define RZ_VERSION
Definition: rz_version.h:8
char * version
Definition: rz_bin.h:512

Definition at line 137 of file bin_ne.c.

◆ rz_bin_plugin_ne

RzBinPlugin rz_bin_plugin_ne
Initial value:
= {
.name = "ne",
.desc = "NE format plugin",
.author = "GustavoLCR",
.license = "LGPL3",
.check_buffer = &check_buffer,
.load_buffer = &load_buffer,
.destroy = &destroy,
.header = &header,
.info = &info,
.entries = &entries,
.sections = &sections,
.symbols = &symbols,
.imports = &imports,
.relocs = &relocs,
.minstrlen = 4
}
RzList * entries(RzBinFile *bf)
Definition: bin_ne.c:98
RzBinInfo * info(RzBinFile *bf)
Definition: bin_ne.c:86
static bool load_buffer(RzBinFile *bf, RzBinObject *obj, RzBuffer *buf, Sdb *sdb)
Definition: bin_ne.c:35
RzList * symbols(RzBinFile *bf)
Definition: bin_ne.c:102
static void header(RzBinFile *bf)
Definition: bin_ne.c:49
static void destroy(RzBinFile *bf)
Definition: bin_ne.c:45
static bool check_buffer(RzBuffer *b)
Definition: bin_ne.c:11
RzList * imports(RzBinFile *bf)
Definition: bin_ne.c:106
RzList * sections(RzBinFile *bf)
Definition: bin_ne.c:110
RzList * relocs(RzBinFile *bf)
Definition: bin_ne.c:114

Definition at line 118 of file bin_ne.c.