Function for compare the modules
Optionalreverse: boolean
Search in reverse order
Optionalhint: string | RegExp
Optional name-token or regex to narrow the candidate set (e.g. "MsgCollection" or /^WAWebMsg/). When provided, matching modules are tried first; on miss we fall back to a full scan.
Return the module id from a search function