SepBlockAccessForLogonSession
NTSTATUS __stdcall SepBlockAccessForLogonSession(_LUID *LogonId){
INT64 v1;
__int64 v3;
__int64 v4;
_ETHREAD *CurrentThread;
_ERESOURCE *v6;
NTSTATUS v7;
v3 = (1529154084 * LogonId->LowPart) >> 28;
v4 = SepLogonSessions + 8 * v3;
CurrentThread = (_ETHREAD *)KeGetCurrentThread();
--CurrentThread->Tcb.KernelApcDisable;
v6 = &stru_140CEC5A0 + (v3 & 3);
ExAcquireResourceExclusiveLite((UINT64)v6, 1, v1);
v7 = 0;
while( 1 )
{
v4 = *(_QWORD *)v4;
if( !v4 )
break;
if( *(_EJOB **)(v4 + 160) == PsGetCurrentServerSilo()
&& LogonId->LowPart == *(_DWORD *)(v4 + 8)
&& LogonId->HighPart == *(_DWORD *)(v4 + 12) )
{
*(_DWORD *)(v4 + 32) |= 0x20u;
goto LABEL_7;
}
}
v7 = -1073741729;
LABEL_7:
ExReleaseResourceLite(v6);
KeLeaveCriticalRegionThread(KeGetCurrentThread());
return v7;
}Referenced by:
SepRmInteractiveLogoffLogonSessionCompletedWrkr