亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? procs.pas

?? SrcDecompiler is about creating a Delphi program decompiler. The program is written for Delphi 4 or
?? PAS
?? 第 1 頁 / 共 5 頁
字號:
    raise EDecompilerError.Create('Project type introduces a new PossProcType.');
  // Set the private field.
  FPossProcTypes := Value;
  if FProcEnh <> nil then
    raise EDecompilerError.Create('There is already an proc enh.');
  if FPossProcTypes = [ptDestructor] then
    FProcEnh := TDestructorProcEnh.CreateEnh(Self);
  if FPossProcTypes = [ptInitialization] then
    FProcEnh := TInitProcEnh.CreateEnh(Self);
  // Set the ancestor proc types.
  if Overrides then
    AncestorMethod.PossProcTypes := Value;
end;

function TProc.GetProcType: TProcType;
begin
  if Overrides then
    Result := AncestorMethod.ProcType
  else
  begin
    if ptEntryPointProc in PossProcTypes then
      Result := ptEntryPointProc
    else
      if ptInitialization in PossProcTypes then
        Result := ptInitialization
      else
        if ptFinalization in PossProcTypes then
          Result := ptFinalization
        else
          if ptProcedure in PossProcTypes then
            Result := ptProcedure
          else
            if ptClassProcedure in PossProcTypes then
              Result := ptClassProcedure
            else
              if ptMethodProcedure in PossProcTypes then
                Result := ptMethodProcedure
              else
                if ptDestructor in PossProcTypes then
                  Result := ptDestructor
                else
                  if ptConstructor in PossProcTypes then
                    Result := ptConstructor
                  else
                    raise EDecompilerError.CreateFmt('Unknown proc type %d', [byte(PossProcTypes)]);
  end;
  // Set the possible proctypes only to the proc type
  PossProcTypes := [Result];
end;

procedure TProc.SetMethodBindingType(Value: TMethodBindingType);
var
  MsgVar: TVar;
begin
  Comments.Add(Format('Method binding type set %d', [Integer(Value)]));
  if not (PossProcTypes <= ptMethods) then
    raise EDecompilerError.Create('Setting binding type of a procedure.');
  FMethodBindingType := Value;
  // non-static proc may not be append before.
  if FMethodBindingType <> mbtStatic then
    AppendBefore := atMayNot;
  // Message handler are dynamic methods with index < $C000.
  if (FMethodBindingType = mbtDynamic) and (MethodIndex < $C000) then
  begin
    MsgVar := TVar.Create(TPEFileClass(PEFileClass).Miscs);
    with MsgVar do
    begin
      Address := AClass.Address - 1;
      Name := 'MI_' + AClass.AClass.ClassName + '_' + IntToStr(MethodIndex);
      VarConst := [vtConst];
      VarSize := 4;
      AUnit := AClass.AUnit;
      PInteger(InitValue )^:= MethodIndex;
      AType.PossTypeKinds := [etkUTInteger];
    end;
    AClass.AddReq(MsgVar, nil);
    PossProcTypes := [ptMethodProcedure];
    if Parameters.Parameters = '' then
      Parameters.Parameters := 'var Message: Integer';
  end;
end;

procedure TProc.SetClass(Value: TClassInfo);
var
  AClass1: TClass;
  AClass2: TClassInfo;
  I: Integer;
label
  Found;
begin
  if Value = AClass then
    exit;
  if (Value = nil) then
    raise EDecompilerError.Create('Trying to set class to nil');
  if (AClass <> nil) then
  begin
    if mbtStatic <> MethodBindingType then
      raise EDecompilerError.Create('Can''t change class again.');
    // Remove the proc from the old class.
    FClass.FMethods.Remove(Self);
    // This method has already a class, search the class with the classes have both in common.
    AClass1 := AClass.AClass;
    repeat
      AClass2 := Value;
      repeat
        // Exit the search when they are equal.
        if AClass1 = AClass2.AClass then
        begin
          Value := AClass2;
          goto Found;
        end;
        AClass2 := AClass2.AncestorClass;
      until AClass2 = nil;
      AClass1 := AClass1.ClassParent;
    until AClass1 = nil;
    Assert(False, 'Impossible to come here');
  end;
