//
// sub_10045217C from 0x10045217c to 0x1004521f4 (120 bytes)
//
// 2 xrefs:
// > sub_100452164 @ 0x100452170
// > sub_100452164 @ 0x100452178
//
// 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:05:21 +0000
//
__int64 __fastcall sub_10045217C(const char *a1, __int64 a2)
{
const char *v2; // x8
int v3; // w10
int v4; // t1
_BOOL4 v5; // w9
unsigned __int8 *v6; // x10
int v7; // w8
int v8; // w2
if ( a1 )
{
v2 = a1;
do
{
v4 = *(unsigned __int8 *)v2++;
v3 = v4;
}
while ( (byte_10076EDBD[v4] & 8) != 0 );
v5 = v3 == 45;
if ( v3 == 45 )
v6 = (unsigned __int8 *)(v2 + 1);
else
v6 = (unsigned __int8 *)v2;
if ( *(v6 - 1) == 48 )
{
v7 = (unsigned __int8)v2[v5];
v8 = 16;
if ( v7 != 120 )
{
if ( v7 == 88 )
v8 = 16;
else
v8 = 10;
}
}
else
{
v8 = 10;
}
return strtol(a1, nullptr, v8);
}
return a2;
}