RBinPEObj* PE_(r_bin_pe_new)(const char* file, bool verbose) {
	RBinPEObj* pe = R_NEW0 (RBinPEObj);
	if (!pe) {
		return NULL;
	}
	pe->file = file;
	size_t binsz;
	ut8 *buf = (ut8*)r_file_slurp (file, &binsz);
	pe->size = binsz;
	if (!buf) {
		return PE_(r_bin_pe_free)(pe);
	}
	pe->b = r_buf_new ();
	if (!r_buf_set_bytes (pe->b, buf, pe->size)) {
		free (buf);
		return PE_(r_bin_pe_free)(pe);
	}
	pe->verbose = verbose;
	free (buf);
	if (!bin_pe_init (pe)) {
		return PE_(r_bin_pe_free)(pe);
	}
	return pe;
}
RBinPEObj* PE_(r_bin_pe_new)(const char* file, bool verbose) {
	RBinPEObj* pe = R_NEW0 (RBinPEObj);
	if (!pe) {
		return NULL;
	}
	pe->file = file;
	size_t binsz;
	ut8 *buf = (ut8*)r_file_slurp (file, &binsz);
	pe->size = binsz;
	if (!buf) {
		return PE_(r_bin_pe_free)(pe);
	}
	pe->b = r_buf_new ();
	if (!r_buf_set_bytes (pe->b, buf, pe->size)) {
		free (buf);
		return PE_(r_bin_pe_free)(pe);
	}
	pe->verbose = verbose;
	free (buf);
	if (!bin_pe_init (pe)) {
		return PE_(r_bin_pe_free)(pe);
	}
	return pe;
}