//
// dtls1_start_timer from 0x9cadd4 to 0x9cae44 (112 bytes)
//
// 4 xrefs:
// > sub_9B3990 @ 0x9b3fe8
// > dtls1_double_timeout @ 0x9cafa0
// > dtls1_handle_timeout @ 0x9cb14c
// > ??> @ 0x7683c
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:07:08 +0000
//
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);
}