EtwpGetEventNameFromEventMetadata

PSTR __stdcall EtwpGetEventNameFromEventMetadata(PSTR UserDataBlob, UINT64 UserDataSize, UINT16 *NameLength){
  const CHAR *v4; 
  char *v5; 
  UINT16 v6; 
  unsigned __int16 v7; 

  if( (unsigned int)UserDataSize >= 3 )
  {
    v4 = UserDataBlob + 2;
    v5 = &UserDataBlob[(unsigned int)UserDataSize];
    v6 = 0;
    while( v4 != v5 )
    {
      if( *v4++ >= 0 )
      {
        if( v4 != v5 )
        {
          v7 = (_WORD)v5 - (_WORD)v4;
          if( v4 )
            v6 = strnlen(v4, v7);
          *NameLength = v6;
          if( v6 != v7 )
            return(PSTR)v4;
        }
        return 0i64;
      }
    }
  }
  return 0i64;
}

Referenced by:

EtwpApplyEventNameFilter