https://bugs.winehq.org/show_bug.cgi?id=50083
--- Comment #4 from Bamm Gabriana bammzilla@astronomy.com.ph --- Sorry for the late reply.
Thank you Anastasius for the confirm, the patch, and for instructions to use Internet Archive. I wasn't aware that github behaved that way. Next time I will no longer link directly to a binary release asset. I'm sorry for my blunder :D
It turns out the installer for 6.5SP1 is identical to the one used in 6.5, and only the installed files were updated. It produced exactly the same errors.
A lot of time has passed since you showed me the patch, and I guessed that it should be in by now. So I tested in the latest Wine 6.20.
I downloaded the source and checked "dlls/advapi32/security.c" and sure enough the source already contained the code in the patch. Since I don't need to apply the patch anymmore, I just installed wine-devel 6.20 and retested on a clean prefix.
~ $ rm -rf .wine ~ $ wine wineboot -u ~ $ winetricks -q vcrun2019 dotnet35sp1 dotnet452 dotnet472 dotnet48 ~ $ wine ./Downloads/ASCOM/ASCOMPlatform65SP1.exe
Note that my current test is ASCOMPlatform 6.5 SP1 on Wine 6.20 whereas my previous test was ASCOMPlatform 6.5 on Wine 5.0.2.
The new test went exactly the same way as the old test I did last year. All three error dialogs still showed up, and the installer quit before finishing with the same error message.
It seems that the patch didn't change anything. :(
I'm on Ubuntu Focal if that matters but I don't think it should, since I got the same result in Debian 11 Bullseye.
I experimented with changing advapi32 to native and got the same results.
I then copied advapi32.dll from Windows on VirtualBox and replaced them on my wine prefix (both the system32 and syswow64 respectively), set advapi32 to native and got the same results (I thought this would make it crash but it didn't).
Hence I suspect the issue is not with advapi32. I don't know why the patch worked for Zebediah who wrote it. (I suspect that Zebediah is somewhat of an astronomy enthusiast like me, since her profile on the CodeWeavers page mentions my favorite childhood show, The Magic School Bus).
Can Zebediah be added to this bug? She might be interested to fix it.