CmpRemoveSubKeyCellNoCellRef
UINT8 __stdcall CmpRemoveSubKeyCellNoCellRef(_HHIVE *Hive, UINT64 Parent, UINT64 Child){
unsigned int v4;
UINT8 v5;
unsigned int v6;
_CELL_DATA *v7;
_CELL_DATA *v8;
unsigned int v9;
_CELL_DATA *v10;
unsigned int v11;
unsigned int *p_LastWriteTime;
_CELL_DATA *v13;
UINT16 v14;
UINT64 v15;
UINT16 v16;
unsigned int BugCheckParameter3;
unsigned int BugCheckParameter3_4;
unsigned int Flags;
int v22[2];
int v23[2];
int v24[4];
UINT16 v25;
unsigned int v26;
UINT16 CellInIndex;
v26 = Child;
v24[1] = 0;
v4 = Child;
v24[0] = -1;
v23[0] = -1;
v5 = 1;
v23[1] = 0;
v22[0] = -1;
v22[1] = 0;
v6 = Parent;
v7 = 0i64;
v8 = Hive->GetCellRoutine(Hive, Parent, v24);
if( v8 )
{
if( !HvpMarkCellDirty((UINT64)Hive, v6, 0) )
{
v5 = 0;
LABEL_34:
Hive->ReleaseCellRoutine(Hive, (_HV_GET_CELL_CONTEXT *)v24);
return v5;
}
v9 = v8->u.KeyNode.SubKeyLists[0];
BugCheckParameter3 = v9;
v10 = Hive->GetCellRoutine(Hive, v9, v23);
if( !v10 )
{
v5 = 0;
goto LABEL_34;
}
if( v10->u.KeyNode.Signature == 26994 )
{
v11 = 0;
Flags = v10->u.KeyNode.Flags;
if( v10->u.KeyNode.Flags )
{
p_LastWriteTime = (unsigned int *)&v10->u.KeyNode.LastWriteTime;
do
{
if( v11 )
Hive->ReleaseCellRoutine(Hive, (_HV_GET_CELL_CONTEXT *)v22);
BugCheckParameter3_4 = *p_LastWriteTime;
v13 = Hive->GetCellRoutine(Hive, *p_LastWriteTime, v22);
v7 = v13;
if( !v13 )
goto LABEL_23;
CellInIndex = CmpFindCellInIndex(v13, v26);
v25 = v7->u.KeyNode.Flags;
if( CellInIndex < v25 )
{
if( !HvpMarkCellDirty((UINT64)Hive, BugCheckParameter3_4, 0)
|| v25 == 1 && !HvpMarkCellDirty((UINT64)Hive, BugCheckParameter3, 0) )
{
v5 = 0;
goto LABEL_30;
}
CmpRemoveCellFromIndex(v7, CellInIndex);
if( v25 == 1 )
{
v14 = CmpFindCellInIndex(v10, BugCheckParameter3_4);
CmpRemoveCellFromIndex(v10, v14);
Hive->ReleaseCellRoutine(Hive, (_HV_GET_CELL_CONTEXT *)v22);
v7 = 0i64;
HvFreeCell((UINT64)Hive, BugCheckParameter3_4);
if( !v10->u.KeyNode.Flags )
{
Hive->ReleaseCellRoutine(Hive, (_HV_GET_CELL_CONTEXT *)v23);
v15 = BugCheckParameter3;
goto LABEL_27;
}
}
break;
}
++v11;
++p_LastWriteTime;
}
while( v11 < Flags );
}
}
else
{
v16 = CmpFindCellInIndex(v10, v4);
if( !HvpMarkCellDirty((UINT64)Hive, v9, 0) )
{
LABEL_23:
v5 = 0;
LABEL_32:
if( v10 )
Hive->ReleaseCellRoutine(Hive, (_HV_GET_CELL_CONTEXT *)v23);
goto LABEL_34;
}
CmpRemoveCellFromIndex(v10, v16);
if( !v10->u.KeyNode.Flags )
{
Hive->ReleaseCellRoutine(Hive, (_HV_GET_CELL_CONTEXT *)v23);
v15 = v9;
LABEL_27:
v10 = 0i64;
HvFreeCell((UINT64)Hive, v15);
}
}
if( v8->u.KeyNode.SubKeyCounts[0]-- == 1 )
{
v8->u.KeyNode.SubKeyLists[0] = -1;
v8->u.KeyString[26] = 0;
v8->u.KeyNode.MaxClassLen = 0;
}
LABEL_30:
if( v7 )
Hive->ReleaseCellRoutine(Hive, (_HV_GET_CELL_CONTEXT *)v22);
goto LABEL_32;
}
return 0;
}Referenced by:
CmpCheckRegistry2