extraction of outer image psf_image.dat (initial work on pfs)

This commit is contained in:
georgemoralis 2023-01-24 16:49:54 +02:00
parent f82a37a0f3
commit e22e99a9db
2 changed files with 7 additions and 0 deletions

View file

@ -97,6 +97,11 @@ bool PKG::extract(const std::string& filepath, const std::string& extractPath, s
out.Close();
}
}
//extract pfs_image.dat
FsFile out;
out.Open(extractPath + "pfs_image.dat", fsWrite);
out.Write(pkg + pkgheader.pfs_image_offset, pkgheader.pfs_image_size);
out.Close();
munmap(pkg);
return true;
}

View file

@ -73,6 +73,8 @@ inline void ReadBE(PKGHeader& s)
ReadBE(s.pkg_table_entry_count);
ReadBE(s.pkg_content_offset);
ReadBE(s.pkg_content_size);
ReadBE(s.pfs_image_offset);
ReadBE(s.pfs_image_size);
ReadBE(s.pkg_size);
}