ExInitializeNPagedLookasideListInternal
VOID __stdcall ExInitializeNPagedLookasideListInternal(
_NPAGED_LOOKASIDE_LIST *Lookaside,
VOID **Allocate,
POOL_TYPE a3,
UINT64 a4,
UINT64 a5,
VOID *Free,
VOID *a7,
INT64 Flags,
UINT64 Size,
INT64 Tag,
INT64 Depth,
INT64 FixedDepth){
_POOL_TYPE v12;
VOID *(__stdcall *v13)(PVOID, UINT32);
unsigned __int64 v16;
_LIST_ENTRY *v17;
_LIST_ENTRY *p_ListEntry;
v12 = (int)a4;
v13 = *(VOID *(__stdcall **)(PVOID, UINT32))&a3;
InitializeSListHead(&Lookaside->L.ListHead);
Lookaside->L.Depth = ExMinimumLookasideDepth;
Lookaside->L.MaximumDepth = 256;
Lookaside->L.Tag = (unsigned int)Free;
Lookaside->L.Size = a5;
*(_QWORD *)&Lookaside->L.TotalAllocates = 0i64;
*(_QWORD *)&Lookaside->L.TotalFrees = 0i64;
Lookaside->L.Type = v12;
if( !Allocate )
Allocate = (VOID **)ExAllocatePoolWithTag;
Lookaside->L.AllocateEx = (void *(__fastcall *)(_POOL_TYPE, unsigned __int64, unsigned int, _LOOKASIDE_LIST_EX *))Allocate;
if( !v13 )
v13 = ExFreePoolWithTag;
Lookaside->L.FreeEx = (void(__fastcall *)(void *, _LOOKASIDE_LIST_EX *))v13;
*(_QWORD *)&Lookaside->L.LastTotalAllocates = 0i64;
v16 = (unsigned __int8)KeAcquireSpinLockRaiseToDpc((UINT64 *)&WheapDeferredInternalLogsEventLock + 360);
if( (_DWORD)Flags )
{
Lookaside->L.MaximumDepth = -1;
Lookaside->L.Depth = (unsigned __int16)a7;
}
else if( !ExMinimumLookasideDepth )
{
*(_DWORD *)&Lookaside->L.Depth = -65536;
}
v17 = (_LIST_ENTRY *)*(&WheapDeferredInternalLogsEventLock + 355);
p_ListEntry = &Lookaside->L.ListEntry;
if( (_UNKNOWN *)**(&WheapDeferredInternalLogsEventLock + 355) != (_UNKNOWN *)((char *)&WheapDeferredInternalLogsEventLock
+ 2832) )
__fastfail(3u);
p_ListEntry->Flink = (_LIST_ENTRY *)((char *)&WheapDeferredInternalLogsEventLock + 2832);
p_ListEntry->Blink = v17;
v17->Flink = p_ListEntry;
*(&WheapDeferredInternalLogsEventLock + 355) = p_ListEntry;
KxReleaseSpinLock((UINT64 *)&WheapDeferredInternalLogsEventLock + 360);
__writecr8(v16);
}Referenced by:
CcInitializeCacheManager
MiInitNucleus