Files
praxisandClaude Fable 5.2 8e02dccb86 In-client stack: transport, session lifecycle and engine bridge
175 files, from working commit b1a079a.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-19 01:32:48 +02:00

28 lines
1.3 KiB
C

#ifndef GW_REALM_SEAM_PAGE_H
#define GW_REALM_SEAM_PAGE_H
#include <windows.h>
#include <stdint.h>
#include <stddef.h>
#include "realm_install_diagnostic.h"
typedef void (*GwRealmSeamProbe)(uintptr_t address, size_t bytes,
struct GwRealmInstallDiagnostic *out);
/* The client keeps its main-image code pages MEM_MAPPED/PAGE_NOACCESS until
* they execute (lazy decryption) and re-protects idle pages later. Original
* OpenRealm first executes the seam page by calling 0x141e448c0 (from
* 0x141e460df) before the pipe constructor reaches seam 0x141e448ad; the
* preopen install runs before OpenRealm, so it cannot wait for that.
*
* Returns 1 when the page is not in the exact lazy-protected state (caller
* continues its existing RX/byte admission), 2 when it remains deferred.
* When deferred, executes the single in-page `ret` once per *touch_once
* generation so the client's own handler decrypts the page as for its own
* first execution, then probes again. *touched reports that execution. */
int gw_realm_seam_page_prepare(uintptr_t site, size_t bytes, uintptr_t ret_stub,
GwRealmSeamProbe probe, volatile LONG *touch_once,
struct GwRealmInstallDiagnostic *out, int *touched);
#endif