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

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

?? dededcudumper.pas

?? DeDe3.2004源碼
?? PAS
字號(hào):
unit DeDeDCUDumper;
///////////////////////////////////////////////////////////////
//   This unit implements some routines that uses the DCU2INT
// engine and returns dumped .DCU files in TStringList. They
// are used from both DCU dumper and DCU.2.DSF engine
///////////////////////////////////////////////////////////////
// Last Change: 08.II.2001
///////////////////////////////////////////////////////////////

interface

Uses Classes;

function ProcessParms(sOPTIONS : String): boolean;
procedure ProcessFile(FN: String; SaveOut : TStrings; bRemoveInstructions : Boolean = False; bApplyFixes : Boolean = True);

implementation

Uses DCU32, SysUtils, DCU_Out, DCU_In, DCUTbl, DeDeRES, DeDeConstants;


function ReplaceStar(FNRes,FN: String): String; forward;

function ProcessParms(sOPTIONS : String): boolean;
var
  i,j: integer;
  Ch: Char;
  TmpList : TStringList;
  PS : String;
begin
  Result:=True;
  TmpList:=TStringList.Create;
  TmpList.CommaText:=sOPTIONS;
  Try
    for i:=0 to TmpList.Count-1 do begin
      PS := TmpList[i];
      if (Length(PS)>1)and((PS[1]='/')or(PS[1]='-')) then begin
        Ch := UpCase(PS[2]);
        case Ch of
          'S': begin
            if Length(PS)=2 then
              SetShowAll
            else begin
              for j:=3 to Length(PS) do begin
                Ch := {UpCase(}PS[j]{)};
                case Ch of
                  'I': ShowImpNames := false;
                  'T': ShowTypeTbl := true;
                  'A': ShowAddrTbl := true;
                  'D': ShowDataBlock := true;
                  'F': ShowFixupTbl := true;
                  'V': ShowAuxValues := true;
                  'M': ResolveMethods := false;
                  'C': ResolveConsts := false;
                  'd': ShowDotTypes := true;
                  'v': ShowVMT := true;
                else
                  Result:=false;
                  Raise Exception.CreateFmt(err_unk_dcu_flag,[Ch]);
                  Exit;
                end ;
              end ;
            end ;
          end ;
          'I': InterfaceOnly := true;
          'U': begin
            Delete(PS,1,2);
            DCUPath := PS;
          end ;
          'N': begin
            Delete(PS,1,2);
            NoNamePrefix := PS;
          end ;
          'D': begin
            Delete(PS,1,2);
            DotNamePrefix := PS;
          end;
         End;
      end ;
    end ;
  Finally
    TmpList.Free;
  End;
end;

function ReplaceStar(FNRes,FN: String): String;
var
  CP: PChar;
begin
  CP := StrScan(PChar(FNRes),'*');
  if CP=Nil then begin
    Result := FNRes;
    Exit;
  end ;
  if StrScan(CP+1,'*')<>Nil then
    raise Exception.Create(err_2nd_ast_notallow);
  FN := ExtractFilename(FN);
  if (CP+1)^=#0 then begin
    Result := Copy(FNRes,1,CP-PChar(FNRes))+ChangeFileExt(FN,'.int');
    Exit;
  end;
  Result := Copy(FNRes,1,CP-PChar(FNRes))+ChangeFileExt(FN,'')+Copy(FNRes,CP-PChar(FNRes)+2,MaxInt);
end ;

