https://bugs.winehq.org/show_bug.cgi?id=39040
--- Comment #4 from Martin Storsjö wine@martin.st --- What are the values of loadcfg_size and loadcfg->Size for the case that breaks now?
For ucrtbase.dll, which was fixed by the referenced commit, loadcfg_size is 64, while loadcfg->Size is 72.
Are things fixed if you add an "loadcfg->Size >= offsetof(IMAGE_LOAD_CONFIG_DIRECTORY, SecurityCookie) + sizeof(loadcfg->SecurityCookie) &&" to the condition?