static int bin_pe_init(RBinPEObj* pe) {
	pe->dos_header = NULL;
	pe->nt_headers = NULL;
	pe->section_header = NULL;
	pe->export_directory = NULL;
	pe->import_directory = NULL;
	pe->resource_directory = NULL;
	pe->security_directory = NULL;
	pe->delay_import_directory = NULL;
	pe->optional_header = NULL;
	pe->data_directory = NULL;
	pe->big_endian = 0;
	pe->cms = NULL;
	pe->spcinfo = NULL;
	if (!bin_pe_init_hdr (pe)) {
		eprintf ("Warning: File is not PE\n");
		return false;
	}
	if (!bin_pe_init_sections (pe)) {
		eprintf ("Warning: Cannot initialize sections\n");
		return false;
	}
	pe->sections = PE_(r_bin_pe_get_sections) (pe);
	bin_pe_init_imports (pe);
	bin_pe_init_exports (pe);
	bin_pe_init_resource (pe);
	bin_pe_init_security (pe);

	pe->big_endian = PE_(r_bin_pe_is_big_endian) (pe);

	bin_pe_init_rich_info (pe);
	bin_pe_init_tls (pe);
	bin_pe_init_clr_hdr (pe);
	bin_pe_init_metadata_hdr (pe);
	bin_pe_init_overlay (pe);
	PE_(bin_pe_parse_resource) (pe);
	pe->relocs = NULL;
	return true;
}
static int bin_pe_init(RBinPEObj* pe) {
	pe->dos_header = NULL;
	pe->nt_headers = NULL;
	pe->section_header = NULL;
	pe->export_directory = NULL;
	pe->import_directory = NULL;
	pe->resource_directory = NULL;
	pe->security_directory = NULL;
	pe->delay_import_directory = NULL;
	pe->optional_header = NULL;
	pe->data_directory = NULL;
	pe->big_endian = 0;
	pe->cms = NULL;
	pe->spcinfo = NULL;
	if (!bin_pe_init_hdr (pe)) {
		eprintf ("Warning: File is not PE\n");
		return false;
	}
	if (!bin_pe_init_sections (pe)) {
		eprintf ("Warning: Cannot initialize sections\n");
		return false;
	}
	pe->sections = PE_(r_bin_pe_get_sections) (pe);
	bin_pe_init_imports (pe);
	bin_pe_init_exports (pe);
	bin_pe_init_resource (pe);
	bin_pe_init_security (pe);

	pe->big_endian = PE_(r_bin_pe_is_big_endian) (pe);

	bin_pe_init_rich_info (pe);
	bin_pe_init_tls (pe);
	bin_pe_init_clr_hdr (pe);
	bin_pe_init_metadata_hdr (pe);
	bin_pe_init_overlay (pe);
	PE_(bin_pe_parse_resource) (pe);
	pe->relocs = NULL;
	return true;
}