VslInitializeEnclave

NTSTATUS __stdcall VslInitializeEnclave(
        INT64 a1,
        INT64 a2,
        INT64 a3,
        INT64 a4,
        VOID **NextTargetSid,
        UINT64 *RemainingTargetSufferSize){
  unsigned int v9; 
  NTSTATUS result; 
  int v11; 
  INT64 v12[10]; 
  INT64 v13[14]; 
  _DWORD *v14; 

  v9 = a4;
  memset(v13, 0i64, 0x68u);
  memset(v12, 0i64, 0x48u);
  result = VslpLockPagesForTransfer((INT64)v12, a3, v9, 0i64, 0);
  if( result >= 0 )
  {
    v13[3] = v12[0];
    v13[4] = v12[7];
    v13[5] = (INT64)NextTargetSid;
    v13[6] = (INT64)RemainingTargetSufferSize;
    v13[1] = a1;
    v13[2] = a2;
    v11 = VslpEnterIumSecureMode(2u, 48, 0i64, (INT64)v13);
    if( v11 >= 0 )
      *v14 = v13[2];
    VslpUnlockPagesForTransfer((INT64 **)v12);
    return v11;
  }
  return result;
}

Referenced by:

PsInitializeVsmEnclave