static bool load_buffer(RzBinFile *bf, RzBinObject *obj, RzBuffer *buf, Sdb *sdb) {
	ut8 MAJOR_MINOR_VERSION;
	LuacBinInfo *bin_info_obj = NULL;
	LuaProto *proto = NULL;
	RzBinInfo *general_info = NULL;
	st32 major;
	st32 minor;

	rz_buf_read_at(buf, LUAC_VERSION_OFFSET, &MAJOR_MINOR_VERSION, sizeof(MAJOR_MINOR_VERSION)); /* 1-byte in fact */
	if ((bin_info_obj = RZ_NEW(LuacBinInfo)) == NULL) {
		return false;
	}
	major = (MAJOR_MINOR_VERSION & 0xF0) >> 4;
	minor = (MAJOR_MINOR_VERSION & 0x0F);

	if (major != 5) {
		RZ_LOG_ERROR("currently support lua 5.x only\n");
		return false;
	}

	switch (minor) {
	case 4:
		proto = lua_parse_body_54(buf, 0x20, bf->size);
		general_info = lua_parse_header_54(bf, major, minor);
		break;
	case 3:
		proto = lua_parse_body_53(buf, 0x22, bf->size);
		general_info = lua_parse_header_53(bf, major, minor);
		break;
	default:
		RZ_LOG_ERROR("lua 5.%c not support now\n", minor + '0');
		return false;
	}

	bin_info_obj = luac_build_info(proto);
	if (bin_info_obj == NULL) {
		lua_free_proto_entry(proto);
		rz_bin_info_free(general_info);
		return false;
	}
	bin_info_obj->general_info = general_info;
	bin_info_obj->major = major;
	bin_info_obj->minor = minor;

	lua_free_proto_entry(proto);
	proto = NULL;

	obj->bin_obj = bin_info_obj;
	return true;
}
static bool load_buffer(RzBinFile *bf, RzBinObject *obj, RzBuffer *buf, Sdb *sdb) {
	ut8 MAJOR_MINOR_VERSION;
	LuacBinInfo *bin_info_obj = NULL;
	LuaProto *proto = NULL;
	RzBinInfo *general_info = NULL;
	st32 major;
	st32 minor;

	rz_buf_read_at(buf, LUAC_VERSION_OFFSET, &MAJOR_MINOR_VERSION, sizeof(MAJOR_MINOR_VERSION));  
	if ((bin_info_obj = RZ_NEW(LuacBinInfo)) == NULL) {
		return false;
	}
	major = (MAJOR_MINOR_VERSION & 0xF0) >> 4;
	minor = (MAJOR_MINOR_VERSION & 0x0F);

	if (major != 5) {
		RZ_LOG_ERROR("currently support lua 5.x only\n");
		return false;
	}

	switch (minor) {
	case 4:
		proto = lua_parse_body_54(buf, 0x20, bf->size);
		general_info = lua_parse_header_54(bf, major, minor);
		break;
	case 3:
		proto = lua_parse_body_53(buf, 0x22, bf->size);
		general_info = lua_parse_header_53(bf, major, minor);
		break;
	default:
		RZ_LOG_ERROR("lua 5.%c not support now\n", minor + '0');
		return false;
	}

	bin_info_obj = luac_build_info(proto);
	if (bin_info_obj == NULL) {
		lua_free_proto_entry(proto);
		rz_bin_info_free(general_info);
		return false;
	}
	bin_info_obj->general_info = general_info;
	bin_info_obj->major = major;
	bin_info_obj->minor = minor;

	lua_free_proto_entry(proto);
	proto = NULL;

	obj->bin_obj = bin_info_obj;
	return true;
}