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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? dcdecomps.pas

?? SrcDecompiler is about creating a Delphi program decompiler. The program is written for Delphi 4 or
?? PAS
字號(hào):
unit dcDecomps;

interface

uses
  {$IFOPT D+}
    dcDebug, dialogs,
  {$ENDIF}
  Classes, PEFile;

type
  TDecompCollection = class;

  { TDecompItem }

  TIntfImpl = (iiInterface, iiImplementation);

  TReqDecompType = (rdtReq, rdtReqBy, rdtReqAddress);

  TDecompItem = class(TCollectionItem)
  private
    FAddress: PChar;
    FRefAddress: PChar;
    FSize: Integer;
    FAUnit: TCollectionItem;
    FReqDecomps: array[TReqDecompType] of TList;
    FIntfImpl: TIntfImpl;
    FComments: TStrings;
    FPEFileClass: TPEFile;
    procedure SetAUnit(Value: TCollectionItem);
    procedure SetIntfImpl(Value: TIntfImpl);
    function GetReqDecompCount(PropIndex: TReqDecompType): Integer;
    function GetReqDecomp(Index: Integer; PropIndex: TReqDecompType): TDecompItem;
    procedure SetAddress(Value: PChar);
  protected
    procedure SetSize(Value: Integer); virtual;
    // PossSetToIntf is called when the decomp is in the interface section and a
    // req decomp is in the implemenation section (only once), by default
    // the decomp item is moved to the implementation section.
    procedure PossSetToIntf(DecompItem: TDecompItem); virtual;
  public
    constructor Create(Collection: TCollection); override;
    destructor Destroy; override;
    procedure AddReq(Decomp: TDecompItem; AAddress: PChar); virtual;
    procedure AddReqBy(Decomp: TDecompItem; AAddress: PChar); virtual;
    // Returns the name of the item at address PChar, returns an empty string
    // if it isn't a ref address. This method will be override by descend classes.
    function IsRefAddress(AAddress: PChar): Boolean; virtual;

    property Address: PChar read FAddress write SetAddress;
    property RefAddress: PChar read FRefAddress write FRefAddress;
    property Size: Integer read FSize write SetSize;
    property AUnit: TCollectionItem read FAUnit write SetAUnit;
    // List of decomp items which are required by this decomp item.
    property ReqDecompCount: Integer Index rdtReq read GetReqDecompCount;
    property ReqDecomps[Index: Integer]: TDecompItem Index rdtReq read GetReqDecomp;
    property ReqDecompsAddress[Index: Integer]: TDecompItem Index rdtReqAddress read GetReqDecomp;
    // List of decomp items which require this decomp item.
    property ReqByDecompCount: Integer Index rdtReqBy read GetReqDecompCount;
    property ReqByDecomps[Index: Integer]: TDecompItem Index rdtReqBy read GetReqDecomp;

    property Comments: TStrings read FComments;
    property IntfImpl: TIntfImpl read FIntfImpl write SetIntfImpl;
    property PEFileClass: TPEFile read FPEFileClass;
  end;

  { TDecompCollection }

  TDecompCollection = class(TCollection)
  private
    FPEFileClass: TPEFile;
  public
    constructor CreateDecomp(PEFileClass: TPEFile); virtual;
    property PEFileClass: TPEFile read FPEFileClass;
  end;

  { TDecompList }

  TDecompList = class(TList)
  private
    FSorted: Boolean;
    function GetItem(Index: Integer): TDecompItem;
  public
    procedure MustBeSorted;
    function FindByBlock(Address: PChar): Integer;
    function FindByRef(Address: PChar): Integer;

    property Items[Index: Integer]: TDecompItem read GetItem; default;
  end;

implementation

uses
  SysUtils, PEFileClass, dcUnits;

{ TDecompItem }

constructor TDecompItem.Create(Collection: TCollection);
var
  I: TReqDecompType;
begin
  inherited Create(Collection);
  if not (Collection is TDecompCollection) then
    raise EDecompilerError.Create('Collection is not a decomp collection');
  FPEFileClass := TDecompCollection(Collection).PEFileClass;
  // Add yourself to the decomp list.
  TPEFileClass(PEFileClass).Decomps.Add(Self);
  // The list is now not sorted anymore
  TPEFileClass(PEFileClass).Decomps.FSorted := False;
  for I := Low(TReqDecompType) to High(TReqDecompType) do
    FReqDecomps[I] := TList.Create;
  FIntfImpl := iiImplementation;
  FComments := TStringList.Create;
