//
// DTLS_RECORD_LAYER_set_saved_w_epoch from 0xd304c8 to 0xd30528 (96 bytes)
//
// 3 xrefs:
// > dtls1_retransmit_message @ 0xd4d670
// > dtls1_retransmit_message @ 0xd4d6ac
// > ??> @ 0x5d288
//
// 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 DTLS_RECORD_LAYER_set_saved_w_epoch(__int64 result, unsigned __int16 a2)
{
__int64 v2; // x3
int v3; // w2
__int64 v4; // x3
v2 = *(_QWORD *)(result + 3464);
v3 = *(unsigned __int16 *)(v2 + 2);
if ( a2 == v3 - 1 )
{
*(_QWORD *)(v2 + 120) = *(_QWORD *)(result + 3448);
v2 = *(_QWORD *)(result + 3464);
*(_QWORD *)(result + 3448) = *(_QWORD *)(v2 + 112);
goto LABEL_3;
}
if ( a2 != v3 + 1 )
{
LABEL_3:
*(_WORD *)(v2 + 2) = a2;
return result;
}
*(_QWORD *)(v2 + 112) = *(_QWORD *)(result + 3448);
v4 = *(_QWORD *)(result + 3464);
*(_QWORD *)(result + 3448) = *(_QWORD *)(v4 + 120);
*(_WORD *)(v4 + 2) = a2;
return result;
}