//
// cocos2d::CCConfiguration::setObject from 0xd21794 to 0xd2188c (248 bytes)
//
// 1 xrefs:
// > ??> @ 0xe72e0
//
// 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 13:07:12 +0000
//
__int64 __fastcall cocos2d::CCConfiguration::setObject(
cocos2d::CCConfiguration *this,
const char *a2,
cocos2d::CCObject *a3)
{
__int64 v4; // x24
size_t v5; // x0
size_t v6; // x19
const char *v7; // x1
char *v8; // x3
unsigned __int64 v10; // x0
__int64 v11; // x21
char *v12; // x0
__int64 v14; // [xsp+50h] [xbp+50h] BYREF
size_t v15; // [xsp+58h] [xbp+58h]
void *v16; // [xsp+60h] [xbp+60h]
v14 = 0;
v4 = *((_QWORD *)this + 11);
v15 = 0;
v16 = nullptr;
v5 = strlen(a2);
v6 = v5;
v7 = a2;
if ( v5 > 0x16 )
{
v10 = (v5 + 16) & 0xFFFFFFFFFFFFFFF0LL;
v11 = v10 | 1;
v12 = (char *)operator new(v10);
v14 = v11;
v7 = a2;
v8 = v12;
v16 = v12;
v15 = v6;
}
else
{
LOBYTE(v14) = 2 * v5;
v8 = (char *)&v14 + 1;
if ( !v5 )
goto LABEL_3;
}
v8 = (char *)memcpy(v8, v7, v6);
LABEL_3:
v8[v6] = 0;
cocos2d::CCDictionary::setObject(v4, a3);
if ( (v14 & 1) != 0 )
operator delete(v16);
return _stack_chk_guard;
}