////////////////////////////////////////////////////////////////////////////
//   Fixes the raw dcu2int output format. Removes the crap opcodes shown as
// their ascii values, fixes offset to be always 8digit hex value, removes
// the '|' before the instructions, enlarge the space for opcodes to be
// capable to 10 opcodes.
//
// change this:
//
// begin
//  00: S      [53                  | PUSH EBX
//  01: V      |56                  | PUSH ESI
//
// to this:
//
// begin
//  00000000 : 53                         PUSH EBX
//  00000001 : 56                         PUSH ESI
//
//   The function can also remove the instructions and left only opcodes and
// offsets. This is done if bRemoveInstructions is set to True and is used
// from DCU.2.DSF engine as preprocessing to DCU2INT output parser
////////////////////////////////////////////////////////////////////////////
procedure FixDCUOutPutFormat(list : TStrings; bRemoveInstructions : Boolean);
var i, iLevel : Integer;
    s : String;
    bBegin, bEnd, bDontProcess, bImplementation, bDontAdd : Boolean;

  // Fixes line
  Procedure FixLine(var s : String);
  var iPos1,iPos2, iPos2a, iPos3, iFix : Integer;
      sOffs, sOpcode, sInstruction : String;

     // Returns the less non zero value from x and y
     function MinNotZ(x,y : Integer) : Integer;
     begin
       if x=0 then begin result:=y; exit; end;
       if y=0 then begin result:=x; exit; end;
       if x<y then result:=x else result:=y;
     end;

  begin
    iPos2:=0;
    iFix:=0;

    // Finds the end possition of the offset string as the
    // possition of the first ':' char
    iPos1:=Pos(':',s);

    // Finds the begin possition of opcode strings as the
    // position of the first '|' or '[' that is greather
    // than iPos1+8 and replaces all sooner met '|' or '['
    // with space
    While iPos2<iPos1+8 do
     begin
       iPos2:=Pos('|',s);
       iPos2a:=Pos('[',s);
       iPos2:=MinNotZ(iPos2,iPos2a);
       if iPos2<>0
          then s[iPos2]:=' '
          else break;
     end;

   // Finds the start possition of the instruction string
   // as the possition of the next '|'
   iPos3:=Pos('|',s);

   // Fixes offset stirng
   sOffs:=Copy(s,1,iPos1-1);
   While Copy(sOffs,1,1)=' ' do
     begin
       sOffs:=Copy(sOffs,2,Length(sOffs)-1);
       Inc(iFix)
     end;
   While Length(sOffs)<8 do sOffs:='0'+sOffs;

   // Fixes opcode string
   sOpcode:=Trim(Copy(s,iPos2+1,iPos3-iPos2-1));
   While Length(sOpcode)<3*10 do sOpcode:=sOpcode+' ';

   // Fixes Instruction and Offset string if bRemoveInstruction is
   // set to True
   if bRemoveInstructions
     then sInstruction:=''
     else begin
       sInstruction:=Trim(Copy(s,iPos3+1,Length(s)-iPos3));
       for iPos2:=0 to iFix Do sOffs:=' '+sOffs;
     end;

   // Makes the resulting fixed line
   s:=Format('%s : %s%s',[sOffs,sOpcode,sInstruction]);
  end;

var iPos1, iPos2, iParensCount : Integer;
    bDeclarationContinue : Boolean;

  procedure CalsParens(s : String);
  var k : Integer;
  begin
    for k:=1 to Length(s) do
     begin
       if s[k]='(' then Inc(iParensCount);
       if s[k]=')' then Dec(iParensCount);
     end;
   if iParensCount<0 then iParensCount:=0;  
  end;

var bClass : Boolean;  

