//
// dtls1_handle_timeout from 0xfdb68c to 0xfdb700 (116 bytes)
//
// 5 xrefs:
// > dtls1_read_bytes @ 0xfaec30
// > dtls1_read_bytes @ 0xfaecec
// > dtls1_read_failed @ 0xfcb5d0
// > dtls1_ctrl @ 0xfdb7a0
// > ??> @ 0x7c9d8
//
// 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:35 +0000
//
__int64 __fastcall dtls1_handle_timeout(__int64 a1)
{
__int64 result; // x0
__int64 v3; // x1
unsigned int v4; // w0
result = (__int64)dtls1_is_timer_expired(a1);
if ( (_DWORD)result )
{
dtls1_double_timeout(a1);
if ( (dtls1_check_timeout_num(a1) & 0x80000000) != 0 )
{
return 0xFFFFFFFFLL;
}
else
{
v3 = *(_QWORD *)(a1 + 152);
v4 = *(_DWORD *)(v3 + 472) + 1;
if ( v4 > 2 )
v4 = 1;
*(_DWORD *)(v3 + 472) = v4;
dtls1_start_timer(a1);
return dtls1_retransmit_buffered_messages(a1);
}
}
return result;
}