//
// dtls1_write_app_data_bytes from 0x7b70cc to 0x7b7190 (196 bytes)
//
// 11 xrefs:
// > ??> @ 0x5a42c
// > ??> @ 0xab1438
// > ??> @ 0xab14ac
// > ??> @ 0xab1520
// > ??> @ 0xab1594
// > ??> @ 0xab1608
// > ??> @ 0xab167c
// > ??> @ 0xab16f0
// > ??> @ 0xab1764
// > ??> @ 0xab17d8
// > ??> @ 0xab184c
//
// 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
//
int __fastcall dtls1_write_app_data_bytes(int a1, int a2, _BYTE *a3, signed int a4)
{
int result; // r0
if ( !SSL_in_init(a1) || ossl_statem_get_in_handshake(a1) )
goto LABEL_2;
result = (*(int (__fastcall **)(int))(a1 + 24))(a1);
if ( result < 0 )
return result;
if ( result )
{
LABEL_2:
if ( a4 > 0x4000 )
{
ERR_put_error(20, 268, 334, "ssl/d1_msg.c", 40);
return -1;
}
else
{
return dtls1_write_bytes((_DWORD *)a1, a2, a3, a4);
}
}
else
{
ERR_put_error(20, 268, 229, "ssl/d1_msg.c", 34);
return -1;
}
}