//
// sub_1005BF270 from 0x1005bf270 to 0x1005bf364 (244 bytes)
//
// 2 xrefs:
// > sub_1005C2184 @ 0x1005c219c
// > sub_1005C2D20 @ 0x1005c2da0
//
// 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_1005BF270(__int64 *a1, __int64 *a2, __int64 a3)
{
__int64 v6; // x19
__int64 v7; // x2
__int64 v8; // x4
if ( !a2 || !*a2 )
{
v7 = 67;
v8 = 1238;
LABEL_10:
sub_1005E0E48(16, 144, v7, "ec_asn1.c", v8);
return 0;
}
if ( !a1 || (v6 = *a1) == 0 )
{
v6 = sub_1005BF574();
if ( !v6 )
{
v7 = 65;
v8 = 1244;
goto LABEL_10;
}
}
if ( sub_1005BD7E0((char **)(v6 + 8), a2, a3) )
{
if ( a1 )
*a1 = v6;
}
else
{
sub_1005E0E48(16, 144, 16, "ec_asn1.c", 1251);
if ( a1 && *a1 == v6 )
{
return 0;
}
else
{
sub_1005BF684(v6);
return 0;
}
}
return v6;
}