代码拉取完成,页面将自动刷新
unit uFrmMain;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, uPublicFunc, Menus, ComCtrls;
type
TFrmMain = class(TForm)
Button1: TButton;
dlgOpen: TOpenDialog;
Memo1: TMemo;
Button2: TButton;
Button3: TButton;
PageControl1: TPageControl;
TabSheet1: TTabSheet;
TabSheet2: TTabSheet;
TabSheet3: TTabSheet;
MainMenu1: TMainMenu;
mniFile: TMenuItem;
mniOpenFile: TMenuItem;
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
procedure mniOpenFileClick(Sender: TObject);
private
FLGYPEInfo: TLGYPEInfo;
property LGYPEInfo: TLGYPEInfo read FLGYPEInfo write FLGYPEInfo;
{ Private declarations }
public
{ Public declarations }
end;
var
FrmMain: TFrmMain;
implementation
{$R *.dfm}
procedure TFrmMain.Button2Click(Sender: TObject);
var
i: Integer;
sLine: string;
begin
self.Memo1.Lines.Clear;
for i := 0 to FLGYPEInfo.NumberOfSections - 1 do
begin
sLine := 'Name:' + StrPas(Pchar(@FLGYPEInfo.ImageSectionHeaders[i].Name));
self.Memo1.Lines.Add(sLine);
sLine := 'VirtualSize:' + IntToHex(FLGYPEInfo.ImageSectionHeaders[i].Misc.VirtualSize, 8);
self.Memo1.Lines.Add(sLine);
sLine := 'Virtualoffset:' + IntToHex(FLGYPEInfo.ImageSectionHeaders[i].VirtualAddress, 8);
self.Memo1.Lines.Add(sLine);
sLine := 'RawOffsetSize:' + IntToHex(FLGYPEInfo.ImageSectionHeaders[i].SizeOfRawData, 8);
self.Memo1.Lines.Add(sLine);
sLine := 'RawOffset:' + IntToHex(FLGYPEInfo.ImageSectionHeaders[i].PointerToRawData, 8);
self.Memo1.Lines.Add(sLine);
self.Memo1.Lines.Add('');
end;
end;
procedure TFrmMain.Button3Click(Sender: TObject);
var
i, j, iCount, jCount: Integer;
sLine: string;
begin
self.Memo1.Lines.Clear;
iCount := FLGYPEInfo.DllList.Count - 1;
for i := 0 to iCount do
begin
sLine := 'DllName:' + TDllInfo(FLGYPEInfo.DllList[i]).dllName;
self.Memo1.Lines.Add(sLine);
jCount := TDllInfo(FLGYPEInfo.DllList[i]).FuncList.Count - 1;
for j := 0 to jCount do
begin
sLine := ' ' + TDllFuncInfo(TDllInfo(FLGYPEInfo.DllList[i]).FuncList[j]).FuncName;
self.Memo1.Lines.Add(sLine);
end;
end;
end;
procedure TFrmMain.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
if Assigned(FLGYPEInfo) then
begin
FreeAndNil(FLGYPEInfo);
end;
end;
procedure TFrmMain.mniOpenFileClick(Sender: TObject);
begin
if Assigned(FLGYPEInfo) then
begin
FreeAndNil(FLGYPEInfo);
end;
if self.dlgOpen.Execute then
begin
FLGYPEInfo := TLGYPEInfo.Create(self.dlgOpen.FileName);
self.Memo1.Lines.Add(FLGYPEInfo.ImageDosHeaderStr);
end;
end;
end.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。