20 bin->nfat_arch =
bin->hdr.nfat_arch;
36 for (
i = 0;
i <
bin->nfat_arch;
i++) {
62 *narch =
bin->nfat_arch;
68 eprintf(
"Skipping corrupted sub-bin %d arch %d\n",
idx,
bin->archs[
idx].size);
struct rz_bin_fatmach0_arch_t * rz_bin_fatmach0_extract(struct rz_bin_fatmach0_obj_t *bin, int idx, int *narch)
struct rz_bin_fatmach0_obj_t * rz_bin_fatmach0_from_bytes_new(const ut8 *buf, ut64 size)
static int rz_bin_fatmach0_init(struct rz_bin_fatmach0_obj_t *bin)
struct rz_bin_fatmach0_obj_t * rz_bin_fatmach0_from_buffer_new(RzBuffer *b)
struct rz_bin_fatmach0_obj_t * rz_bin_fatmach0_new(const char *file)
void * rz_bin_fatmach0_free(struct rz_bin_fatmach0_obj_t *bin)
RZ_API void Ht_() free(HtName_(Ht) *ht)
void * malloc(size_t size)
#define rz_return_val_if_fail(expr, val)
RZ_API RzBuffer * rz_buf_ref(RzBuffer *b)
Increment the reference count of the buffer.
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 void rz_buf_free(RzBuffer *b)
Free all internal data hold by the buffer and the buffer.
RZ_API RZ_OWN RzBuffer * rz_buf_new_slice(RzBuffer *b, ut64 offset, ut64 size)
Creates a new buffer from a slice of another buffer.
RZ_API bool rz_buf_set_bytes(RZ_NONNULL RzBuffer *b, RZ_NONNULL const ut8 *buf, ut64 len)
Replace the content of the buffer with the bytes array.
RZ_API RZ_OWN RzBuffer * rz_buf_new_with_bytes(RZ_NULLABLE RZ_BORROW const ut8 *bytes, ut64 len)
Creates a new buffer with a bytes array.
RZ_API ut64 rz_buf_size(RZ_NONNULL RzBuffer *b)
Return the size of the buffer.
static ut32 rz_read_be32(const void *src)
RZ_API RZ_OWN char * rz_file_slurp(const char *str, RZ_NULLABLE size_t *usz)
#define RZ_LOG_ERROR(fmtstr,...)
ut64(WINAPI *w32_GetEnabledXStateFeatures)()