//
// dtls1_start_timer from 0xd5d080 to 0xd5d0f0 (112 bytes)
//
// 4 xrefs:
// > sub_D47644 @ 0xd47cc0
// > dtls1_double_timeout @ 0xd5d220
// > dtls1_handle_timeout @ 0xd5d390
// > ??> @ 0x9cb28
//
// 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 dtls1_start_timer(__int64 a1)
{
__int64 v2; // x0
__int64 rbio; // x0
v2 = *(_QWORD *)(a1 + 152);
if ( !*(_QWORD *)(v2 + 488) && !*(_QWORD *)(v2 + 496) )
*(_WORD *)(v2 + 504) = 1;
gettimeofday((struct timeval *)(v2 + 488), nullptr);
*(_QWORD *)(*(_QWORD *)(a1 + 152) + 488LL) += *(unsigned __int16 *)(*(_QWORD *)(a1 + 152) + 504LL);
rbio = SSL_get_rbio(a1);
return BIO_ctrl(rbio, 45, 0, *(_QWORD *)(a1 + 152) + 488LL);
}