https://bugs.winehq.org/show_bug.cgi?id=32515
--- Comment #55 from Christian Inci chris.wine@broke-the-inter.net --- Created attachment 57763 --> https://bugs.winehq.org/attachment.cgi?id=57763 HACK?: Second bugfix for #32515
This patch is extremely similiar to Andrew Wesie's patch. (https://source.winehq.org/patches/data/127713) I could swear that I already tried this exactly same modification many times, but it's now working for some odd reasons.
The result of this patch is the same as the result of my previous non-public patch (dirty patch in GetFileInformationByHandle), but it's cleaner now as it won't manipulate internal game values. At the example of CoD MW3, this means that it'll now crash between the intro screen and the main menu instead of crashing immediately, but hey, a progress is a progress.
It *doesn't* depend on the fix for the game cache validation issue.
Valve's CEG might decide to use different code paths based on time, weekday, timezone and other weird shit. So try to restart the game a few times if it's still crashing too early.
e.g.: // choose codepath based on time & date __cdecl BOOL sub_006ce230(void) { SYSTEMTIME SystemTime; TIME_ZONE_INFORMATION TimeZoneInformation; GetSystemTime(&SystemTime); if (SystemTime.wDayOfWeek == 6 || SystemTime.wDayOfWeek == 1 || SystemTime.wDayOfWeek == 4) return TRUE; // 0x006ce263 DWORD ecx = var_028231e8+1; DWORD eax = ((ecx/0x2fb)*0x2fb); var_028231e8 = ecx; if ((ecx-eax) == 1) { // 0x006ce298 if (GetTimeZoneInformation(&TimeZoneInformation) != TIME_ZONE_ID_INVALID) { eax = (TimeZoneInformation.Bias/10)-((TimeZoneInformation.Bias/90)*9); if (!eax || eax == 1 || eax == 6) return TRUE; } } // 0x006ce2e8 if (GetTimeZoneInformation(&TimeZoneInformation) != TIME_ZONE_ID_INVALID) { eax = (TimeZoneInformation.Bias/10)-((TimeZoneInformation.Bias/90)*9); if (eax != 2 && eax != 6 && eax != 8) return FALSE; } return TRUE; }