//
// dtls1_set_message_header from 0xfcbafc to 0xfcbb4c (80 bytes)
//
// 3 xrefs:
// > dtls_construct_hello_verify_request @ 0xfce8d0
// > sub_FDB09C @ 0xfdb0b8
// > ??> @ 0xd4938
//
// 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:27 +0000
//
__int64 __fastcall dtls1_set_message_header(__int64 a1, char a2, __int64 a3, __int64 a4, __int64 a5)
{
__int64 result; // x0
__int16 v6; // w6
__int16 v7; // w6
result = *(_QWORD *)(a1 + 152);
if ( a4 )
{
v7 = *(_WORD *)(result + 264);
*(_BYTE *)(result + 296) = a2;
*(_QWORD *)(result + 304) = a3;
*(_WORD *)(result + 312) = v7;
*(_QWORD *)(result + 320) = a4;
}
else
{
v6 = *(_WORD *)(result + 266);
*(_WORD *)(result + 264) = v6;
*(_BYTE *)(result + 296) = a2;
*(_WORD *)(result + 266) = v6 + 1;
*(_QWORD *)(result + 304) = a3;
*(_WORD *)(result + 312) = v6;
*(_QWORD *)(result + 320) = 0;
}
*(_QWORD *)(result + 328) = a5;
return result;
}