SmcCacheCreatePrepare
__int64 __fastcall SmcCacheCreatePrepare(__int64 a1){
_ETHREAD *CurrentThread;
int v2;
CurrentThread = (_ETHREAD *)KeGetCurrentThread();
v2 = 0;
--*((_WORD *)CurrentThread + 242);
ExAcquirePushLockExclusiveEx((UINT64)&BugCheckParameter2, 0i64);
if( (dword_140D23140 & 8) == 0 )
{
v2 = SmRegistrationCtxStart((struct DMA_ADAPTER **)&qword_140D233F0);
if( v2 >= 0 )
dword_140D23140 |= 8u;
}
if( (dword_140D23140 & 4) == 0 && (dword_140D23140 & 8) != 0 )
{
v2 = SmcCacheManagerStart(a1, (__int64)qword_140D233F0);
if( v2 >= 0 )
dword_140D23140 |= 4u;
}
if( (_InterlockedExchangeAdd64((volatile signed __int64 *)&BugCheckParameter2, 0xFFFFFFFFFFFFFFFFui64) & 6) == 2 )
ExfTryToWakePushLock((volatile INT64 *)&BugCheckParameter2);
KeAbPostRelease(&BugCheckParameter2);
KeLeaveCriticalRegion();
return(unsigned int)v2;
}Referenced by:
SmcProcessCreateRequest