//
// dtls1_get_message_header from 0x7a5884 to 0x7a5910 (140 bytes)
//
// 3 xrefs:
// > dtls1_read_bytes @ 0x787a0c
// > dtls_get_message @ 0x7a59fc
// > ??> @ 0x5a61c
//
// 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
//
void *__fastcall dtls1_get_message_header(int a1, _BYTE *a2)
{
void *result; // r0
result = memset(a2, 0, 0x2Cu);
*a2 = *(_BYTE *)a1;
*((_DWORD *)a2 + 1) = (*(unsigned __int8 *)(a1 + 2) << 8)
| (*(unsigned __int8 *)(a1 + 1) << 16)
| *(unsigned __int8 *)(a1 + 3);
*((_WORD *)a2 + 4) = _byteswap_ushort(*(_WORD *)(a1 + 4));
*((_DWORD *)a2 + 3) = (*(unsigned __int8 *)(a1 + 7) << 8)
| (*(unsigned __int8 *)(a1 + 6) << 16)
| *(unsigned __int8 *)(a1 + 8);
*((_DWORD *)a2 + 4) = (*(unsigned __int8 *)(a1 + 10) << 8)
| (*(unsigned __int8 *)(a1 + 9) << 16)
| *(unsigned __int8 *)(a1 + 11);
return result;
}