function makeCheckAsync(internal) {
	return (hook, args) => {
		if (hook === 'function' || hook === 'generator_function' || hook === 'eval' || hook === 'run') {
			const funcConstructor = internal.Function;
			if (hook === 'eval') {
				const script = args[0];
				args = [script];
				if (typeof(script) !== 'string') return args;
			} else {
				// Next line throws on Symbol, this is the same behavior as function constructor calls
				args = args.map(arg => `${arg}`);
			}
			if (args.findIndex(arg => /\basync\b/.test(arg)) === -1) return args;
			const asyncMapped = args.map(arg => arg.replace(/async/g, 'a\\u0073ync'));
			try {
				// Note: funcConstructor is a Sandbox object, however, asyncMapped are only strings.
				funcConstructor(...asyncMapped);
			} catch (u) {
				// u is a sandbox object
				// Some random syntax error or error because of async.

				// First report real syntax errors
				try {
					// Note: funcConstructor is a Sandbox object, however, args are only strings.
					funcConstructor(...args);
				} catch (e) {
					throw internal.Decontextify.value(e);
				}
				// Then async error
				throw new VMError('Async not available');
			}
			return args;
		}
		throw new VMError('Async not available');
	};
}
The software receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype.