Recover chained x64 function ranges and validate a cross-range early return #28

Closed
opened 2026-11-21 10:06:00 +00:00 by R0Y00 · 0 comments
R0Y00 commented 2026-11-21 10:06:00 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-21T10:06:00Z.


The CPU translator currently takes one PE runtime-function interval as the function body. In the locally inventoried FidelityFX loader, the ffxDestroyContext export has a 33-byte primary interval and three additional unwind records chained to it. Two early checks branch outside the primary interval into a shared return block. Static inspection predicts a return value of 6 for a null first argument and for a valid pointer to a null context. These are local static observations; a Windows execution comparison is still open.

Build a source-owned PE fixture with a primary interval, chained ranges, a shared return and an adjacent unrelated function. Reconcile the ranges using unwind metadata and actual branch targets. Preserve single-interval behavior and reject inconsistent chains or a jump into a neighboring function. Exercise the two early returns and a distinct non-null control on Windows, comparing native fixture and translated results and preserved state. Classify any unhandled indirect-call path explicitly. Keep package bytes local and the CI fixture reproducible from source.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6527428390 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/28). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-21T10:06:00Z. --- The CPU translator currently takes one PE runtime-function interval as the function body. In the locally inventoried FidelityFX loader, the ffxDestroyContext export has a 33-byte primary interval and three additional unwind records chained to it. Two early checks branch outside the primary interval into a shared return block. Static inspection predicts a return value of 6 for a null first argument and for a valid pointer to a null context. These are local static observations; a Windows execution comparison is still open. Build a source-owned PE fixture with a primary interval, chained ranges, a shared return and an adjacent unrelated function. Reconcile the ranges using unwind metadata and actual branch targets. Preserve single-interval behavior and reject inconsistent chains or a jump into a neighboring function. Exercise the two early returns and a distinct non-null control on Windows, comparing native fixture and translated results and preserved state. Classify any unhandled indirect-call path explicitly. Keep package bytes local and the CI fixture reproducible from source.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows#28
No description provided.