Found:
  // Make sure the method is in the same unit as the class. (except when this a imported proc).
  if (mbtStatic = MethodBindingType) and (not ImportInfo.Imported) then
    with TPEFileClass(PEFileClass).Units do
      while FindInUnitUsingFInit(PChar(Value.AClass)) <> FindInUnitUsingFInit(Self.Address) do
        Value := Value.AncestorClass;
  // Add the method to the class.
  FClass := Value;
  FClass.FMethods.Add(Self);
  // All items which require this proc also require the class.
  for I := 0 to ReqByDecompCount -1 do
    ReqByDecomps[I].AddReq(FClass, nil);
end;

function TProc.GetDefSrc: string;
const
  ProcTypeDef: array[Low(TProcType)..High(TProcType), Boolean] of string =
    (('procedure %s(%s);', 'function %s(%s): %s;'), ('class procedure %s(%s);', 'class function %s(%s): %s;'),
     ('procedure %s(%s);', 'function %s(%s): %s;'), ('constructor %s(%s);', 'constructor %s(%s);'),
     ('destructor %s(%s);', 'destructor %s(%s);'), ('', ''), ('', ''), ('', ''));
begin
  // start the proc types and the name.
  Result := Format(ProcTypeDef[ProcType, Parameters.FuncResult <> ''],
         [Name, Parameters.Parameters, Parameters.FuncResult]);
  if overrides then
    Result := Result + ' override;'
  else
    case MethodBindingType of
      mbtVirtual: Result := Result + ' virtual;' + '{' + IntToStr(MethodIndex) +'}';
      mbtDynamic: begin
                    if MethodIndex < $C000 then
                      // Message directive
                      Result := Result + ' message MI_'+ AClass.AClass.ClassName + '_' + IntToStr(MethodIndex) +';'
                    else
                      // dynamic
                      Result := Result + ' dynamic;' + '{' + IntToStr(MethodIndex) +'}';
                  end;
    end;
  if Address = nil then
    Result := Result + ' abstract;';
  if ImportInfo.Imported then
    Result := Result + ' external ' + EnhQuotedStr(ImportInfo.DLLName) + ' name ' +
      EnhQuotedStr(ImportInfo.Entry.Name);
end;

procedure TProc.PossSetToIntf(DecompItem: TDecompItem);
begin
  // Don't add it the decomp to the interface section.
end;

procedure TProc.SetSize(Value: Integer);
begin
  inherited SetSize(Value);
  Comments.Add(Format('Proc size changed to %d', [Value]));
  OnSizeChange.CallFirst;
end;

function TProc.GetAncestorMethod: TProc;
begin
  case MethodBindingType of
    mbtVirtual: Result := AClass.AncestorClass.GetVirtualMethod(MethodIndex);
    mbtDynamic: Result := AClass.AncestorClass.GetDynamicMethod(MethodIndex);
    else
      raise EDecompilerError.Create('not a virtual or static method');
  end;
end;

function TProc.GetIncName: string;
begin
  Result := Name;
  if ProcType in ptMethods then
    Result := AClass.AClass.ClassName + '.' + Result;
  if (Length(Result) > 0) and (Result[1] = '@') then
    Result := TUnit(AUnit).Name + '.' + Result;
end;

procedure TProc.SetInitSize(Value: Integer);
begin
  FInitSize := Value;
  OnInitSizeChange.CallFirst;
end;

procedure TProc.ProcSizeChange(Sender: TmlneMethodList);
var
  AAddress: PChar;
  I: Integer;
  Proc: TProc;
