If you want to read more about Midway, I highly recommend Shattered Sword by Jonathan Parshall and Anthony Tully:
https://www.amazon.com/Shattered-Sword-Untold-Battle-Midway/dp/1574889249The more I read about it the less sense it makes. Upthread someone hypothesized about a more "normal" outcome to the battle but even an absolute Japanese victory would have, at best, been only a wash for the Japanese strategically:
In theory, Yamamoto's plan was to lure the American carriers out where they could be sunk. I have no idea what made him think that this would work. Yamamoto obviously didn't know that the Americans were reading his mail. Prior to the battle the Midway garrison was substantially upgraded because we knew the Japanese were coming. If the code hadn't been broken then the reinforcement wouldn't have happened and the American Carriers wouldn't have been in the area. In that case there can be little doubt that the Japanese invasion would have been successful. What then?
Yamamoto's apparent assumption is that the Americans would have rushed their carriers out of Pear Harbor to fight off the invaders and/or retake Midway. Frankly, that makes no sense. If the Americans hadn't known about Midway in advance then most of the CV's would probably have been in the South Pacific anyway so they couldn't have responded before the Japanese carriers had to leave to refuel and rearm even if the Americans had wanted to send them.
Even if we assume, however, that the American Carriers did happen to be in the Hawaiian Islands (~1,300 mi from Pearl Harbor) it still would have taken them about about 38 hours (at 30kt) to get to Midway.
Just six months earlier the Japanese invaded Wake Island. The US garrison on Wake repelled the initial invasion fleet and USS Saratoga was dispatched from Pearl Harbor on a ferrying mission to take additional aircraft to Wake for the defense of the island. While Saratoga was en-route, the garrison at Wake reported that they were under attack by Japanese carrier-based aircraft. Saratoga was immediately recalled because the interim CiC of the Pacific Fleet reasonably decided that it simply wasn't worth losing Saratoga to try to keep Wake.
What made the Japanese think that the US would view Midway any differently?
Losing Midway to the Japanese would have deprived the US of an advanced refueling point for submarines and that is about it. Meanwhile, it would have been completely impossible for the Japanese to defend.
In 1942, 43, and 44 the biggest problem the Japanese faced was that they simply lacked the logistical ability to supply all the far-flung islands that they had captured. Midway would just have been yet another island that they couldn't possibly supply and it was reasonably close to Hawaii so the US could have basically surrounded it with submarines and attacked it with BB's, CA's, CL's, DD's, and aircraft from Hawaii (long range B24's) and from the CV's.
The US Navy could have simply toyed with the Japanese on Midway and bled them dry in the process for as long as they wanted. Then, when the US was ready to retake it the attack plan pretty much writes itself:
Day 1: Fleet of landing craft, DD's, CV's, BB's, CA's, and CL's leaves Pearl Harbor at 10pm. Travel time to Midway at 20kt, 56 hours.
Day 2: Fleet continues on course for Midway, B24's strike Midway Island and harbor overnight.
Day 3: Fleet continues on course for Midway, B24's strik Midway Island and harbor overnight.
Day 4: As fleet approaches Midway the BB's, CA's, CL's, and a few escorting DD's speed up and prepare to shell anything left on the island. B24's strike Midway Island and harbor overnight. CV's launch Dive and Torpedo bomber along with fighter escorts before dawn to arrive over Midway at dawn. At dawn the Dive and Torpedo bombers bomb anything that hasn't already been destroyed while fighters take care of any potential Japanese aircraft and strafe targets of opportunity. If there is anything left after all of that a few shells from the BB's will take care of it and the landings should be unopposed at 6am.