//
// OBJ_NAME_new_index from 0xdc10fc to 0xdc12ac (432 bytes)
//
// 1 xrefs:
// > ??> @ 0xc7c38
//
// 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 OBJ_NAME_new_index(__int64 a1, __int64 a2, __int64 a3)
{
__int64 v4; // x0
unsigned int v7; // w27
int v8; // w20
unsigned int v9; // w21
_QWORD *v10; // x19
_QWORD *v12; // x0
__int64 v13; // x0
v4 = qword_125F180;
if ( qword_125F180
|| (v9 = 0,
v13 = CRYPTO_mem_ctrl(),
qword_125F180 = OPENSSL_sk_new_null(v13),
CRYPTO_mem_ctrl(),
(v4 = qword_125F180) != 0) )
{
v7 = dword_1239050++;
v8 = OPENSSL_sk_num(v4);
if ( v8 >= dword_1239050 )
{
LABEL_9:
v12 = (_QWORD *)OPENSSL_sk_value(qword_125F180, v7);
if ( a1 )
*v12 = a1;
if ( a2 )
v12[1] = a2;
if ( a3 )
v12[2] = a3;
return v7;
}
else
{
while ( 1 )
{
++v8;
CRYPTO_mem_ctrl();
v10 = CRYPTO_zalloc(&off_18, (__int64)"crypto/objects/o_names.c", 95);
CRYPTO_mem_ctrl();
if ( !v10 )
{
v9 = 0;
ERR_put_error(8, 106, 65, (__int64)"crypto/objects/o_names.c", 98);
return v9;
}
*v10 = OPENSSL_LH_strhash;
v10[1] = &strcmp;
CRYPTO_mem_ctrl();
v9 = OPENSSL_sk_push(qword_125F180, v10);
CRYPTO_mem_ctrl();
if ( !v9 )
break;
if ( dword_1239050 <= v8 )
goto LABEL_9;
}
ERR_put_error(8, 106, 65, (__int64)"crypto/objects/o_names.c", 109);
CRYPTO_free(v10, (__int64)"crypto/objects/o_names.c", 110);
}
}
return v9;
}