Sorry i haven't posted here since Feb., haven't been online here for a while and hope it's alright to continue.
So, if we have the Midway bombardament and Nagumo&co seeking a surface battle, possibly they might stumble upon the drifting Yorktown and sink it. Perhaps the japanese might still scuttle Kaga and Soryu in the evening of the 4th, but then with the battlefield still under their control (sort of) Yamamoto might want to try and tow Akagi away and postpone the scuttling.
Regarding the hypothetical attack on TF16 at dusk, indeed there are very few attacks planes left on Hiryu so in view of the large numbers of F4Fs it's unlikely they would score many if any hits, but going with the scenario above one of the american CVs might be hit by a bomb and/or an attack plane crashing into it, so while the damage might not be fatal would still give Spruance pause for thought. If hit by even a torpedo given the vulnerability of the Yorktown class to such damage that carrier might be in mortal danger if forced to stop or drastically slow and Nagumo is charging for the US TF. Given that Spruance was told not to lose the carriers, with word that Yorktown was sunk by surface forces and one of his own CVs damaged, Spruance might choose to retreat.
At this point, if Yamamoto is smart, he could order the cancellation of the invasion anyway after Kurita does whatever damage he can to Midway, having bagged "two" carriers, still having Hiryu with perhaps 25 Zeros left, plus couple of D3As and 2-3 B5N, joined by this time by the Zuiho with it's aircraft (12 fighters and 12 B5Ns) and perhaps having a cruiser or BB towing the crippled Akagi away. If he is really, really lucky one of the IJN subs around might have a go at Spruance's carriers while he's moving away from Midway.
However, if no US carriers are damaged in the dusk attack, Nagumo still charges east and possibly sinks Yorktown, Kurita still bombards Midway at dawn but on the morning of the 5th the battle might be renewed between TF16 with approx. 50 F4F and 60 SBD still operational and Nagumo's force with Hiryu and Zuiho totaling about 40 fighters, just a handful of D3As and about 15 B5Ns, supported by four fast BBs, six cruisers and a dozen or more DDs. Not sure if Yamamoto himself with 3 large BBs plus escorts and the Hosho with 6 old B4Ys would be within range to support Nagumo and Kondo as they presumably have steadily moved east during the night. In this scenario the chances that the surviving IJN carriers escape unscathed are poor, but again, the scenario might sort of repeat just like in the previous day, couple of lucky torpedo hits could cripple a US CV which could be finished by the large number of BBs and CAs the japanese have east of Midway during the night of 5th/6th, but the japanese might themselves lose or at least have severly damaged another or both their CVs. Fewer bomb hits might result in Hiryu surviving to fight another day though. So let's say Zuiho is sunk, Hiryu is damaged but repaired and available by Santa Cruz at the latest, while Akagi is towed home and repaired (or rather, rebuilt) as well but will not be ready before 1943.