begin
  // Don't check if this is a system unit).
  if ((AUnit = nil) or (TUnit(AUnit).UnitType <> utSystem)) and
     (not ImportInfo.Imported) then
  begin
    with TPEFileClass(TProcs(Collection).PEFileClass) do
    begin
      // Check to see if the proc has a fixup to the middle of a proc, if that is
      // the case it must append.
      I := Fixups.FindFixupAfter(Address);
      if I <> -1 then
      begin
        repeat
          AAddress := Fixups[I].Address;
          // Search for proc which this proc points to.
          if AAddress >= Address + Size  then Break;
          Assert(AAddress >= Address, 'Error in sorting routine');
          Proc := Procs.FindProc(PPChar(AAddress)^);
          if (Proc <> nil) and (Proc.Address <> PPChar(AAddress)^) and
             ((PPChar(AAddress)^ < Address) or (PPChar(AAddress)^ >= Address + Size)) then
          begin
            AddReq(Proc, AAddress);
            // If this proc points to the middle of a proc it must append.
            if Proc.Address < Address then
            begin
              // Ignore if this is proc may not append before.
              if AppendBefore <> atMayNot then
              begin
                Comments.Add(Format('Append before set to must because of a Fixups at %p', [Pointer(AAddress)]));
                Proc.Comments.Add(Format('Append after set to must because of a Fixups from %p', [Pointer(AAddress)]));
                AppendBefore := atMust;
                Proc.AppendAfter := atMust;
              end;
            end
            else
            begin
              Comments.Add(Format('Append after set to must because of a Fixups at %p', [Pointer(AAddress)]));
              Proc.Comments.Add(Format('Append before set to must because of a Fixups from %p', [Pointer(AAddress)]));
              AppendAfter := atMust;
              Proc.AppendBefore := atMust;
            end;
          end;
          Inc(I);
        until I >= TProcs(Collection).PEFileClass.Fixups.Count;
      end;
      // If there is a fixup (to) directly after the proc and the proc doesn't end on a dword boundary
      // it must be larger.
      if (Integer(Address + Size) mod 4 <> 0) and
         ((Fixups.FindFixup(Address + Size) <> -1) or
          (Fixups.FindFixupTo(Address + Size) <> -1)) then
        AppendAfter := atMust;
    end;
  end;
  // Call the next event handler.
  if Sender <> nil then
    Sender.CallNext(ProcSizeChange);
end;

procedure TProc.SetName(Value: string);
resourcestring
  SErrorProcHasAName = 'Can''t set proc name to %s, because it is already %s';
begin
  if AnsiCompareText(Value, FName) <> 0 then
  begin
    if FName <> '' then
      Comments.Add(Format(SErrorProcHasAName, [value, fname]));
    FName := Value;
    if Overrides then
      AncestorMethod.Name := Value;
  end;
end;

function TProc.GetName: string;
begin
  if Overrides then
    Result := AncestorMethod.Name
  else
    Result := FName;
end;

function TProc.GetPossProcTypes: TProcTypes;
begin
  if Overrides then
    Result := AncestorMethod.PossProcTypes
  else
    Result := FPossProcTypes;
end;

procedure TProc.SetOverrides(Value: Boolean);
begin
  if Value <> FOverrides then
  begin
    if not Value then
      raise EDecompilerError.Create('Can not set overrides to false');
    FParameters.Free;
    FOverrides := Value;
    FParameters := AncestorMethod.Parameters;
  end;
end;

function TProc.GetAppend(Index: Integer): TAppendType;
begin
  Result := FAppend[Index];
end;

procedure TProc.SetAppend(Index: Integer; Value: TAppendType);
var
  Proc: TProc;
resourcestring
  SAppendAlreadySet = 'Append already set. %p';
  SConvlictingAppend = 'Must append convlicting with a not must append at %p';
begin
  if Value = FAppend[Index] then Exit;
  if FAppend[Index] <> atMay then
    raise EDecompilerError.CreateFmt(SAppendAlreadySet, [Pointer(Address)]);
  // If this proc must append before/after and there is a proc before/after this one,
  // which can't append there is something wrong.
  if (Value = atMust) then
  begin
    if Index = 0 then
    begin
      Proc := TProcs(Collection).FindProc(Address - 1);
      if (Proc <> nil) and (Proc.Size <> 0) and (Proc.AppendAfter = atMayNot) then
        raise EDecompilerError.CreateFmt(SConvlictingAppend, [Pointer(Address)]);
    end
    else
    begin
      Proc := TProcs(Collection).FindProc(Address + Size + 1);
      if (Proc <> nil) and (Proc.AppendBefore = atMayNot) then
        raise EDecompilerError.CreateFmt(SConvlictingAppend, [Pointer(Address)]);
    end
  end;
  // Set the private field.
  FAppend[Index] := Value;
