//
// sub_DAF5A4 from 0xdaf5a4 to 0xdaf658 (180 bytes)
//
// 1 xrefs:
// > ??> @ 0x11254a0
//
// 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 sub_DAF5A4(_QWORD *a1, int a2, __int64 a3, __int64 a4)
{
_QWORD *v4; // x5
__int64 result; // x0
v4 = (_QWORD *)a1[5];
if ( a2 == 6 )
{
return (a4 != 0 || (int)a3 <= 0) && (int)a3 >= -1 && (unsigned int)ASN1_OCTET_STRING_set(v4 + 1, a4, a3) != 0;
}
else if ( a2 == 7 )
{
return (unsigned int)HMAC_Init_ex(
v4[4],
*(_QWORD *)(*(_QWORD *)(a1[2] + 32LL) + 8LL),
**(unsigned int **)(a1[2] + 32LL),
*v4,
a1[1]) != 0;
}
else
{
result = 4294967294LL;
if ( a2 == 1 )
{
*v4 = a4;
return 1;
}
}
return result;
}