//
// BN_asc2bn from 0xffc5b0 to 0xffc65c (172 bytes)
//
// 2 xrefs:
// > sub_1054098 @ 0x1054318
// > ??> @ 0x634d8
//
// 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 13:15:51 +0000
//
__int64 __fastcall BN_asc2bn(__int64 *a1, unsigned __int8 *a2)
{
unsigned __int8 *v2; // x19
int v4; // w2
__int64 result; // x0
v2 = a2;
v4 = *a2;
if ( v4 == 45 )
{
++a2;
v4 = v2[1];
}
if ( v4 == 48 && (a2[1] & 0xDF) == 0x58 )
{
if ( !(unsigned int)BN_hex2bn(a1, a2 + 2) )
return 0;
}
else if ( !(unsigned int)BN_dec2bn(a1, a2) )
{
return 0;
}
if ( *v2 != 45 )
return 1;
result = 1;
if ( *(_DWORD *)(*a1 + 8) )
*(_DWORD *)(*a1 + 16) = 1;
return result;
}