end;

destructor TDecompItem.Destroy;
var
  I: Integer;
  J: Integer;
  Req: TReqDecompType;
begin
  // Remove the req items.
  for I := 0 to ReqDecompCount -1 do
    ReqDecomps[I].FReqDecomps[rdtReqBy].Remove(Self);
  for I := 0 to ReqByDecompCount -1 do
  begin
    J := ReqByDecomps[I].FReqDecomps[rdtReq].IndexOf(Self);
    Assert(J <> -1, 'Decomp ByDecomps not in sync');
    ReqByDecomps[I].FReqDecomps[rdtReq].Delete(J);
    ReqByDecomps[I].FReqDecomps[rdtReqAddress].Delete(J);
  end;
  for Req := Low(TReqDecompType) to High(TReqDecompType) do
    FReqDecomps[Req].Free;
  // Remove the item from the unit.
  if FAUnit <> nil then
    (FAUnit as TUnit).DecompItems.Delete((FAUnit as TUnit).DecompItems.IndexOf(Self));
  // remove yourself from the decomp list.
  with TPEFileClass(TDecompCollection(Collection).PEFileClass).Decomps do
    Remove(Self);
  // Free private objects.
  FComments.Free;
  inherited Destroy;
end;

procedure TDecompItem.SetAUnit(Value: TCollectionItem);
begin
  if Value <> FAUnit then
  begin
    if (FAUnit <> nil) then
      raise EDecompilerError.Create('Item already has a unit');
    Assert(Value is TUnit, 'Unit not an unit');
    FAUnit := Value;
    (FAUnit as TUnit).DecompItems.Add(Self);
  end;
end;

procedure TDecompItem.SetSize(Value: Integer);
begin
  FSize := Value;
end;

procedure TDecompItem.SetIntfImpl(Value: TIntfImpl);
var
  I: Integer;
begin
  // Do nothing if the new value is the same as the old.
  if Value = FIntfImpl then Exit;
  // A item can not be set back the the implementation part.
  if Value = iiImplementation then
    raise EDecompilerError.Create('Value set back the implementation');
  // A decomp item in the program unit can't be set to interface.
  if (AUnit <> nil) and (TUnit(AUnit).UnitType = utProgram) then
    raise EDecompilerError.Create('Set the interface with the unit type');
  // Set the var
  FIntfImpl := Value;
  // if a req item is in the implementation section possibly set it to the
  // interface section.
  for I := 0 to ReqDecompCount -1 do
    if ReqDecomps[I].IntfImpl = iiImplementation then
      PossSetToIntf(ReqDecomps[I]);
end;

procedure TDecompItem.PossSetToIntf(DecompItem: TDecompItem);
begin
  DecompItem.IntfImpl := iiInterface;
end;

function TDecompItem.GetReqDecompCount(PropIndex: TReqDecompType): Integer;
begin
  Result := FReqDecomps[PropIndex].Count;
end;

function TDecompItem.GetReqDecomp(Index: Integer; PropIndex: TReqDecompType): TDecompItem;
begin
  Result := FReqDecomps[PropIndex].Items[Index];
end;

procedure TDecompItem.SetAddress(Value: PChar);
begin
  if Value <> FAddress then
  begin
    FAddress := Value;
    TPEFileClass(PEFileClass).Decomps.FSorted := False;
  end;
end;

procedure TDecompItem.AddReq(Decomp: TDecompItem; AAddress: PChar);
var
  I: Integer;
begin
  if Decomp = nil then
  begin
    {$IFOPT D+}
      SendDebugEx('Empty Req added', mtError);
      exit;
    {$ELSE}
      raise EDecompilerError.Create('empty Req Added');
    {$ENDIF}
  end;
  // Do nothing if the decomp is already Req.
  for I := 0 to ReqDecompCount -1 do
    if (ReqDecomps[I] = Decomp) and
       (PChar(ReqDecompsAddress[I]) = AAddress) then
      exit;
  FReqDecomps[rdtReqAddress].Add(AAddress);
  FReqDecomps[rdtReq].Add(Decomp);
  Decomp.FReqDecomps[rdtReqBy].Add(Self);
  // If this Decomp is in the interface section and the added in the implementation
  // it must possibly Move to the interface section
  if (IntfImpl = iiInterface) and (Decomp.IntfImpl = iiImplementation) then
    PossSetToIntf(Decomp);
  Decomp.AddReqBy(Self, AAddress);
end;

procedure TDecompItem.AddReqBy(Decomp: TDecompItem; AAddress: PChar);
begin
end;

