31 if (sz >
idx + 0x18 + 2) {
35 if (!memcmp (
bytes,
"MZ", 2)) {
37 !memcmp (
bytes+
idx+0x18,
"\x0b\x01", 2)) {
88 if (!
bin->cur->xtr_obj) {
107 .
name =
"xtr.pemixed",
108 .desc =
"Extract sub-binaries in PE files",
113 .extract_from_bytes = &
oneshot,
119 #ifndef RZ_PLUGIN_INCORE
122 .data = &rz_bin_xtr_plugin_pemixed,
RZ_API void rz_bin_xtrdata_free(void *data_)
RZ_API RzBinXtrData * rz_bin_xtrdata_new(RzBuffer *buf, ut64 offset, ut64 size, ut32 file_count, RzBinXtrMetadata *metadata)
static void fill_metadata_info_from_hdr(RzBinXtrMetadata *meta, void *foo)
static RzList * oneshotall(RzBin *bin, const ut8 *buf, ut64 size)
static void free_xtr(void *xtr_obj)
static void destroy(RzBin *bin)
static RzBinXtrData * oneshot(RzBin *bin, const ut8 *buf, ut64 size, int subbin_type)
RzBinXtrPlugin rz_bin_xtr_plugin_xtr_pemixed
RZ_API RzLibStruct rizin_plugin
static bool check_buffer(RzBuffer *b)
RZ_API RZ_OWN RzList * rz_list_newf(RzListFree f)
Returns a new initialized RzList pointer and sets the free method.
RZ_API RZ_BORROW RzListIter * rz_list_append(RZ_NONNULL RzList *list, void *data)
Appends at the end of the list a new element.
struct rz_bin_pemixed_obj_t * rz_bin_pemixed_from_bytes_new(const ut8 *buf, ut64 size)
RzBinPEObj * rz_bin_pemixed_extract(struct rz_bin_pemixed_obj_t *bin, int sub_bin)
void * rz_bin_pemixed_free(struct rz_bin_pemixed_obj_t *bin)
#define rz_return_val_if_fail(expr, val)
ut64(WINAPI *w32_GetEnabledXStateFeatures)()