//
// SSL_get1_session from 0x79dfec to 0x79e020 (52 bytes)
//
// 2 xrefs:
// > sub_642BAC @ 0x642e64
// > ??> @ 0x54efc
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
int __fastcall SSL_get1_session(int a1)
{
int v2; // r5
CRYPTO_THREAD_read_lock(*(_DWORD *)(a1 + 2864));
v2 = *(_DWORD *)(a1 + 240);
if ( v2 )
SSL_SESSION_up_ref(*(_DWORD *)(a1 + 240));
CRYPTO_THREAD_unlock(*(_DWORD *)(a1 + 2864));
return v2;
}