//
// SSL_set_session from 0xfc56ac to 0xfc5714 (104 bytes)
//
// 3 xrefs:
// > sub_E2DA90 @ 0xe2ea58
// > SSL_copy_session_id @ 0xfbdfb4
// > ??> @ 0xc9d60
//
// 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 __fastcall SSL_set_session(__int64 a1, __int64 a2)
{
__int64 v4; // x1
__int64 result; // x0
ssl_clear_bad_session(a1);
v4 = **(_QWORD **)(a1 + 440);
if ( v4 == *(_QWORD *)(a1 + 8) || (result = SSL_set_ssl_method(a1, v4), (_DWORD)result) )
{
if ( a2 )
{
SSL_SESSION_up_ref(a2);
*(_QWORD *)(a1 + 456) = *(_QWORD *)(a2 + 176);
}
SSL_SESSION_free(*(_QWORD *)(a1 + 376));
*(_QWORD *)(a1 + 376) = a2;
return 1;
}
return result;
}