end;

{ TProcEnh }

constructor TProcEnh.CreateEnh(Proc: TProc);
begin
  inherited Create;
  FProc := Proc;
end;

{ TDestructorProcEnh }

constructor TDestructorProcEnh.CreateEnh(Proc: TProc);
begin
  inherited CreateEnh(Proc);
  Proc.OnSizeChange.Add(ProcSizeChange);
  ProcSizeChange(nil);
end;

destructor TDestructorProcEnh.Destroy;
begin
  FProc.OnSizeChange.Remove(ProcSizeChange);
  inherited Destroy;
end;

procedure TDestructorProcEnh.ProcSizeChange(Sender: TmlneMethodList);
var
  I: Integer;
begin
  // Add the call to Beforedestruction and classdestroy to the auto generated code.
  if Proc.ImportInfo.Imported then Exit;
  with FProc do
  begin
    // BeforeDestruction.
    if not FHasBeforeDestruction then
    begin
      if InitSize <> 0 then
        raise EDecompilerError.Create('There alredy is some init code??');
      I := FindFirstSimpleCallTo(TPEFileClass(PEFileClass).Units.SystemUnit.FindProcByName('@BeforeDestruction').Address,
        Address, Size) - Address;
      if I <> - Integer(Address) then
      begin
        BeforeInitSize := I;
        InitSize := 5;
        FHasBeforeDestruction := True;
      end;
    end;
    // ClassDestroy
    if not FHasClassDestroy then

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美激情一区二区三区不卡| 黄一区二区三区| 国产专区欧美精品| 波多野结衣中文字幕一区二区三区| 欧美在线free| 国产精品免费久久| 美女视频黄 久久| 欧美视频一区二区| 国产精品日韩成人| 久久99久国产精品黄毛片色诱| 91免费视频观看| 国产女主播在线一区二区| 日韩成人精品视频| 欧美网站一区二区| 中文字幕一区二区三区蜜月| 国产美女视频91| 日韩午夜电影av| 成人高清免费观看| 在线成人高清不卡| 一区二区三区欧美久久| 成人av动漫在线| 国产欧美日韩精品一区| 激情成人综合网| 精品久久久久久久人人人人传媒 | 国产成人8x视频一区二区| 日韩天堂在线观看| 日本三级亚洲精品| 9191国产精品| 亚洲国产精品久久艾草纯爱| 色欲综合视频天天天| 亚洲男同1069视频| 一本一道波多野结衣一区二区| 国产精品久久看| 91亚洲永久精品| 亚洲日本丝袜连裤袜办公室| av电影在线观看一区| 中文字幕永久在线不卡| 99久久er热在这里只有精品15| 中文字幕在线观看一区二区| 一本大道久久a久久精二百| 久久99久久久久久久久久久| xfplay精品久久| 成人综合婷婷国产精品久久蜜臀 | 亚洲一区二区三区小说| 欧美在线|欧美| 青娱乐精品视频| 久久一夜天堂av一区二区三区| 国产精品996| 中文字幕一区日韩精品欧美| 91网站最新地址| 亚洲成人你懂的| 欧美电影免费观看高清完整版在线 | 一区在线观看免费| 色欧美片视频在线观看在线视频| 亚洲国产精品久久久久秋霞影院| 4438x亚洲最大成人网| 蜜臀av一区二区在线观看 | 911精品国产一区二区在线| 裸体在线国模精品偷拍| 亚洲国产成人一区二区三区| av电影在线观看一区| 视频一区视频二区中文| 久久久久久**毛片大全| 色妹子一区二区| 另类中文字幕网| 日韩美女久久久| 日韩一级高清毛片| 成a人片国产精品| 亚洲第一综合色| 久久久精品tv| 欧美高清dvd| 国产精品自拍三区| 性感美女久久精品| 国产欧美一区二区精品性色 | 天天爽夜夜爽夜夜爽精品视频| 精品国产免费一区二区三区香蕉| 91亚洲永久精品| 美国av一区二区| 亚洲电影你懂得| 中文字幕在线播放不卡一区| 日韩欧美国产综合一区| 99视频在线观看一区三区| 日韩成人精品在线| 亚洲精品国产一区二区精华液| 日韩欧美高清一区| 在线视频国内自拍亚洲视频| 国产成人精品www牛牛影视| 日日噜噜夜夜狠狠视频欧美人| 国产精品大尺度| 国产亚洲综合av| 日韩欧美国产麻豆| 欧美日韩在线不卡| 99国产欧美另类久久久精品| 国产真实乱子伦精品视频| 亚洲大片免费看| 国产精品麻豆网站| 久久久蜜臀国产一区二区| 在线不卡a资源高清| 色先锋久久av资源部| 成人美女视频在线看| 精品一二三四区| 日韩影视精彩在线| 亚洲成人福利片| 亚洲一区二区三区四区在线| 国产精品美日韩| 久久久99精品久久| 欧美电视剧在线看免费| 91精品国产色综合久久久蜜香臀| 在线国产电影不卡| 欧美在线观看一区二区| 91福利在线观看| 91福利国产精品| 欧洲生活片亚洲生活在线观看| 91麻豆国产在线观看| 99精品视频一区| 91色乱码一区二区三区| 91麻豆福利精品推荐| 91最新地址在线播放| 91视视频在线观看入口直接观看www | 欧美怡红院视频| 欧美视频一区二区三区四区| 欧美日韩国产综合久久| 欧美日本不卡视频| 欧美一区二区性放荡片| 精品国产一区二区亚洲人成毛片| 久久综合色综合88| 国产欧美一区二区精品婷婷| 国产精品久久免费看| 亚洲综合在线视频| 日韩精品一二三四| 精品在线一区二区| 成人av资源站| 欧美伊人久久久久久久久影院| 7777精品伊人久久久大香线蕉 | 蜜桃av一区二区三区| 精品制服美女丁香| 波多野结衣中文字幕一区二区三区 | 日韩精品专区在线| 国产无人区一区二区三区| 中文字幕中文字幕中文字幕亚洲无线| 国产精品黄色在线观看| 亚洲一区二区三区在线看| 奇米综合一区二区三区精品视频| 国产精品主播直播| 在线区一区二视频| 精品美女在线播放| 亚洲欧美日韩国产成人精品影院| 日韩av电影一区| 国产成人av福利| 精品视频一区二区三区免费| 日韩精品一区二区三区老鸭窝 | 男人的j进女人的j一区| 成人av在线一区二区三区| 欧美日韩精品一区二区| 久久精品一区二区三区不卡牛牛| 一区二区三区中文免费| 老司机精品视频在线| 99久久精品情趣| 欧美不卡在线视频| 亚洲一区二区三区视频在线播放 | 久久国产精品99精品国产| 不卡视频在线看| 精品精品欲导航| 一区二区三区在线视频播放| 裸体一区二区三区| 91国模大尺度私拍在线视频| 久久久久9999亚洲精品| 视频一区中文字幕国产| 91免费版pro下载短视频| 久久综合九色综合97婷婷| 亚洲国产精品久久久久秋霞影院| 懂色av噜噜一区二区三区av| 日韩欧美亚洲另类制服综合在线 | 另类综合日韩欧美亚洲| 在线观看视频欧美| 中文字幕乱码日本亚洲一区二区| 久久成人18免费观看| 欧美日韩激情在线| 亚洲精品中文字幕在线观看| 国产在线一区观看| 欧美精品成人一区二区三区四区| 亚洲另类春色校园小说| 成人黄色大片在线观看| 久久综合精品国产一区二区三区| 日本欧美一区二区三区| 欧美日韩国产三级| 一区二区三区久久| 色先锋资源久久综合| 中文字幕欧美一| 成a人片国产精品| 国产精品日产欧美久久久久| 国产精品一二三在| 精品国产一区二区三区久久影院| 蜜臀av一区二区在线免费观看 | 国产精品一区二区91| 亚洲精品一区二区三区香蕉| 久久99精品一区二区三区 | 欧美亚洲一区二区在线观看| 亚洲柠檬福利资源导航| 91麻豆国产香蕉久久精品|