8 #include "../i/private.h"
9 #include "../format/ne/ne.h"
25 if (!memcmp(
buf,
"MZ", 2)) {
27 if (!memcmp(
buf,
"NE", 2)) {
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);
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]);
93 i->claimed_checksum =
rz_str_newf(
"%08x",
ne->ne_header->FileLoadCRC);
120 .desc =
"NE format plugin",
121 .author =
"GustavoLCR",
136 #ifndef RZ_PLUGIN_INCORE
RzList * entries(RzBinFile *bf)
RzBinInfo * info(RzBinFile *bf)
static bool load_buffer(RzBinFile *bf, RzBinObject *obj, RzBuffer *buf, Sdb *sdb)
RzList * symbols(RzBinFile *bf)
static void header(RzBinFile *bf)
static void destroy(RzBinFile *bf)
RZ_API RzLibStruct rizin_plugin
static bool check_buffer(RzBuffer *b)
RzList * imports(RzBinFile *bf)
RzList * sections(RzBinFile *bf)
RzBinPlugin rz_bin_plugin_ne
RzList * relocs(RzBinFile *bf)
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
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")
RzList * rz_bin_ne_get_symbols(rz_bin_ne_obj_t *bin)
rz_bin_ne_obj_t * rz_bin_ne_new_buf(RzBuffer *buf, bool verbose)
void rz_bin_ne_free(rz_bin_ne_obj_t *bin)
RzList * rz_bin_ne_get_imports(rz_bin_ne_obj_t *bin)
RzList * rz_bin_ne_get_entrypoints(rz_bin_ne_obj_t *bin)
RzList * rz_bin_ne_get_segments(rz_bin_ne_obj_t *bin)
RzList * rz_bin_ne_get_relocs(rz_bin_ne_obj_t *bin)
#define rz_return_val_if_fail(expr, val)
#define rz_buf_read_le16_at(b, addr, result)
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.
RZ_API ut64 rz_buf_size(RZ_NONNULL RzBuffer *b)
Return the size of the buffer.
RZ_API char * rz_str_newf(const char *fmt,...) RZ_PRINTF_CHECK(1
XX curplugin == o->plugin.
ut64(WINAPI *w32_GetEnabledXStateFeatures)()