Skip to content

Converted Unknown64 from PAK format into Timestamp#22

Closed
Redplcs wants to merge 2 commits intoIanusInferus:masterfrom
Redplcs:feature/csf-timestamp
Closed

Converted Unknown64 from PAK format into Timestamp#22
Redplcs wants to merge 2 commits intoIanusInferus:masterfrom
Redplcs:feature/csf-timestamp

Conversation

@Redplcs
Copy link
Copy Markdown
Contributor

@Redplcs Redplcs commented Jan 20, 2026

After some researching using ChatGPT, I found that unknown64 is basically filetime, because It absolutely not hash sum, because It starts the same which is not impossible for multiple files. AI says that this may be Windows FILETIME and I agree with it, because it has almost the same date with the creation date of .exe file. I've changed field, conversion from u64 into datetime, changed UI and docs, which was kinda painful. I didn't use datetimeoffset, because filetime does not stores offset and it may be only guessed

AI summary:

FILETIME format: 64-bit little-endian integer = number of 100-ns ticks since 1601-01-01 (UTC).

When you interpret Unknown64 that way, the values decode into very plausible build/packaging timestamps, and they cluster into tight time windows (hours/days), which hashes don’t do.

Example (Xbox release, first entry MENUS/TEXTURES/RELOJ.RAW):
Unknown64 = 127823472405772090 → 2006-01-21 20:00:40 UTC (FILETIME decode)

Example (PC release, first entry):
127846437150577500 → 2006-02-17 09:55:15 UTC

Resources:
image

@Redplcs
Copy link
Copy Markdown
Contributor Author

Redplcs commented Jan 20, 2026

Forgot to say: The game does nothing with Timestamp on PAK parsing
image

@IanusInferus
Copy link
Copy Markdown
Owner

I have merged your pull request manually.
I fixed localization and two crashes.
One with directory indexing and one with other file formats.
Thank you for your contribution.

@IanusInferus
Copy link
Copy Markdown
Owner

Please rebase to latest master next time.

@Redplcs Redplcs deleted the feature/csf-timestamp branch January 20, 2026 14:38
@herbert3000
Copy link
Copy Markdown

Hi! Would it make sense to modify the LastWriteTime of the extracted files so it matches the timestamp?
I'm thinking about adding something like this to the PAK.Extract function:
System.IO.File.SetLastWriteTime(GetPath(Dir, .Name), File.Timestamp)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants