//
// i2o_SCT_signature from 0xd83458 to 0xd83584 (300 bytes)
//
// 2 xrefs:
// > i2o_SCT @ 0xd83688
// > ??> @ 0xb6f40
//
// 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 i2o_SCT_signature(__int64 a1, __int64 *a2)
{
__int64 v4; // x20
_BYTE *v5; // x2
__int64 v7; // x0
if ( !(unsigned int)SCT_signature_is_complete() )
{
ERR_put_error(50, 109, 107, "crypto/ct/ct_oct.c", 159);
goto LABEL_12;
}
if ( *(_DWORD *)a1 )
{
ERR_put_error(50, 109, 103, "crypto/ct/ct_oct.c", 164);
goto LABEL_12;
}
v4 = *(_QWORD *)(a1 + 80) + 4LL;
if ( a2 )
{
v5 = (_BYTE *)*a2;
if ( *a2 )
{
*a2 = (__int64)&v5[v4];
LABEL_6:
*v5 = *(_BYTE *)(a1 + 64);
v5[1] = *(_BYTE *)(a1 + 65);
v5[2] = BYTE1(*(_QWORD *)(a1 + 80));
v5[3] = *(_QWORD *)(a1 + 80);
memcpy(v5 + 4, *(const void **)(a1 + 72), *(_QWORD *)(a1 + 80));
return (unsigned int)v4;
}
v7 = CRYPTO_malloc(*(_QWORD *)(a1 + 80) + 4LL, "crypto/ct/ct_oct.c", 180);
v5 = (_BYTE *)v7;
if ( v7 )
{
*a2 = v7;
goto LABEL_6;
}
ERR_put_error(50, 109, 65, "crypto/ct/ct_oct.c", 182);
LABEL_12:
CRYPTO_free(0, "crypto/ct/ct_oct.c", 196);
return 0xFFFFFFFFLL;
}
return (unsigned int)v4;
}