//
// sub_1006E55B0 from 0x1006e55b0 to 0x1006e56dc (300 bytes)
//
// 4 xrefs:
// > sub_1006E7D70 @ 0x1006e7dac
// > sub_1006E7D70 @ 0x1006e7de0
// > sub_1006E8434 @ 0x1006e8518
// > sub_1006E8434 @ 0x1006e8548
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 11:12:35 +0000
//
__int64 __fastcall sub_1006E55B0(__int64 a1, void **a2)
{
__int64 v4; // x0
__int64 v5; // x20
_BYTE *v6; // x3
int v7; // w22
__int64 v8; // x2
__int64 v9; // x4
if ( !a1 )
{
v8 = 67;
v9 = 1296;
LABEL_7:
sub_100706FB0(16, 151, v8, "ec_asn1.c", v9);
return 0;
}
v4 = sub_1006EBCC4(*(_QWORD *)(a1 + 8), *(_QWORD *)(a1 + 16), *(unsigned int *)(a1 + 36), 0, 0, 0);
v5 = v4;
if ( !a2 || !v4 )
return v5;
v6 = *a2;
if ( *a2 )
{
v7 = 0;
goto LABEL_10;
}
v6 = sub_1006AE878(v4, (__int64)"ec_asn1.c", 1308);
*a2 = v6;
if ( !v6 )
{
v8 = 65;
v9 = 1309;
goto LABEL_7;
}
v7 = 1;
LABEL_10:
if ( sub_1006EBCC4(*(_QWORD *)(a1 + 8), *(_QWORD *)(a1 + 16), *(unsigned int *)(a1 + 36), v6, v5, 0) )
{
if ( !v7 )
*a2 = (char *)*a2 + v5;
}
else
{
sub_100706FB0(16, 151, 16, "ec_asn1.c", 1316);
if ( v7 )
{
sub_1006AEDAC(*a2);
v5 = 0;
*a2 = nullptr;
}
else
{
return 0;
}
}
return v5;
}