//
// ASN1_ENUMERATED_to_BN from 0xa77960 to 0xa77a14 (180 bytes)
//
// 2 xrefs:
// > i2s_ASN1_ENUMERATED @ 0xa71b44
// > ??> @ 0x8323c
//
// 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_ENUMERATED_to_BN(int a1, int *a2)
{
int *result; // r0
int *v4; // r5
if ( (*(_DWORD *)(a1 + 4) & 0xFFFFFEFF) == 0xA )
{
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;
}