//
// sub_180082940 from 0x180082940 to 0x1800829b6 (118 bytes)
//
// 4 xrefs:
// > DS_Dictionary::checkCompatibility @ 0x180018ee3
// > DS_Dictionary::loadRootSubDictFromCompressedFile @ 0x18001bb72
// > DS_Dictionary::loadRootSubDictFromFile @ 0x18001be97
// > DS_Dictionary::loadRootSubDictFromString @ 0x18001c030
//
// This function is hookable on this platform (idp: pc, 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:22:03 +0000
//
int __fastcall sub_180082940(__int64 a1, int a2)
{
const char *v2; // r9
__int64 v3; // rdx
_BYTE *v4; // rax
__int64 v5; // rcx
_BYTE *v6; // rcx
int v7; // r8d
if ( !*(_QWORD *)a1 )
return a2;
v2 = *(const char **)(*(_QWORD *)a1 + 16LL);
if ( !v2 )
return a2;
v3 = *(unsigned __int8 *)v2;
v4 = *(_BYTE **)(*(_QWORD *)a1 + 16LL);
if ( (byte_1801079B0[v3] & 8) != 0 )
{
do
v5 = (unsigned __int8)*++v4;
while ( (byte_1801079B0[v5] & 8) != 0 );
LOBYTE(v3) = v5;
}
v6 = v4 + 1;
if ( (_BYTE)v3 != 45 )
v6 = v4;
if ( *v6 != 48 || (v7 = 16, ((v6[1] - 88) & 0xDF) != 0) )
v7 = 10;
return strtol(v2, nullptr, v7);
}