//
// BN_asc2bn from 0xd7e250 to 0xd7e2fc (172 bytes)
//
// 2 xrefs:
// > sub_DD5D38 @ 0xdd5fb8
// > ??> @ 0x45e40
//
// 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 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;
}