//
// sub_9C2524 from 0x9c2524 to 0x9c2618 (244 bytes)
//
// 3 xrefs:
// > tls1_set_curves_list @ 0x9c3428
// > tls1_set_curves_list @ 0x9c3440
// > ??> @ 0x9c3478
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:07:04 +0000
//
const void *__fastcall sub_9C2524(const void *result, signed int a2, int *a3)
{
_BOOL4 v3; // r4
int v6; // lr
int v7; // r2
_DWORD *v8; // r1
int v9; // r3
int v10; // t1
int v11; // r3
char v12[44]; // [sp+4h] [bp-2Ch] BYREF
if ( result )
{
v3 = *a3 == 28;
if ( a2 > 19 )
v3 = 1;
if ( !v3 )
{
memcpy(v12, result, a2);
v12[a2] = 0;
v6 = EC_curve_nist2nid(v12);
if ( v6 || (v6 = OBJ_sn2nid(v12)) != 0 || (v6 = OBJ_ln2nid(v12)) != 0 )
{
v7 = *a3;
if ( !*a3 )
{
v11 = 1;
LABEL_13:
*a3 = v11;
a3[v7 + 1] = v6;
return &dword_0 + 1;
}
if ( v6 != a3[1] )
{
v8 = a3 + 1;
v9 = 0;
while ( ++v9 != v7 )
{
v10 = v8[1];
++v8;
if ( v6 == v10 )
return nullptr;
}
v11 = v7 + 1;
goto LABEL_13;
}
}
}
return nullptr;
}
return result;
}