//
// dtls1_ctrl from 0x7b6560 to 0x7b65f4 (148 bytes)
//
// 11 xrefs:
// > ??> @ 0x5a44c
// > ??> @ 0xab1440
// > ??> @ 0xab14b4
// > ??> @ 0xab1528
// > ??> @ 0xab159c
// > ??> @ 0xab1610
// > ??> @ 0xab1684
// > ??> @ 0xab16f8
// > ??> @ 0xab176c
// > ??> @ 0xab17e0
// > ??> @ 0xab1854
//
// 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 dtls1_ctrl(_DWORD *a1, int a2, signed int a3, char *a4)
{
if ( a2 != 74 )
{
if ( a2 > 74 )
{
if ( a2 != 120 )
{
if ( a2 == 121 )
return 256;
return ssl3_ctrl(a1, a2, a3, a4);
}
if ( a3 > 255 )
{
*(_DWORD *)(a1[27] + 280) = a3;
return 1;
}
}
else
{
if ( a2 != 17 )
{
if ( a2 == 73 )
return dtls1_get_timeout((int)a1, (int *)a4) != nullptr;
return ssl3_ctrl(a1, a2, a3, a4);
}
if ( a3 > 207 )
{
*(_DWORD *)(a1[27] + 284) = a3;
return a3;
}
}
return 0;
}
return dtls1_handle_timeout((int)a1);
}