anchor.diff:        (NativeInt(AddrProc) + NativeInt(CodeOffset) + 4) + NativeInt(JumpOffset);
     end;
   
  -  VirtualProtect(AddrProc, CodeSize, PAGE_EXECUTE_READWRITE, Protect);
  -    Move(Buffer, AddrProc^, CodeSize);
  -  VirtualProtect(AddrProc, CodeSize, Protect, Protect);
  -  FlushInstructionCache(GetCurrentProcess, AddrProc, CodeSize);
  +  PatchCode(AddrProc, CodeSize, @Buffer);
   end;
   
   procedure BrainMMRedirectInitialize;
  
positive.code: 
    // todo
  
    InitializeOffsetsMedium;
  
    {$ifdef BRAINMM_REDIRECT}
      if (not System.IsLibrary) then
        BrainMMRedirectInitialize;
    {$endif}
  
    SetMemoryManager(PMemoryMgr(@MemoryManager.Standard)^);
  end;
  
  
negative.code:     JumpOffset: Cardinal;
    end;
  
  procedure PatchCode(const AddrProc: Pointer; const CodeSize: NativeUInt;
    const Code: Pointer);
  var
    OldProtect: Cardinal;
  begin
    VirtualProtect(AddrProc, CodeSize, PAGE_EXECUTE_READWRITE, OldProtect);
    Move(Code^, AddrProc^, CodeSize);
    VirtualProtect(AddrProc, CodeSize, OldProtect, OldProtect);
  end;
  
  procedure PatchRedirect(const AddrProc: Pointer; const CodeSize: NativeUInt;
    const Code: Pointer; const Jumps: array of TJumpInfo);
  var
    i: Integer;
    Buffer: array[0..33] of Byte;
  begin
    Move(Code^, Buffer, CodeSize);
  
  