From where in the Torah is there a hint of Moses? As it is said, "for that he also (be-shaggam) is flesh" (Genesis 6:3) [be-shaggam equals Moshe in numerical value]. From where in the Torah is there a hint of Haman? As it is said, "Is it from (ha-min) the tree" (Genesis 3:11) [reading ha-min as Haman]. From where in the Torah is there a hint of Esther? As it is written, "And I will surely hide (haster astir) My face" (Deuteronomy 31:18) [reading haster as Esther]. From where in the Torah is there a hint of Mordechai? As it is written, "And you, take for yourself the finest spices, flowing myrrh (mar deror)" and so forth (Exodus 30:23), which we render in the Aramaic translation as meira dakhya [pure myrrh, echoing the name Mordechai].
Where Moses Haman Esther and Mordechai Are Hinted in the Torah
Yalkut Shimoni on Torah 46:1
מִנַּיִן לְמֹשֶׁה מִן הַתּוֹרָה, שֶׁנֶּאֱמַר בְּשַׁגַּם הוּא בָשָׂר מִנַּיִן לְהָמָן מִן הַתּוֹרָה, שֶׁנֶּאֱמַר "הֲמִן הָעֵץ" מִנַּיִן לְאֶסְתֵּר מִן הַתּוֹרָה, דִּכְתִיב (דברים לא, יח) "וְאָנֹכִי הַסְתֵּר אַסְתִּיר" מִנַּיִן לְמָרְדְּכַי מִן הַתּוֹרָה, דִּכְתִיב (שמות ל, כג) "וְאַתָּה קַח לְךָ בְּשָׂמִים רֹאשׁ מָר דְּרוֹר" וְגוֹ', וּמְתַרְגְּמִינָן מֵירָא דַכְיָא.