RaiseException

VOID __stdcall RaiseException(
        UINT64 dwExceptionCode,
        UINT64 dwExceptionFlags,
        UINT64 nNumberOfArguments,
        UINT64 *lpArguments){
  char v4; 
  unsigned int v5; 
  int v6; 
  INT64 v8; 
  INT64 v9; 
  INT64 v10; 
  _EXCEPTION_RECORD ExceptionRecord; 
  UINT64 v12; 

  v4 = dwExceptionFlags;
  v5 = nNumberOfArguments;
  v6 = dwExceptionCode;
  memset(&ExceptionRecord.NumberParameters + 1, 0i64, 0x7Cu);
  HIDWORD(ExceptionRecord.ExceptionRecord) = 0;
  ExceptionRecord.ExceptionAddress = RaiseException;
  ExceptionRecord.ExceptionCode = v6;
  *(_QWORD *)&ExceptionRecord.ExceptionFlags = v4 & 1;
  if( lpArguments )
  {
    if( v5 > 0xF )
      v5 = 15;
    ExceptionRecord.NumberParameters = v5;
    if( v5 )
      memmove(ExceptionRecord.ExceptionInformation, lpArguments, 8 * v5);
  }
  else
  {
    ExceptionRecord.NumberParameters = 0;
  }
  RtlRaiseException(
    (INT64)&ExceptionRecord,
    v8,
    v9,
    v10,
    *(INT64 *)&ExceptionRecord.ExceptionCode,
    (INT64)ExceptionRecord.ExceptionRecord,
    (INT64)ExceptionRecord.ExceptionAddress,
    *(INT64 *)&ExceptionRecord.NumberParameters,
    ExceptionRecord.ExceptionInformation[0],
    ExceptionRecord.ExceptionInformation[1],
    ExceptionRecord.ExceptionInformation[2],
    ExceptionRecord.ExceptionInformation[3],
    ExceptionRecord.ExceptionInformation[4],
    ExceptionRecord.ExceptionInformation[5],
    ExceptionRecord.ExceptionInformation[6],
    ExceptionRecord.ExceptionInformation[7],
    ExceptionRecord.ExceptionInformation[8],
    ExceptionRecord.ExceptionInformation[9],
    ExceptionRecord.ExceptionInformation[10],
    ExceptionRecord.ExceptionInformation[11],
    ExceptionRecord.ExceptionInformation[12],
    ExceptionRecord.ExceptionInformation[13],
    ExceptionRecord.ExceptionInformation[14],
    v12);
}

Referenced by:

raise_exc_ex