//
// DS_Dictionary::setDictForKey from 0x18001ee00 to 0x18001ef90 (400 bytes)
//
// 3 xrefs:
// > DS_Dictionary::setObjectForKey @ 0x18001f60a
// > ??> @ 0x18014cf68
// > ??> @ 0x1801b8da0
//
// 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:27 +0000
//
// Hidden C++ exception states: #wind=1
void __fastcall DS_Dictionary::setDictForKey(DS_Dictionary *this, const char *a2, struct cocos2d::CCDictionary *a3)
{
cocos2d::CCArray *v6; // rsi
unsigned int v7; // ebx
__m128i si128; // xmm6
cocos2d::CCString *v9; // rax
const char *CString; // rbp
size_t v11; // rax
struct cocos2d::CCObject *v12; // r14
void *v13; // rcx
__int128 v14; // [rsp+38h] [rbp-60h] BYREF
__m128i v15; // [rsp+48h] [rbp-50h]
if ( a3 )
{
DS_Dictionary::setSubDictForKey(this, a2);
if ( DS_Dictionary::stepIntoSubDictWithKey(this, a2) )
{
v6 = cocos2d::CCDictionary::allKeys(a3);
v7 = 0;
if ( (unsigned int)cocos2d::CCArray::count(v6) )
{
si128 = _mm_load_si128((const __m128i *)&xmmword_1800EC500);
do
{
v9 = cocos2d::CCArray::stringAtIndex(v6, v7);
CString = cocos2d::CCString::getCString(v9);
v14 = 0;
v15 = 0;
v11 = strlen(CString);
sub_18000CEF0(&v14, CString, v11);
v12 = (struct cocos2d::CCObject *)cocos2d::CCDictionary::objectForKey((__int64)a3, (__int64)&v14);
if ( v15.m128i_i64[1] > 0xFuLL )
{
v13 = (void *)v14;
if ( (unsigned __int64)(v15.m128i_i64[1] + 1) >= 0x1000 )
{
v13 = *(void **)(v14 - 8);
if ( (unsigned __int64)(v14 - (_QWORD)v13 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free_0(v13);
}
v15 = si128;
LOBYTE(v14) = 0;
DS_Dictionary::setObjectForKey(this, CString, v12);
++v7;
}
while ( v7 < (unsigned int)cocos2d::CCArray::count(v6) );
}
if ( (unsigned __int64)((__int64)(*((_QWORD *)this + 27) - *((_QWORD *)this + 26)) >> 3) > 1 )
*((_QWORD *)this + 27) -= 8LL;
}
}
}