Extract pre-master keys from memory

I want to get pre-master key from OpenSSL application (in order to decrypt traffic).
Details:

  • OpenSSL version: 1.0.2l, statically linked, no debug symbols
  • I’m able to debug the application (hit breakpoint inside SSL_connect(SSL *s) method)

Is there any way to get the pre-master key from there? I’m using x64dbg.