begin
  iLevel:=0;
  iParensCount:=0;
  bDontProcess:=False;
  bDontAdd:=False;
  bEnd:=False;
  bBegin:=False;
  bImplementation:=False;
  bDeclarationContinue:=False;
  bClass:=False;

  // Read all the lines, makes a simple parse and
  // fixes them if needed
  For i:=0 to list.Count-1 do
    begin
      bDontProcess:=False;
      s:=list[i];

      if Pos('implementation'#10#13,s+#10#13)<>0
        then begin
          bImplementation:=True;
          iLevel:=0;
          // 'implementation' is always added
          continue;
        end;


      iPos1:=Pos('begin'#10#13,s+#10#13);
      if (iPos1<>0) and ((iPos1=1) or (s[iPos1-1]=' '))
        then begin
          bDontProcess:=True;
          bBegin:=True;
          bEnd:=False;
          inc(iLevel);
        end;

      iPos1:=Pos('end;'#10#13,s+#10#13);
      if (iPos1<>0) and ((iPos1=1) or (s[iPos1-1]=' ')) and (not bClass)
        then begin
          bDontProcess:=True;
          bEnd:=True;
          bBegin:=False;
          dec(iLevel);
        end;

       if   (Pos('=class',s)<>0)
         or (Pos('=object',s)<>0)
         or (Pos('=record',s)<>0)
         or (Pos('=interface',s)<>0)
         or (Pos(': record',s)<>0)
         or (Pos(': object',s)<>0)
         or (Pos(': interface',s)<>0)
         or (Pos('^record',s)<>0)
         or (Pos(': ^record',s)<>0)
         or (Pos(' of record',s)<>0) {Array [] of record}
        then begin
          // it is class (needs increasing level)
          // if its not 'TBlah = class of Blha;' declaration
          bClass:=Pos('=class of ',s)=0;
          if bClass then Inc(iLevel);
          bDontProcess:=True;
        end;


      if (bClass) and ((Pos('end;',s)<>0) or (Pos('end);',s)<>0)) then
        begin
          bClass:=False;
          dec(iLevel);
          bDontProcess:=True;
        end;

      // If we are in the implementation part and bRemoveInstructions
      // is set to true we should perform some preparation for parsing
      // excluding all lines that could make mess for dcu.2.int parser
      // only code, 'begin', 'end', and function/procedure declarations
      // should left
      if (not bClass) then
        if bRemoveInstructions then
          if bImplementation then
            begin
              s:=Trim(s);
              bDontAdd:=not (bBegin or ((bEnd) and (bDontProcess)));

              if (Pos('procedure ',s)=1) or (Pos('function ',s)=1) or (bDeclarationContinue) then
                begin
                  // If we have procedure declaration let it stay in the output
                  // and try to find where it finishes by the first ';' of
                  bDontAdd:=False;

                  // Changes iParensCount
                  CalsParens(s);

                  iPos1:=Pos(';',s);
                  iPos2:=Pos(')',s);

                  // The declaration do not have parameters so the end of
                  // declaration is on the same line
                  bDeclarationContinue:= not ((iParensCount=0));
                end;
            end
            //Add only the implementation part
            else bDontAdd:=True
        else bDontAdd:=bRemoveInstructions;    

      // Fix the line if neseccary! This must be applied only
      // for the procedures boddy
      if (iLevel>0) and (not bDontProcess) and (bImplementation) and (not bClass)
          // The fix it!
          then FixLine(s);

      // and add it
      if bDontAdd then s:='';

      list[i]:=s;
    end;

   // If preprocessing for dcu.2.int parsing is enabled
   // remove all
   if bRemoveInstructions then
     for i:=list.count-1 downto 0 do
        if list[i]='' then list.Delete(i)
end;

var FNRes : String;

procedure ProcessFile(FN: String; SaveOut : TStrings; bRemoveInstructions : Boolean = False; bApplyFixes : Boolean = True);
var
  U: TUnit;
  ExcS: String;
  OutRedir: boolean;

  function VerifyParse : Boolean;
  var i, j : Integer;
  begin
    Result:=True;
    j:=0;
    For i:=0 To SaveOut.Count-1 Do
     begin
       Result:=Result and ((SaveOut[i]+'0')[1] in ['i','f','p','b','e','0']);
       case (SaveOut[i]+'0')[1] of
        'b': Inc(j);
        'e': Dec(j);
       end;
     end;
    Result:=Result and (j=0);
    if j<>0 then GlobPreParseWarning:=j
            else GlobPreParseWarning:=-1;
  end;


  //  This proc seeks for more than one 'end;' line one
  //after another and remove them. This could happen
  //because of pre-parser bugs
  procedure FixEnds;
  var i{, LevelCntr} : Integer;
      bEnd : Boolean;
  begin
    // Seeks nulls just in case and removes them
    // Also removes all trash lines (this completely fixes all pre-parser problems)
    For i:=SaveOut.Count-1 downto 0 do
      if (SaveOut[i]='') or (not ((SaveOut[i]+'0')[1] in ['i','f','p','b','e','0']))
         then SaveOut.Delete(i);

    For i:=SaveOut.Count-1 downto 0 do
     begin
      if SaveOut[i]='end;'
       then if bEnd
              then SaveOut.Delete(i+1)
              else bEnd:=True

       // This happens in complicated class declrations
       // in procedure body
       else if (Pos('procedure',SaveOut[i])<>0) or (Pos('function',SaveOut[i])<>0) or (Pos('implementation',SaveOut[i])<>0)
            then begin
              if bEnd then SaveOut.Delete(i+1);
              bEnd:=False;
            end
            else bEnd:=False;
     end;

    // This shit is here because im too lazy to
    // imrove the pre-parser. The lines above
    // removes every 'end;' that is before the 'begin'
    // This can happen if there is type definition
    // in procedure/function
    For i:=SaveOut.Count-1 downto 0 do
     begin
      if (SaveOut[i]='end;')
       then if bEnd
                    // check to not fuck up procedures in procedures
                    // Not possible to have null line so [1] always exists 
               then if SaveOut[i-1][1]<>'0'
                       then SaveOut.Delete(i)
                       else
               else bEnd:=True
       else if SaveOut[i]='begin'
               then bEnd:=True
               else bEnd:=False;
    end;
  end;

begin
  // Adjust max width lenth in the case of
  // pre-parsing (255) and (75) in DCU2INT
  if bRemoveInstructions
    then DCU_Out.MaxOutWidth:=255
    else DCU_Out.MaxOutWidth:=75;


  OutRedir := false;
  if FNRes<>'-' then begin
    if FNRes='' then
      FNRes := ChangeFileExt(FN,'.int')
    else
      FNRes := ReplaceStar(FNRes,FN);
    AssignFile(glob_file,FNRes);
    OutRedir := true;
  end ;
  try
    try
      Rewrite(glob_file); //Test whether the FNRes is a correct file name
      try
        InitOut;
        U := GetDCUByName(FN,0,0){TUnit.Create(FN)};
        U.Show;
      finally
        FreeDCU;
      end ;
    except
      on E: Exception do begin
        ExcS := Format('%s: "%s"',[E.ClassName,E.Message]);
        if TTextRec(glob_file).Mode<>fmClosed then begin
        end ;
        if OutRedir then
          Writeln(glob_file,ExcS);
      end ;
    end ;
  finally
    if OutRedir then
      Close(glob_file);
    SaveOut.LoadFromFile(FNRes);

    if bApplyFixes then
      begin
        FixDCUOutPutFormat(SaveOut, bRemoveInstructions);
      end;

    if bRemoveInstructions then
      begin
        FixEnds;
        GlobPreParsOK:=VerifyParse;
      end;

    DeleteFile(FNRes);
  end ;
end ;


end.

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
黄页网站大全一区二区| 成人免费视频免费观看| 欧美日韩三级一区| 亚洲图片欧美一区| 日韩视频123| 国产一区二区三区观看| 国产三级精品三级| 日本精品裸体写真集在线观看| 夜夜操天天操亚洲| 日韩一区二区在线看片| 激情图片小说一区| 亚洲人吸女人奶水| 91精品国产综合久久久久久| 精品一区二区三区免费| 国产精品久久久久国产精品日日| 97se亚洲国产综合自在线| 夜色激情一区二区| 久久在线观看免费| 91黄色免费看| 久久99深爱久久99精品| 亚洲综合图片区| 国产欧美一区二区三区在线看蜜臀 | 日本一区二区在线不卡| 国产寡妇亲子伦一区二区| 亚洲视频在线观看三级| 欧美精品18+| 99久久er热在这里只有精品15 | 国内精品久久久久影院薰衣草| 中文字幕免费在线观看视频一区| 欧美猛男gaygay网站| 国产精品一二三四| 蜜臀a∨国产成人精品| 国产精品美女一区二区在线观看| 在线播放欧美女士性生活| 97久久人人超碰| 精品一区二区在线观看| 亚洲第四色夜色| 自拍偷拍国产精品| 久久午夜色播影院免费高清| 精品污污网站免费看| 91视频xxxx| 成人美女视频在线观看| 久久草av在线| 日本vs亚洲vs韩国一区三区| 亚洲精品高清视频在线观看| 亚洲欧洲另类国产综合| 欧美极品美女视频| 久久久欧美精品sm网站| 精品日韩成人av| 日韩视频免费观看高清完整版在线观看 | 欧美制服丝袜第一页| 国产激情视频一区二区在线观看| 日韩激情一区二区| 亚洲国产毛片aaaaa无费看| 中文字幕中文字幕中文字幕亚洲无线| 日韩一区二区免费电影| 欧美精品aⅴ在线视频| 3d动漫精品啪啪一区二区竹菊| 成人福利视频网站| av在线不卡免费看| 99久久精品国产麻豆演员表| 国产成a人无v码亚洲福利| 国产91精品一区二区麻豆亚洲| 国精品**一区二区三区在线蜜桃| 久久av资源站| 国产精品一级在线| 不卡的看片网站| 色婷婷狠狠综合| 欧美理论在线播放| 欧美哺乳videos| 久久久精品2019中文字幕之3| 久久精品人人做| 日韩一区在线播放| 亚洲第一搞黄网站| 青娱乐精品在线视频| 韩国成人精品a∨在线观看| 国产河南妇女毛片精品久久久 | 国产精品一区二区久久精品爱涩| 国产精品538一区二区在线| 国产伦精品一区二区三区在线观看 | 久久99精品久久只有精品| 秋霞影院一区二区| 国产精华液一区二区三区| 97久久精品人人做人人爽50路| 91在线porny国产在线看| 欧美日韩国产成人在线91| 精品国产一区二区在线观看| 国产精品免费av| 五月婷婷激情综合网| 国产成人av一区二区三区在线观看| 国产精品69久久久久水密桃| 99久久伊人网影院| 欧美日韩高清影院| 久久午夜电影网| 亚洲综合在线电影| 国产麻豆视频精品| 欧美三级蜜桃2在线观看| 精品裸体舞一区二区三区| 自拍偷拍亚洲综合| www.久久精品| 欧美一区二区视频在线观看| 国产日韩亚洲欧美综合| 天堂影院一区二区| av激情亚洲男人天堂| 欧美一级夜夜爽| 亚洲人成亚洲人成在线观看图片| 奇米精品一区二区三区在线观看| 99久久99精品久久久久久| 91.xcao| 一区二区三区精品视频| 国产成人自拍高清视频在线免费播放| 欧美三区免费完整视频在线观看| 国产亚洲午夜高清国产拍精品 | 91精品国产欧美一区二区18| 国产精品色呦呦| 精品在线免费视频| 欧美乱妇15p| 亚洲最大成人网4388xx| fc2成人免费人成在线观看播放| 日韩精品一区二区三区swag| 亚洲mv在线观看| 91精品福利视频| 一区视频在线播放| 成人高清伦理免费影院在线观看| 欧美大白屁股肥臀xxxxxx| 爽爽淫人综合网网站| 色狠狠色狠狠综合| 亚洲欧美日韩国产综合| 大桥未久av一区二区三区中文| 精品国产不卡一区二区三区| 日韩精品福利网| 4438成人网| 美女在线视频一区| 日韩一级黄色大片| 麻豆精品一区二区综合av| 日韩一区二区在线播放| 免费成人在线视频观看| 欧美一区二区三区在线视频| 日韩电影免费在线看| 欧美日韩视频第一区| 五月婷婷久久丁香| 日韩欧美中文字幕一区| 久久精品国产精品亚洲精品| 精品久久久三级丝袜| 国产麻豆精品95视频| 欧美国产一区视频在线观看| 不卡一区二区三区四区| 国产精品夫妻自拍| 91国产丝袜在线播放| 亚洲成av人片www| 日韩午夜小视频| 国产sm精品调教视频网站| 综合久久综合久久| 欧美在线不卡视频| 美女mm1313爽爽久久久蜜臀| 精品国产电影一区二区| 北条麻妃国产九九精品视频| 亚洲成av人片在线| 日韩午夜小视频| 成人精品免费看| 亚洲制服丝袜av| 日韩欧美自拍偷拍| 波多野结衣中文字幕一区| 亚洲图片欧美一区| 国产视频一区在线播放| 色88888久久久久久影院野外| 亚洲成a人v欧美综合天堂| 久久久久久电影| 欧美日韩三级在线| 成人午夜av在线| 午夜激情久久久| 国产精品人成在线观看免费 | 日韩欧美在线综合网| 成人网在线免费视频| 亚洲不卡av一区二区三区| 久久久久久久久久久久电影| 欧洲精品在线观看| 精品综合免费视频观看| 一区二区三区.www| 亚洲国产成人在线| 日韩一级免费观看| 91成人网在线| 成人午夜视频福利| 久久er99精品| 婷婷中文字幕一区三区| 中文字幕永久在线不卡| 欧美tk—视频vk| 欧美高清视频不卡网| 色综合天天综合在线视频| 韩国欧美国产1区| 偷拍日韩校园综合在线| 亚洲丝袜精品丝袜在线| 精品av综合导航| 91精品国产综合久久香蕉麻豆| 91在线国产福利| 粉嫩一区二区三区在线看| 久久精品国内一区二区三区| 午夜精品久久久久影视| 亚洲精品视频一区| 亚洲啪啪综合av一区二区三区|