VfDriverEnableVerifierForAll
NTSTATUS __stdcall VfDriverEnableVerifierForAll(){
int v0;
_KLDR_DATA_TABLE_ENTRY *i;
VOID *DllBase;
_VF_SUSPECT_DRIVER_ENTRY *Entry;
_VF_SUSPECT_DRIVER_ENTRY *v4;
UINT64 EntryInserted;
__int64 v7;
v7 = 0i64;
v0 = 0;
LODWORD(EntryInserted) = 0;
VfDriverLock();
ExAcquireResourceSharedLite((UINT64)&PsLoadedModuleResource, 1);
for( i = *(_KLDR_DATA_TABLE_ENTRY **)PsLoadedModuleList;
i != (_KLDR_DATA_TABLE_ENTRY *)&PsLoadedModuleList;
i = (_KLDR_DATA_TABLE_ENTRY *)i->InLoadOrderLinks.Flink )
{
if( !VfUtilIsProtectedDriver(&i->BaseDllName) )
{
DllBase = i->DllBase;
if( MmIsSessionAddress(DllBase) || (int)RtlImageNtHeaderEx(1, (unsigned __int64)DllBase, 0i64, &v7) >= 0 )
{
Entry = VfSuspectDriversAllocateEntry(&i->BaseDllName);
v4 = Entry;
if( !Entry )
{
v0 = -1073741670;
break;
}
LODWORD(EntryInserted) = 0;
v0 = VfDriverEnableVerifier(Entry, i, &EntryInserted);
if( !(_DWORD)EntryInserted )
ExFreePoolWithTag(v4, 0);
if( v0 < 0 )
break;
}
}
}
ExReleaseResourceLite(&PsLoadedModuleResource);
ViDriversLoadLockOwner = 0i64;
KeReleaseMutex(&ViDriversLoadLock, 0);
return v0;
}Referenced by:
VfAddVerifierEntry