//
// sub_18007FA30 from 0x18007fa30 to 0x18007faae (126 bytes)
//
// 4 xrefs:
// > DS_Dictionary::checkCompatibility @ 0x1800192d3
// > DS_Dictionary::loadRootSubDictFromCompressedFile @ 0x18001bc99
// > DS_Dictionary::loadRootSubDictFromFile @ 0x18001bfde
// > DS_Dictionary::loadRootSubDictFromString @ 0x18001c16a
//
// 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
//
int __fastcall sub_18007FA30(__int64 a1, int a2)
{
const char *v2; // r9
__int64 v3; // rcx
const char *i; // rax
char v5; // r8
const char *v6; // rdx
int v7; // r8d
if ( !*(_QWORD *)a1 )
return a2;
v2 = *(const char **)(*(_QWORD *)a1 + 16LL);
if ( !v2 )
return a2;
v3 = *(unsigned __int8 *)v2;
for ( i = v2; (byte_180101290[v3] & 8) != 0; ++i )
v3 = *((unsigned __int8 *)i + 1);
v5 = v3;
if ( (_BYTE)v3 == 45 )
v5 = i[1];
v6 = i + 1;
if ( (_BYTE)v3 != 45 )
v6 = i;
if ( v5 != 48 || (v7 = 16, ((v6[1] - 88) & 0xDF) != 0) )
v7 = 10;
return strtol(v2, nullptr, v7);
}