CmpLazyCommitWorker
VOID __stdcall CmpLazyCommitWorker(PVOID Parameter, BYTE *a2){
char v2;
_ETHREAD *CurrentThread;
bool v4;
_ETHREAD *v5;
_ETHREAD *v6;
__int64 *v7;
__int64 v8;
__int64 **v9;
_ETHREAD *v10;
__int64 *v11;
__int64 *v12;
__int64 **v13;
__int64 **v14;
__int64 **v15;
int v16;
v16 = 0;
v15 = (__int64 **)&v14;
v2 = 1;
v14 = (__int64 **)&v14;
CurrentThread = (_ETHREAD *)KeGetCurrentThread();
--*((_WORD *)CurrentThread + 242);
v4 = ExAcquireRundownProtection((PEX_RUNDOWN_REF)&CmpShutdownRundown);
v5 = (_ETHREAD *)KeGetCurrentThread();
if( v4 )
{
--*((_WORD *)v5 + 242);
ExAcquirePushLockSharedEx((UINT64)&CmpShutdownLock, 0i64);
LOCK_HIVE_LOAD();
while( 1 )
{
v6 = (_ETHREAD *)KeGetCurrentThread();
--*((_WORD *)v6 + 242);
ExAcquireFastMutexUnsafe(&CmpTransactionListLock);
v7 = (__int64 *)CmpLazyCommitListHead;
if( *(__int64 **)(CmpLazyCommitListHead + 8) != &CmpLazyCommitListHead
|| (v8 = *(_QWORD *)CmpLazyCommitListHead,
*(_QWORD *)(*(_QWORD *)CmpLazyCommitListHead + 8i64) != CmpLazyCommitListHead) )
{
LABEL_20:
__fastfail(3u);
}
CmpLazyCommitListHead = *(_QWORD *)CmpLazyCommitListHead;
*(_QWORD *)(v8 + 8) = &CmpLazyCommitListHead;
if( v7 == &CmpLazyCommitListHead )
break;
ExReleaseFastMutexUnsafe(&CmpTransactionListLock);
KeLeaveCriticalRegionThread((__int64)KeGetCurrentThread());
if( (int)CmpTransMgrCommit(v7[4], (__int64)(v7 - 4), &v16) < 0 )
{
v9 = v15;
if( *v15 != (__int64 *)&v14 )
goto LABEL_20;
v7[1] = (__int64)v15;
*v7 = (__int64)&v14;
v2 = 0;
*v9 = v7;
v15 = (__int64 **)v7;
}
else
{
CmpCleanupTransactionState(v7[4], v7 - 4, 4i64);
}
}
*(_BYTE *)CmpLazyCommitWorkItemActive = v2 == 0;
ExReleaseFastMutexUnsafe(&CmpTransactionListLock);
KeLeaveCriticalRegionThread((__int64)KeGetCurrentThread());
if( !v2 )
{
v10 = (_ETHREAD *)KeGetCurrentThread();
--*((_WORD *)v10 + 242);
ExAcquireFastMutexUnsafe(&CmpTransactionListLock);
while( 1 )
{
v11 = (__int64 *)v14;
if( v14[1] != (__int64 *)&v14 )
goto LABEL_20;
v12 = *v14;
if( (__int64 **)(*v14)[1] != v14 )
goto LABEL_20;
v14 = (__int64 **)*v14;
v12[1] = (__int64)&v14;
if( v11 == (__int64 *)&v14 )
break;
v13 = (__int64 **)qword_140C47B48;
if( *(__int64 **)qword_140C47B48 != &CmpLazyCommitListHead )
goto LABEL_20;
*v11 = (__int64)&CmpLazyCommitListHead;
v11[1] = (__int64)v13;
*v13 = v11;
qword_140C47B48 = (__int64)v11;
}
ExReleaseFastMutexUnsafe(&CmpTransactionListLock);
KeLeaveCriticalRegionThread((__int64)KeGetCurrentThread());
KiSetTimerEx((_KTIMER *)&CmpLazyCommitTimer, (_LARGE_INTEGER)-300000000i64, 0i64, 0, &CmpLazyCommitDpc);
}
UNLOCK_HIVE_LOAD();
ExReleasePushLockEx((UINT64)&CmpShutdownLock, 0i64);
KeLeaveCriticalRegionThread((__int64)KeGetCurrentThread());
ExReleaseRundownProtection((PEX_RUNDOWN_REF)&CmpShutdownRundown);
v5 = (_ETHREAD *)KeGetCurrentThread();
}
KeLeaveCriticalRegionThread((__int64)v5);
}Referenced by:
No references.