//
// sub_18001C710 from 0x18001c710 to 0x18001c82e (286 bytes)
//
// 12 xrefs:
// > DS_Dictionary::DS_Dictionary @ 0x180016d65
// > DS_Dictionary::getObjectForKey @ 0x18001a904
// > DS_Dictionary::loadRootSubDictFromCompressedFile @ 0x18001b99a
// > DS_Dictionary::loadRootSubDictFromFile @ 0x18001bcc8
// > DS_Dictionary::loadRootSubDictFromString @ 0x18001bf7e
// > DS_Dictionary::setArrayForKey @ 0x18001e8fa
// > DS_Dictionary::setSubDictForKey @ 0x1800205b0
// > DS_Dictionary::stepBackToRootSubDict @ 0x18002161b
// > ??> @ 0x18013bc18
// > ??> @ 0x18013bc64
// > ??> @ 0x18013bc80
// > ??> @ 0x1801b8ba8
//
// 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:21:26 +0000
//
__int64 __fastcall sub_18001C710(const void **a1, __int64 *a2)
{
char *v4; // rcx
char *v5; // rdi
__int64 result; // rax
__int64 v7; // rsi
unsigned __int64 v8; // rcx
unsigned __int64 v9; // rdx
unsigned __int64 v10; // rbp
char *v11; // r14
char *v12; // rcx
char *v13; // r8
_BYTE *v14; // rdx
size_t v15; // r8
v4 = (char *)a1[2];
v5 = (char *)a1[1];
if ( v5 == v4 )
{
v7 = (v5 - (_BYTE *)*a1) >> 3;
if ( v7 == 0x1FFFFFFFFFFFFFFFLL )
std::vector::_Xlen();
v8 = (v4 - (_BYTE *)*a1) >> 3;
v9 = v8 >> 1;
if ( v8 <= 0x1FFFFFFFFFFFFFFFLL - (v8 >> 1) )
{
v10 = v7 + 1;
if ( v9 + v8 >= v7 + 1 )
v10 = v9 + v8;
if ( v10 > 0x1FFFFFFFFFFFFFFFLL )
Concurrency::cancel_current_task();
}
else
{
v10 = 0x1FFFFFFFFFFFFFFFLL;
}
v11 = (char *)sub_18000CE80(8 * v10);
*(_QWORD *)&v11[8 * v7] = *a2;
v12 = v11;
v13 = (char *)a1[1];
v14 = *a1;
if ( v5 == v13 )
{
v15 = v13 - v14;
}
else
{
memmove(v11, v14, v5 - v14);
v15 = (_BYTE *)a1[1] - v5;
v12 = &v11[8 * v7 + 8];
v14 = v5;
}
memmove(v12, v14, v15);
return sub_1800186A0((__int64)a1, (__int64)v11, v7 + 1, v10);
}
else
{
result = *a2;
*(_QWORD *)v5 = *a2;
a1[1] = (char *)a1[1] + 8;
}
return result;
}