SmCrEncCleanup

VOID __stdcall SmCrEncCleanup(_SMCR_ENCRYPT_CONTEXT *EncryptCtx, _LOOKASIDE_LIST_EX *a2){
  _PRIVILEGE_SET *v3; 
  __int64 v4; 
  _PRIVILEGE_SET *v5; 
  _PRIVILEGE_SET *v6; 

  v3 = (_PRIVILEGE_SET *)*((_QWORD *)EncryptCtx + 2);
  if( v3 )
    CmSiFreeMemory(v3);
  v4 = *((_QWORD *)EncryptCtx + 4);
  if( v4 )
    BCryptDestroyKey(v4);
  v5 = (_PRIVILEGE_SET *)*((_QWORD *)EncryptCtx + 5);
  if( v5 )
    CmSiFreeMemory(v5);
  v6 = (_PRIVILEGE_SET *)*((_QWORD *)EncryptCtx + 6);
  if( v6 )
    CmSiFreeMemory(v6);
  if( *(_QWORD *)EncryptCtx )
    BCryptCloseAlgorithmProvider(*(_QWORD *)EncryptCtx, (UINT32)a2);
}

Referenced by:

ST_STORE::StCleanup