From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Technique:Recognizing compiler-generated code" |
|---|
| claim | "The MSVC x86 SEH4 scope table starts with a 16-byte header of GS and EH cookie offsets and xor values, followed by entries of (previousTryLevel, filter, handler); the frame stores the table pointer xored with the security cookie, and the try-level chain ends at -2 (SEH3: -1)." |
|---|
| scope | | level | "technique" |
|---|
| applies_to | "32-bit MSVC SEH4 frames (__SEH_prolog4 / _except_handler4_common), as implemented by Wine" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "SCOPETABLE_V4" |
|---|
| size | "variable" |
|---|
| abi | "ilp32" |
|---|
| fields | | offset | "0x0" |
|---|
| size | 4 |
|---|
| type | "int" |
|---|
| name | "gs_cookie_offset" |
|---|
|
| offset | "0x4" |
|---|
| size | 4 |
|---|
| type | "unsigned long" |
|---|
| name | "gs_cookie_xor" |
|---|
|
| offset | "0x8" |
|---|
| size | 4 |
|---|
| type | "int" |
|---|
| name | "eh_cookie_offset" |
|---|
|
| offset | "0xC" |
|---|
| size | 4 |
|---|
| type | "unsigned long" |
|---|
| name | "eh_cookie_xor" |
|---|
|
| offset | "0x10" |
|---|
| size | 12 |
|---|
| type | "SCOPETABLE[]" |
|---|
| name | "entries" |
|---|
| notes | "previousTryLevel (int), lpfnFilter, lpfnHandler (pointers)" |
|---|
|
|
|---|
| endianness | "native" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "SCOPETABLE, SCOPETABLE_V4, get_scopetable_v4 (pointer xor cookie), _except_handler4_common loop to -2" |
|---|
| repo | "https://github.com/wine-mirror/wine" |
|---|
| commit | "7298a818b79446bae153b8d5aa27235ab3703bf9" |
|---|
| path | "dlls/msvcrt/except_i386.c" |
|---|
|
|
|---|
| confidence | "medium" |
|---|
| related | |
|---|
| key | "SEH4 scope table" |
|---|
| topic | "Technique:Recognizing compiler-generated code/x86 SEH frames" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-18T18:32:48.395Z" |
|---|
| verifications | |
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T16:38:42.614Z" |
|---|
| summary | "data.endianness native added (in-memory x86 structure). Layout and the -2 chain end confirmed in Wine, but Wine does not validate the GS/EH cookie fields ('no cookie validation yet'), so their roles…" |
|---|
| changed | |
|---|
|
|
|---|