//
// ASN1_INTEGER_to_BN from 0xa772f4 to 0xa773a8 (180 bytes)
//
// 12 xrefs:
// > sub_9F2DCC @ 0x9f2ed4
// > sub_9F3178 @ 0x9f326c
// > sub_9F3D50 @ 0x9f4428
// > sub_9F5DC4 @ 0x9f5ed0
// > sub_9F6188 @ 0x9f621c
// > EC_GROUP_new_from_ecparameters @ 0x9fb4f4
// > EC_GROUP_new_from_ecparameters @ 0x9fbb20
// > EC_GROUP_new_from_ecparameters @ 0x9fbc28
// > sub_A66C30 @ 0xa66cc8
// > sub_A66EB4 @ 0xa66fd4
// > i2s_ASN1_INTEGER @ 0xa71bbc
// > ??> @ 0x7a36c
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:08:44 +0000
//
int *__fastcall ASN1_INTEGER_to_BN(int a1, int *a2)
{
int *result; // r0
int *v4; // r5
if ( (*(_DWORD *)(a1 + 4) & 0xFFFFFEFF) == 2 )
{
result = BN_bin2bn(*(_BYTE **)(a1 + 8), *(_DWORD *)a1, a2);
v4 = result;
if ( result )
{
if ( (*(_DWORD *)(a1 + 4) & 0x100) != 0 )
{
BN_set_negative((_BOOL4)result, 1);
return v4;
}
}
else
{
ERR_put_error(13, 228, 105, (int)"crypto/asn1/a_int.c", 526);
return nullptr;
}
}
else
{
ERR_put_error(13, 228, 225, (int)"crypto/asn1/a_int.c", 520);
return nullptr;
}
return result;
}