mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:30:52 +01:00
[PR #1023] docs(directstorage): measured factory IID and SetStagingBufferSize slot (DSTORAGE-FACTORY-MEASURED) #1062
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1062
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1023
Author: @robot00f
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:docs/agent4📝 Commits (1)
6be0617docs(directstorage): measured factory IID and SetStagingBufferSize slot📊 Changes
1 file changed (+79 additions, -18 deletions)
View changed files
📝
docs/directstorage.md(+79 -18)📄 Description
docs/directstorage.mdnow records, as measured, what the executable asks the factory for and which slot it then calls. Claim: ubiquitarianism/leonida#14, itemDSTORAGE-FACTORY-MEASURED.What
DStorageGetFactoryimport comes fromXCRDAPI.dll, one import with one call site (RVA0x1D8E4F0, thunk0x5F3FF80, IAT slot RVA0x6793FB8), consistent withdocs/runtime_imports.md(RT-5) anddocs/audio_hal_exe_calls.md.dstorage.dllanddstorage_xs.dllare imported by nobody.0x62FC7D8/ VA0x1462FC7D8,11 9D 95 62 5F D4 84 48 A0 A3 F7 86 2E A2 43 AE—{62959D11-D45F-4884-A0A3-F7862EA243AE}read Data1 LE, Data2/Data3 LE, Data4 as stored. RDX is the out pointer at VA0x1478F5E78; the result is tested for null and then for a non-zero HRESULT before reloading the factory pointer.call [rax+0x40]withedx = 0x02000000, followed bytest eax, eax/jns.0x40 / 8 = 8, where PCdstorage.hputsSetDebugFlagsat 6 andSetStagingBufferSizeat 7, soSetStagingBufferSizeat slot 8 confirms one console-only method (SetCpuAffinity) sits alongside the sharedSetDebugFlagsat slots 6 and 7 before it (matchingruntime/shims/dstorage_xs_abi.h), and the 32 MiB value plusHRESULTsign check distinguishSetStagingBufferSizefromvoid SetDebugFlags(UINT32). Which ofSetCpuAffinityandSetDebugFlagsis 6 and which is 7 stays a guess.xcrdapi.dllmeasured; factory order medium instead of low), the id is added to the factory-id policy, and the shim consequence is written down: accept the id as the factory's declared id (besidekStatusArrayIds) rather than only learning it at boot, and keepSetStagingBufferSizeon slot 8.E_DSTORAGE_STAGING_BUFFER_LOCKEDrule expects.Why
The page listed the module as "low" on a name in a library list and the factory order as low "(
SetCpuAffinityslot is a guess)". Both are now measured from the file, so a shim that misroutes the staging call or refuses the real factory id can be caught before a boot. Nothing is executed; no game bytes are committed.Tested
python -I scripts/check_no_game_data.py docs/directstorage.md— exit 0python -I tests/test_docs_*.pyandpython -I tests/test_i18n_index.py— OKpython -m compileall -q make_game.py tools tests— exit 0python -I tools/import_call_sites.py game_scarlett_master.exe --import XCRDAPI.dll!DStorageGetFactory --json— one thunk, one call, at the RVAs quotedDocs only, no runtime or test change. GPUs tested: n/a.
AI-assisted: yes (Antigravity)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.