CmpLightWeightCommitSetSecDescUoW

void __fastcall CmpLightWeightCommitSetSecDescUoW(__int64 a1, _QWORD *a2){
  __int64 v4; 
  _DWORD *v5; 
  UINT64 v6; 
  __int64 v7; 
  unsigned int v8; 
  __int64 v9; 
  int v10; 
  int v11; 
  int v12; 
  int v13; 
  int v14; 
  v14 = 0;
  v12 = 0;
  v4 = *(_QWORD *)(a1 + 48);
  v5 = *(_DWORD **)(a1 + 104);
  v13 = -1;
  v11 = -1;
  v6 = *(_QWORD *)(v4 + 32);
  v7 = (*(__int64(__fastcall **)(UINT64, _QWORD, int *))(v6 + 8))(v6, *(unsigned int *)(v4 + 40), &v13);
  v8 = *(_DWORD *)(v7 + 44);
  v9 = (*(__int64(__fastcall **)(UINT64, _QWORD, int *))(v6 + 8))(v6, v8, &v11);
  *(_DWORD *)(v7 + 44) = *v5;
  v10 = *(_DWORD *)(v9 + 12);
  if( v10 == 1 )
  {
    (*(void(__fastcall **)(UINT64, int *))(v6 + 16))(v6, &v11);
    v9 = 0i64;
    CmpRemoveSecurityCellList((_HHIVE *)v6, v8);
    HvFreeCell(v6, v8);
  }
  else
  {
    *(_DWORD *)(v9 + 12) = v10 - 1;
  }
  *(_QWORD *)(v7 + 4) = *a2;
  *(_QWORD *)(*(_QWORD *)(a1 + 48) + 168i64) = *a2;
  ++*(_QWORD *)(*(_QWORD *)(a1 + 48) + 304i64);
  CmpAssignSecurityToKcb(*(_QWORD *)(a1 + 48), *(unsigned int *)(v7 + 44), 0i64, 0, 0);
  (*(void(__fastcall **)(UINT64, int *))(v6 + 16))(v6, &v13);
  if( v9 )
    (*(void(__fastcall **)(UINT64, int *))(v6 + 16))(v6, &v11);
  ExFreePoolWithTag(v5, 0x77554D43u);
  *(_QWORD *)(a1 + 104) = 0i64;
}

Referenced by:

CmpProcessLightWeightUOW