//
// SSL_SESSION_new from 0xfc4268 to 0xfc4364 (252 bytes)
//
// 4 xrefs:
// > ssl_get_new_session @ 0xfc46d0
// > d2i_SSL_SESSION @ 0xfde2c8
// > d2i_SSL_SESSION @ 0xfde2ec
// > ??> @ 0x62440
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:15:23 +0000
//
__int64 SSL_SESSION_new()
{
__int64 v0; // x0
__int64 v1; // x19
__int64 v2; // x0
__int64 v3; // x20
v0 = CRYPTO_zalloc(352, "ssl/ssl_sess.c", 84);
v1 = v0;
if ( v0 )
{
*(_QWORD *)(v0 + 176) = 1;
*(_DWORD *)(v0 + 184) = 1;
*(_QWORD *)(v0 + 192) = 304;
*(_QWORD *)(v0 + 200) = time(nullptr);
v2 = CRYPTO_THREAD_lock_new();
*(_QWORD *)(v1 + 344) = v2;
if ( v2 )
{
v3 = v1;
if ( !(unsigned int)CRYPTO_new_ex_data(2, v1, v1 + 240) )
{
v3 = 0;
CRYPTO_THREAD_lock_free(*(_QWORD *)(v1 + 344));
CRYPTO_free(v1, "ssl/ssl_sess.c", 103);
}
}
else
{
v3 = 0;
ERR_put_error(20, 189, 65, "ssl/ssl_sess.c", 96);
CRYPTO_free(v1, "ssl/ssl_sess.c", 97);
}
}
else
{
v3 = 0;
ERR_put_error(20, 189, 65, "ssl/ssl_sess.c", 86);
}
return v3;
}