//
// ssl_add_serverhello_use_srtp_ext from 0xd5e56c to 0xd5e614 (168 bytes)
//
// 3 xrefs:
// > ssl_add_serverhello_tlsext @ 0xd563a0
// > ssl_add_serverhello_tlsext @ 0xd56414
// > ??> @ 0xb5410
//
// 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
//
__int64 __fastcall ssl_add_serverhello_use_srtp_ext(__int64 a1, __int64 a2, _DWORD *a3, int a4)
{
__int64 result; // x0
if ( a2 )
{
if ( a4 <= 4 )
{
ERR_put_error(20, 308, 363, "ssl/d1_srtp.c", 255);
return 1;
}
if ( !*(_QWORD *)(a1 + 752) )
{
ERR_put_error(20, 308, 369, "ssl/d1_srtp.c", 261);
return 1;
}
*(_BYTE *)a2 = 0;
*(_BYTE *)(a2 + 1) = 2;
*(_BYTE *)(a2 + 2) = BYTE1(*(_QWORD *)(*(_QWORD *)(a1 + 752) + 8LL));
*(_WORD *)(a2 + 3) = (unsigned __int8)*(_QWORD *)(*(_QWORD *)(a1 + 752) + 8LL);
}
result = 0;
*a3 = 5;
return result;
}