function TDecompItem.IsRefAddress(AAddress: PChar): Boolean;
begin
  Result := AAddress = RefAddress;
end;

{ TDecompCollection }

constructor TDecompCollection.CreateDecomp(PEFileClass: TPEFile);
begin
  inherited Create(TDecompItem);
  if not (PEFileClass is TPEFileClass) then
    raise EDecompilerError.Create('PEFileClass is not TPEFileClass');
  FPEFileClass := PEFileClass;
end;

{ TDecompList }

function TDecompList.GetItem(Index: Integer): TDecompItem;
begin
  Result := inherited Get(Index);
end;

function DecompItemSort(Item1, Item2: Pointer): Integer;
begin
  Result := TDecompItem(Item1).Address - TDecompItem(Item2).Address;
end;

procedure TDecompList.MustBeSorted;
begin
  if not FSorted then
  begin
    Sort(DecompItemSort);
    FSorted := True;
  end;
end;

function TDecompList.FindByBlock(Address: PChar): Integer;
var
  L, H, I, C: Integer;
begin
  MustBeSorted;
  Result := -1;
  L := 0;
  H := Count - 1;
  while L <= H do
  begin
    I := (L + H) shr 1;
    C := Items[I].Address - Address;
    if C <= 0 then
      L := I + 1
    else
      H := I - 1;
  end;

  for I := H downto 0 do
    if (Address >= Items[I].Address) and
       (Address < Items[I].Address + Items[I].Size) then
    begin
      Result := I;
      Exit;
    end;
end;

function TDecompList.FindByRef(Address: PChar): Integer;
var
  I, L, C, H: Integer;
begin
  MustBeSorted;
  Result := -1;
  L := 0;
  H := Count - 1;
  while L <= H do
  begin
    I := (L + H) shr 1;
    C := Items[I].Address - Address;
    if C <= 0 then
      L := I + 1
    else
      H := I - 1;
  end;

  for I := H downto 0 do
  begin
    if (Address = Items[I].RefAddress) or Items[I].IsRefAddress(Address) then
    begin
      Result := I;
      Exit;
    end;
  end;
end;

