//
// dtls1_set_message_header from 0x9ba440 to 0x9ba488 (72 bytes)
//
// 3 xrefs:
// > dtls_construct_hello_verify_request @ 0x9bd44c
// > sub_9CAB00 @ 0x9cab20
// > ??> @ 0x76f0c
//
// 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:01 +0000
//
int __fastcall dtls1_set_message_header(int a1, char a2, int a3, int a4, int a5)
{
__int16 v5; // r5
_WORD *v6; // lr
int result; // r0
_WORD *v8; // r12
result = *(_DWORD *)(a1 + 108);
if ( a4 )
{
v8 = (_WORD *)(result + 264);
}
else
{
v6 = (_WORD *)(result + 264);
v8 = (_WORD *)*(unsigned __int16 *)(result + 266);
}
if ( a4 )
LOWORD(v8) = *v8;
else
v5 = (_WORD)v8 + 1;
if ( !a4 )
{
*v6 = (_WORD)v8;
v6[1] = v5;
}
*(_BYTE *)(result + 288) = a2;
*(_DWORD *)(result + 292) = a3;
*(_WORD *)(result + 296) = (_WORD)v8;
*(_DWORD *)(result + 300) = a4;
*(_DWORD *)(result + 304) = a5;
return result;
}