feat: port aelrynth 2026.9.27.2 snapshot onto GitHub history

Overlay upstream/main (9b5e276) onto BlankenshipG main without rewriting
history. Keep origin-only Decal/plugin/docs trees. Re-apply aelrynth.com
and sibling-fork URL fixes that aelrynth git still has as tombohar links.

Co-authored-by: BlankenshipG <BlankenshipG@users.noreply.github.com>
This commit is contained in:
Cursor Agent 2026-10-04 15:43:50 +00:00
commit 4ddbb52eb2
No known key found for this signature in database
244 changed files with 59710 additions and 3067 deletions

View file

@ -20,6 +20,10 @@ internal static class RawPacketHooks
{
private const int RecvFromPtrAddr = unchecked((int)0x007935AC);
// Phase B: resolve the RecvFrom fn-ptr slot's address by code-xref ("call [slot]" =
// FF 15 <addr>), operand at offset 2; the VA stays as fallback.
private static readonly byte?[] PatXrefRecvFromSlot = [ 0xFF, 0x15, null, null, null, null, 0x8B, 0xF0, 0x85, 0xF6, 0x7E, 0x67 ];
private static IntPtr _originalRecvFromPtr;
public static bool IsInstalled { get; private set; }
@ -28,12 +32,16 @@ internal static class RawPacketHooks
{
if (IsInstalled) return;
int slotAddr = RecvFromPtrAddr;
if (AcClientModule.TryReadTextSection(out AcClientTextSection text))
slotAddr = HookResolver.ResolveData(text, "RawPacket.RecvFromSlot", PatXrefRecvFromSlot, 2, RecvFromPtrAddr).Address.ToInt32();
unsafe
{
IntPtr fnPtrAddr = new IntPtr(RecvFromPtrAddr);
IntPtr fnPtrAddr = new IntPtr(slotAddr);
if (!SmartBoxLocator.IsMemoryReadable(fnPtrAddr, 4))
{
RynthLog.Compat("RawPacket: RecvFrom pointer address 0x007935AC not readable — skipping.");
RynthLog.Compat($"RawPacket: RecvFrom pointer address 0x{slotAddr:X8} not readable — skipping.");
return;
}
@ -62,6 +70,7 @@ internal static class RawPacketHooks
private static unsafe int RecvFromDetour(
IntPtr s, IntPtr buf, int len, int flags, IntPtr from, IntPtr fromlen)
{
RecursionGuard.Tick("RawPacketHooks.RecvFrom");
delegate* unmanaged[Stdcall]<IntPtr, IntPtr, int, int, IntPtr, IntPtr, int> original =
(delegate* unmanaged[Stdcall]<IntPtr, IntPtr, int, int, IntPtr, IntPtr, int>)_originalRecvFromPtr;