Код:
Function DelAppInit_DLLsByFileName(Name : string) : boolean;
const
RegKey = 'Software\Microsoft\Windows NT\CurrentVersion\Windows';
var
AppInit_DLLs,Temp_AppInit_DLLs,Temp : string;
n,p : integer;
begin
Result := false;
Name := LowerCase(Name); AppInit_DLLs := ''; n := 0; p := 0;
Temp_AppInit_DLLs := StringReplace(LowerCase(RegKeyStrParamRead('HKLM', RegKey, 'AppInit_DLLs')), ',', ' ') + ' ';
if (Temp_AppInit_DLLs = ' ') or (pos(Name, Temp_AppInit_DLLs) = 0) then exit;
Temp := Temp_AppInit_DLLs;
while pos(Name, Temp) > 0 do
begin
Inc(p);
Delete(Temp, pos(Name, Temp), Length(Name));
end;
Temp := '';
while pos(' ', Temp_AppInit_DLLs) > 0 do
begin
If Copy(Temp_AppInit_DLLs, 1, pos(' ', Temp_AppInit_DLLs) - 1) <> '' then
begin
If n > 1 then Temp := Temp + ',';
If pos(':\', Copy(Temp_AppInit_DLLs, 1, pos(' ', Temp_AppInit_DLLs) - 1)) > 0 then Temp := Temp + ',';
If pos('.', Copy(Temp_AppInit_DLLs, 1, pos(' ', Temp_AppInit_DLLs) - 1)) > 0 then
Temp := Temp + Copy(Temp_AppInit_DLLs, 1, pos(' ', Temp_AppInit_DLLs) - 1) + ',' else Temp := Temp + Copy(Temp_AppInit_DLLs, 1, pos(' ', Temp_AppInit_DLLs));
n := 0;
end;
Delete(Temp_AppInit_DLLs, 1, pos(' ', Temp_AppInit_DLLs)); Inc(n);
end;
while (pos(',,', Temp) > 0) or (pos(' ,', Temp) > 0) do Temp := StringReplace(StringReplace(Temp, ',,', ','), ' ,', ',');
while (pos(Copy(Temp, 1, 1), ' ,') > 0) do Delete(Temp, 1, 1);
while (pos(Copy(Temp, Length(Temp), 1), ' ,') > 0) do Delete(Temp, Length(Temp), 1);
Temp_AppInit_DLLs := Temp + ',';
Temp := '';
while pos(',', Temp_AppInit_DLLs) > 0 do
begin
If Copy(Temp_AppInit_DLLs, 1, pos(',', Temp_AppInit_DLLs) - 1) <> '' then
If pos('\', Copy(Temp_AppInit_DLLs, 1, pos(',', Temp_AppInit_DLLs) - 1)) > 0 then
Temp := Temp + Copy(Temp_AppInit_DLLs, 1, pos(',', Temp_AppInit_DLLs)) else Temp := Temp + StringReplace(Copy(Temp_AppInit_DLLs, 1, pos(',', Temp_AppInit_DLLs)), ' ', ',');
Delete(Temp_AppInit_DLLs, 1, pos(',', Temp_AppInit_DLLs));
end;
Temp_AppInit_DLLs := Temp + ',';
while pos(',', Temp_AppInit_DLLs) > 0 do
begin
If Copy(Temp_AppInit_DLLs, 1, pos(',', Temp_AppInit_DLLs) - 1) <> '' then
If (Copy(Temp_AppInit_DLLs, 1, pos(',', Temp_AppInit_DLLs) - 1) = Name) or ((p <= 1) and (ExtractFileName(Copy(Temp_AppInit_DLLs, 1, pos(',', Temp_AppInit_DLLs) - 1)) = Name)) then
AppInit_DLLs := AppInit_DLLs else AppInit_DLLs := AppInit_DLLs + Copy(Temp_AppInit_DLLs, 1, pos(',', Temp_AppInit_DLLs));
Delete(Temp_AppInit_DLLs, 1, pos(',', Temp_AppInit_DLLs));
end;
If Copy(AppInit_DLLs, Length(AppInit_DLLs), 1) = ',' then Delete(AppInit_DLLs, Length(AppInit_DLLs), 1);
RegKeyStrParamWrite('HKEY_LOCAL_MACHINE', RegKey, 'AppInit_DLLs', AppInit_DLLs);
If RegKeyStrParamRead('HKLM', RegKey, 'AppInit_DLLs') = AppInit_DLLs then Result := true;
end;
begin
SearchRootkit(true, true);
SetAVZGuardStatus(True);
DeleteFileMask(GetAVZDirectory+'Quarantine', '*.*', true); {ClearQuarantine;}
DelAppInit_DLLsByFileName('0');
RegKeyStrParamWrite('HKLM', 'SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon', 'UserInit', GetEnvironmentVariable ('WinDir')+'\System32\userinit.exe,'); {восстановление userinit}
DeleteFileMask('C:\WINDOWS\TEMP\', '*.*', true);
DeleteFileMask(GetEnvironmentVariable ('Temp'), '*.*', true);
BC_ImportAll;
ExecuteSysClean;
SetAVZPMStatus(true);
RebootWindows(true);
end.
Система перезагрузится.