[PR #698] pe_inspect: parse and validate x64 pdata exception directory table (OLD-7796) #739

Open
opened 2026-11-26 20:18:53 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/698
Author: @abnalstlll-byte
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: feat/exe-pdata-table


📝 Commits (3)

  • bbf0fa0 pe_inspect: validate and parse .pdata exception directory (RUNTIME_FUNCTION)
  • fcc89f7 pe_inspect: ignore partial tail when checking complete .pdata entry truncation
  • d78e679 test(pe_inspect): pin UnwindData boundary check near SizeOfImage

📊 Changes

2 files changed (+484 additions, -5 deletions)

View changed files

📝 tests/test_pe_inspect.py (+258 -1)
📝 tools/pe_inspect.py (+226 -4)

📄 Description

Related issues: #14, #18 (restoring old upstream PR 7796).

What and why

Restores original pull request OLD-7796 authored by @abnalstlll-byte:

  • Extends \ ools/pe_inspect.py\ with full support for parsing the x64 .pdata\ runtime function exception directory table (\IMAGE_RUNTIME_FUNCTION_ENTRY).
  • Decodes BeginAddress, EndAddress, and UnwindInfoAddress RVAs, asserting monotonicity and valid section containment.
  • Parses \UNWIND_INFO\ structures (version, flags, prolog size, unwind code count, frame register and offset).
  • Comprehensive unit test coverage in \ ests/test_pe_inspect.py.

Tested

  • Windows 11 x64, Python 3.14 / 3.12:
    • \python -I tests/test_pe_inspect.py: 69/69 PASS.
    • \python -I scripts/check_no_game_data.py\ on changed files: PASS.
  • Clean merge against \ubi/main\ (0 conflicts).

Checklist

  • No proprietary payloads, game-derived files, keys, or protection workarounds.
  • Standard library only (\python -I).
  • Preserves author attribution and original PR commit provenance.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/698 **Author:** [@abnalstlll-byte](https://github.com/abnalstlll-byte) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/exe-pdata-table` --- ### 📝 Commits (3) - [`bbf0fa0`](https://github.com/ubiquitarianism/leonida/commit/bbf0fa05fb704c9127daec6a60ec3a8b3406cafd) pe_inspect: validate and parse .pdata exception directory (RUNTIME_FUNCTION) - [`fcc89f7`](https://github.com/ubiquitarianism/leonida/commit/fcc89f78d24a4c4b72526e5c6ff390ebce5eb7e2) pe_inspect: ignore partial tail when checking complete .pdata entry truncation - [`d78e679`](https://github.com/ubiquitarianism/leonida/commit/d78e679d6f3a1cc103739d79915ac2b506d7118a) test(pe_inspect): pin UnwindData boundary check near SizeOfImage ### 📊 Changes **2 files changed** (+484 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_pe_inspect.py` (+258 -1) 📝 `tools/pe_inspect.py` (+226 -4) </details> ### 📄 Description Related issues: #14, #18 (restoring old upstream PR 7796). ### What and why Restores original pull request **OLD-7796** authored by @abnalstlll-byte: - Extends \ ools/pe_inspect.py\ with full support for parsing the x64 \.pdata\ runtime function exception directory table (\IMAGE_RUNTIME_FUNCTION_ENTRY\). - Decodes BeginAddress, EndAddress, and UnwindInfoAddress RVAs, asserting monotonicity and valid section containment. - Parses \UNWIND_INFO\ structures (version, flags, prolog size, unwind code count, frame register and offset). - Comprehensive unit test coverage in \ ests/test_pe_inspect.py\. ### Tested - Windows 11 x64, Python 3.14 / 3.12: - \python -I tests/test_pe_inspect.py\: 69/69 PASS. - \python -I scripts/check_no_game_data.py\ on changed files: PASS. - Clean merge against \ubi/main\ (0 conflicts). ### Checklist - [x] No proprietary payloads, game-derived files, keys, or protection workarounds. - [x] Standard library only (\python -I\). - [x] Preserves author attribution and original PR commit provenance. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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.

Dependencies

No dependencies set

Reference
starred/leonida#739
No description provided.