//
// sub_102D904 from 0x102d904 to 0x102d9b8 (180 bytes)
//
// 1 xrefs:
// > ??> @ 0x1402a30
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:16:18 +0000
//
__int64 __fastcall sub_102D904(_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;
}