CmpLightWeightPrepareSetSecDescUoW
INT64 __stdcall CmpLightWeightPrepareSetSecDescUoW(PCM_KCB_UOW UoW){
__int64 v2;
_CM_KEY_CONTROL_BLOCK *KeyControlBlock;
__int64 v4;
unsigned int KeyCell;
_HHIVE *KeyHive;
VOID **PoolWithTag;
VOID **v8;
int SecurityDescriptorNode;
_CM_KEY_NODE *v10;
unsigned int Security;
__int64 v12;
int v14;
int v15[2];
int v16[4];
unsigned int CellIndex;
unsigned int v18;
unsigned int v19;
int v20;
int v21;
v21 = 0;
v15[1] = 0;
v2 = 0i64;
v16[1] = 0;
KeyControlBlock = UoW->KeyControlBlock;
v4 = 0i64;
v20 = -1;
v15[0] = -1;
v16[0] = -1;
KeyCell = KeyControlBlock->KeyHash.KeyCell;
KeyHive = KeyControlBlock->KeyHash.KeyHive;
v19 = KeyCell;
PoolWithTag = ExAllocatePoolWithTag(1ui64, 4ui64, 2002079043i64);
v8 = PoolWithTag;
if( !PoolWithTag )
return(unsigned int)-1073741670;
*(_DWORD *)PoolWithTag = 0;
v10 = (_CM_KEY_NODE *)KeyHive->GetCellRoutine(KeyHive, KeyCell, (_HV_GET_CELL_CONTEXT *)&v20);
if( !v10 )
goto LABEL_4;
if( !HvMarkCellDirty(KeyHive, (PVOID)KeyCell, 1u) )
goto LABEL_13;
v2 = (__int64)KeyHive->GetCellRoutine(KeyHive, UoW->TxSecurityCell, (_HV_GET_CELL_CONTEXT *)v15);
if( !v2
|| (Security = v10->Security,
v12 = (__int64)KeyHive->GetCellRoutine(KeyHive, Security, (_HV_GET_CELL_CONTEXT *)v16),
(v4 = v12) == 0) )
{
LABEL_4:
SecurityDescriptorNode = -1073741670;
LABEL_14:
CmpFreeUnitOfWork(v8);
goto LABEL_15;
}
CellIndex = *(_DWORD *)(v12 + 8);
v18 = *(_DWORD *)(v12 + 4);
if( !HvMarkCellDirty(KeyHive, (PVOID)Security, 1u)
|| !HvMarkCellDirty(KeyHive, (PVOID)CellIndex, 1u)
|| !HvMarkCellDirty(KeyHive, (PVOID)v18, 1u) )
{
LABEL_13:
SecurityDescriptorNode = -1073741443;
goto LABEL_14;
}
LOBYTE(v14) = 1;
SecurityDescriptorNode = CmpGetSecurityDescriptorNode(KeyHive, v19, v10, (void *)(v2 + 20), v14, (unsigned int *)v8);
if( SecurityDescriptorNode < 0 )
goto LABEL_14;
UoW->PrepareDataPointer = v8;
SecurityDescriptorNode = 0;
LABEL_15:
if( v10 )
KeyHive->ReleaseCellRoutine(KeyHive, (_HV_GET_CELL_CONTEXT *)&v20);
if( v2 )
KeyHive->ReleaseCellRoutine(KeyHive, (_HV_GET_CELL_CONTEXT *)v15);
if( v4 )
KeyHive->ReleaseCellRoutine(KeyHive, (_HV_GET_CELL_CONTEXT *)v16);
return(unsigned int)SecurityDescriptorNode;
}Referenced by:
CmpProcessLightWeightUOW