end.

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品国产麻豆| www.久久久久久久久| 亚洲四区在线观看| 国产日韩精品一区二区三区在线| 日韩一区二区在线观看视频| 欧美日韩精品系列| 欧美巨大另类极品videosbest| 91黄视频在线| 欧洲激情一区二区| 在线一区二区三区四区| 欧美日韩国产综合久久| 欧美巨大另类极品videosbest| 欧美日韩的一区二区| 欧美一区二区在线看| 日韩视频一区二区三区| 久久综合久久99| 国产精品午夜在线观看| 国产精品传媒入口麻豆| 亚洲一区在线视频| 日本成人在线电影网| 国产在线视频一区二区三区| 国产黑丝在线一区二区三区| 不卡一区二区三区四区| 91福利小视频| 日韩精品一区二区三区蜜臀| 国产亚洲欧美日韩在线一区| 亚洲婷婷在线视频| 丝袜诱惑制服诱惑色一区在线观看| 日本亚洲免费观看| 国产成人午夜电影网| 色婷婷综合久久久中文一区二区 | 欧美日韩成人一区| 精品国产欧美一区二区| 1000部国产精品成人观看| 亚洲午夜私人影院| 极品少妇xxxx偷拍精品少妇| 91最新地址在线播放| 欧美夫妻性生活| 国产精品欧美精品| 日韩影视精彩在线| 成人性生交大片免费看在线播放| 欧美日韩国产成人在线91| 久久精品男人天堂av| 亚洲18色成人| 99天天综合性| 久久综合成人精品亚洲另类欧美| 亚洲最新视频在线观看| 国产精品亚洲专一区二区三区 | 色哟哟日韩精品| 精品美女一区二区| 亚洲电影你懂得| proumb性欧美在线观看| 欧美xxx久久| 亚洲va欧美va人人爽午夜| caoporm超碰国产精品| 欧美tickling挠脚心丨vk| 亚洲自拍偷拍av| 99精品欧美一区| 国产日韩欧美一区二区三区综合| 免费在线观看日韩欧美| 91麻豆免费看片| 国产精品久久久久久久裸模| 国产综合色精品一区二区三区| 欧美日本韩国一区| 一区二区三区在线视频播放 | 99天天综合性| 欧美经典一区二区| 国产一区二区在线观看视频| 欧美一区二区精美| 日本午夜一区二区| 欧美三级午夜理伦三级中视频| 亚洲欧美一区二区三区久本道91| 大白屁股一区二区视频| 欧美激情艳妇裸体舞| 国产精品一区二区在线观看不卡 | 亚洲成在人线免费| 在线精品亚洲一区二区不卡| 亚洲精品免费在线| 色综合网站在线| 亚洲最新视频在线观看| 91黄视频在线观看| 亚洲一区二区三区在线播放| 欧美亚洲动漫精品| 亚洲国产欧美另类丝袜| 7777精品久久久大香线蕉| 日韩影院在线观看| 337p粉嫩大胆噜噜噜噜噜91av| 老司机午夜精品99久久| 2021国产精品久久精品| 国产999精品久久久久久绿帽| 久久精品人人做人人综合 | 91成人免费网站| 亚洲高清视频在线| 日韩一本二本av| 国产成人综合网| 亚洲人精品午夜| 欧美男女性生活在线直播观看| 婷婷开心久久网| 久久久久久久av麻豆果冻| 高清国产午夜精品久久久久久| 亚洲天堂网中文字| 欧美日韩一区二区三区四区| 三级影片在线观看欧美日韩一区二区| 欧美一级艳片视频免费观看| 久久99精品国产麻豆婷婷| 国产精品视频观看| 欧美国产日韩亚洲一区| 91亚洲大成网污www| 丝袜美腿高跟呻吟高潮一区| 精品国产一区二区亚洲人成毛片 | 中文字幕在线视频一区| 欧美亚洲国产一区二区三区va| 久久99精品久久久久久动态图| 中文字幕久久午夜不卡| 欧美精品tushy高清| 国产成人自拍网| 日韩不卡一区二区三区| 日本一区二区成人在线| 欧美二区三区的天堂| 国产精品亚洲综合一区在线观看| 夜夜操天天操亚洲| 久久精品一区二区| 欧美日韩精品三区| 成人黄色片在线观看| 青青草97国产精品免费观看 | 日韩三级电影网址| 99精品国产视频| 国产一区福利在线| 日日夜夜精品视频免费| **欧美大码日韩| 国产午夜精品美女毛片视频| 欧美日韩精品免费| 色综合久久六月婷婷中文字幕| 国产一区二区在线影院| 午夜精品久久久久久久| 亚洲乱码国产乱码精品精小说| 久久天堂av综合合色蜜桃网| 91麻豆精品国产| 欧美日韩亚洲综合一区二区三区| av高清久久久| 国产成人日日夜夜| 国产激情视频一区二区三区欧美 | 欧美日韩一级大片网址| 91丨九色丨尤物| 99久久夜色精品国产网站| 国内精品伊人久久久久影院对白| 三级久久三级久久| 午夜电影网亚洲视频| 亚洲一级二级三级在线免费观看| 国产精品成人一区二区艾草| 国产色91在线| 亚洲国产成人午夜在线一区| 久久综合九色综合欧美98| 日韩午夜电影av| 欧美一级日韩不卡播放免费| 91精品国产综合久久福利软件| 欧美性色黄大片手机版| 在线免费观看不卡av| 日本韩国一区二区| 欧美性一级生活| 欧美日韩一区二区三区不卡 | 久久av资源站| 久久91精品国产91久久小草| 激情综合网最新| 国产精品538一区二区在线| 丁香桃色午夜亚洲一区二区三区| 国产精品99久久久| 成人av高清在线| 日本道在线观看一区二区| 色欧美片视频在线观看在线视频| 日本韩国欧美一区| 欧美一区二区在线免费播放| 精品毛片乱码1区2区3区 | 自拍av一区二区三区| 亚洲精品福利视频网站| 天涯成人国产亚洲精品一区av| 美女脱光内衣内裤视频久久影院| 蜜桃av噜噜一区| 成人免费va视频| 欧美日韩亚州综合| 26uuu国产电影一区二区| 国产精品的网站| 视频在线在亚洲| 成人a区在线观看| 欧美日韩激情一区二区三区| 欧美精品一区二区三区一线天视频 | 99精品国产91久久久久久| 在线观看成人小视频| 精品蜜桃在线看| 亚洲情趣在线观看| 麻豆国产一区二区| 99国产精品99久久久久久| 5858s免费视频成人| 日本一区二区免费在线| 午夜一区二区三区在线观看| 国产高清久久久| 欧美高清激情brazzers| 中文字幕 久热精品 视频在线 | 蜜桃视频免费观看一区| 91麻豆文化传媒在线观看|