//
// dtls1_read_failed from 0x7a5288 to 0x7a530c (132 bytes)
//
// 2 xrefs:
// > dtls1_read_bytes @ 0x7878f8
// > ??> @ 0x5a60c
//
// 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_read_failed(int a1, int a2)
{
int rbio; // r0
if ( a2 <= 0 )
{
if ( dtls1_is_timer_expired() )
{
if ( SSL_in_init(a1) )
{
return dtls1_handle_timeout(a1);
}
else
{
rbio = SSL_get_rbio(a1);
BIO_set_flags(rbio, 1);
return a2;
}
}
else
{
return a2;
}
}
else
{
ERR_put_error(20, 339, 68, "ssl/statem/statem_dtls.c", 928);
return 1;
}
}