//
// dtls1_start_timer from 0x7b61d0 to 0x7b6240 (112 bytes)
//
// 4 xrefs:
// > sub_79ED8C @ 0x79f3e4
// > dtls1_double_timeout @ 0x7b639c
// > dtls1_handle_timeout @ 0x7b6548
// > ??> @ 0x5cdbc
//
// 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_start_timer(int a1)
{
int v2; // r0
int rbio; // r0
v2 = *(_DWORD *)(a1 + 108);
if ( !*(_DWORD *)(v2 + 388) && !*(_DWORD *)(v2 + 392) )
*(_WORD *)(v2 + 396) = 1;
gettimeofday((struct timeval *)(v2 + 388), nullptr);
*(_DWORD *)(*(_DWORD *)(a1 + 108) + 388) += *(unsigned __int16 *)(*(_DWORD *)(a1 + 108) + 396);
rbio = SSL_get_rbio(a1);
return BIO_ctrl(rbio, 45, 0, *(_DWORD *)(a1 + 108) + 388);
}