//
// sub_D9B95C from 0xd9b95c to 0xd9ba9c (320 bytes)
//
// 1 xrefs:
// > ??> @ 0x11233d0
//
// 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_D9B95C(__int64 a1, int a2, int a3, __int64 *a4)
{
__int64 result; // x0
__int64 v7; // x0
__int64 *v8; // x0
__int64 v9; // x5
__int64 v10; // x5
if ( a2 == 9 )
{
if ( a3 == 32 && a4 )
{
v8 = (__int64 *)CRYPTO_zalloc(40, "crypto/ec/ecx_meth.c", 58);
if ( v8 )
{
v9 = a4[1];
*v8 = *a4;
v8[1] = v9;
v10 = a4[3];
v8[2] = a4[2];
v8[3] = v10;
EVP_PKEY_assign(a1, 1034, v8);
return 1;
}
else
{
ERR_put_error(16, 266, 65, "crypto/ec/ecx_meth.c", 60);
return 0;
}
}
else
{
ERR_put_error(16, 266, 102, "crypto/ec/ecx_meth.c", 53);
return 0;
}
}
else if ( a2 == 10 )
{
result = *(_QWORD *)(a1 + 32);
if ( result )
{
v7 = CRYPTO_memdup(result, 32, "crypto/ec/ecx_meth.c", 281);
*a4 = v7;
if ( v7 )
return 32;
else
return 0;
}
}
else
{
result = 4294967294LL;
if ( a2 == 3 )
{
*(_DWORD *)a4 = 672;
return 2;
}
}
return result;
}