Thanks for your report.
I have sent you an email with a debug version of WinSCP to address you have used to register on this forum.
I receive this error when I select a .p7b file for the Client Certificate file under Advanced Site Settings > Connection > TLS/SSL
WinSCP 5.8
Error message:
Invalid access to memory.
Stack trace:
(0059086F)
(0080EB66)
(00810BCE)
(0080DB48)
(00041D0E) ntdll.dll.RtlRaiseStatus
(00041B96) ntdll.dll.KiUserExceptionDispatcher
(00588C38)
(0058897E)
(00588B88)
(00588ADF)
(005888D5)
(00586025)
(006427D9)
(00642885)
(0008467C)
(007A8A91)
(003C1920)
(003C17DF)
(00222005)
(0018A238)
(0022216B)
(00222005)
(0022164C)
(00345F28)
(000068E5) USER32.DLL
(00006A47) USER32.DLL
(0002F5DC) USER32.DLL
(0000DD0E) USER32.DLL.SendMessageW
(0001A1B8) COMCTL32.DLL
(0001A115) COMCTL32.DLL
(000068E5) USER32.DLL
(00006A47) USER32.DLL
(0000CE15) USER32.DLL
(0000CE3D) USER32.DLL.CallWindowProcW
(00222116)
(00222005)
(0018A238)
(00345F28)
(000068E5) USER32.DLL
(00006A47) USER32.DLL
(00007D37) USER32.DLL
(0000831E) USER32.DLL.DispatchMessageW