anchor.diff:        end;
       end else
       begin
  -      LOG('trolololol');
  +      LOG('Maximum number of functions have been hooked!');
         result := False;
       end;
     finally
       FCS.Leave;
     end;
   end;
  +
   
   initialization
   finale := False;
  
positive.code:     if FCount < FMaxFunctions then
      begin
        FunctionNames[FCount]:=lowercase(Extractfilename(Name));
        GenerateProc86(@FMemory[FCount * ProcSize], FCount, @logcall, nil);
        try
          p := InterceptCreate(Proc, @FMemory[FCount * ProcSize]);
          GenerateProc86(@FMemory[FCount * ProcSize], FCount, @logcall, p);
          Inc(FCount);
          result := True;
        except
  
negative.code:     inc(Ofs);
    end;
  
    result:=@Target[0];
  end;
  
  function GenerateProc64(Target: PByteArray; Ident: Integer; LogCall, OriginalProc: Pointer): Pointer;
  var
    Ofs: Integer;
  begin
    Ofs:=0;
    Target[Ofs]:=$50; Inc(Ofs); // push %rax
    Target[Ofs]:=$51; Inc(Ofs); // push %rcx
    Target[Ofs]:=$52; Inc(Ofs); // push %rdx
    Target[Ofs]:=$53; Inc(Ofs); // push %rbx
  
    Target[Ofs]:=$b9; Inc(Ofs); // mov Ident, %ecx
    PLongword(@Target[ofs])^ := Ident;
    Inc(Ofs, 4);
  
    Target[Ofs]:=$e8;  Inc(Ofs); // call LogCall
    PLongword(@Target[ofs])^ := PtrUInt(LogCall) - PtrUInt(@Target[Ofs+4]);
    Inc(Ofs, 4);
  
    Target[Ofs]:=$5b; Inc(Ofs); // pop %rbx
    Target[Ofs]:=$5a; Inc(Ofs); // pop %rdx
    Target[Ofs]:=$59; Inc(Ofs); // pop %rcx
    Target[Ofs]:=$58; Inc(Ofs); // pop %rax
  
    Target[Ofs]:=$e9;  Inc(Ofs); // jmp to Proc
    PLongword(@Target[ofs])^ := PtrUInt(OriginalProc) - PtrUInt(@Target[Ofs+4]);
    Inc(Ofs, 4);
  
    Target[Ofs] := $cb; // ret
    Inc(Ofs, 1);
  
    // fuck yeah alignment!
    while Ofs < ProcSize do
    begin
      Target[Ofs] := $90;
      inc(Ofs);
    end;
    result:=@Target[0];
  end;
  
  