//
// SSL_get1_session from 0x9b2bf0 to 0x9b2c24 (52 bytes)
//
// 2 xrefs:
// > sub_852C2C @ 0x852ee4
// > ??> @ 0x67e2c
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:06:57 +0000
//
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;
}