//
// dtls1_new from 0xd5cd9c to 0xd5ce80 (228 bytes)
//
// 11 xrefs:
// > ??> @ 0x3f990
// > ??> @ 0x121fc40
// > ??> @ 0x121fd20
// > ??> @ 0x121fe00
// > ??> @ 0x121fee0
// > ??> @ 0x121ffc0
// > ??> @ 0x12200a0
// > ??> @ 0x1220180
// > ??> @ 0x1220260
// > ??> @ 0x1220340
// > ??> @ 0x1220420
//
// 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 dtls1_new(__int64 a1)
{
__int64 v3; // x19
__int64 v4; // x0
int v5; // w1
__int64 v6; // x1
if ( !(unsigned int)DTLS_RECORD_LAYER_new(a1 + 928) || !(unsigned int)ssl3_new(a1) )
return 0;
v3 = CRYPTO_zalloc(512, "ssl/d1_lib.c", 88);
if ( !v3 )
{
LABEL_11:
ssl3_free(a1);
return 0;
}
*(_QWORD *)(v3 + 272) = pqueue_new();
v4 = pqueue_new();
v5 = *(_DWORD *)(a1 + 56);
*(_QWORD *)(v3 + 280) = v4;
if ( v5 )
*(_DWORD *)(v3 + 256) = 256;
*(_DWORD *)(v3 + 288) = 0;
*(_DWORD *)(v3 + 292) = 0;
if ( !v4 || !*(_QWORD *)(v3 + 272) )
{
pqueue_free(*(_QWORD *)(v3 + 272));
pqueue_free(*(_QWORD *)(v3 + 280));
CRYPTO_free(v3, "ssl/d1_lib.c", 106);
goto LABEL_11;
}
v6 = *(_QWORD *)(a1 + 8);
*(_QWORD *)(a1 + 152) = v3;
(*(void (__fastcall **)(__int64))(v6 + 24))(a1);
return 1;
}