//
// cocos2d::CCDictionary::createWithContentsOfFileThreadSafe from 0xd43cb0 to 0xd43db4 (260 bytes)
//
// 3 xrefs:
// > cocos2d::CCDictionary::createWithContentsOfFile @ 0xd43dc0
// > cocos2d::CCSpriteFrameCache::removeSpriteFramesFromFile @ 0xd8c310
// > ??> @ 0x693a0
//
// 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:32 +0000
//
__int64 __fastcall cocos2d::CCDictionary::createWithContentsOfFileThreadSafe(
cocos2d::CCDictionary *this,
const char *a2)
{
__int64 *v3; // x22
__int64 v4; // x1
__int64 (__fastcall *v5)(__int64 *, __int64 *); // x25
size_t v6; // x0
size_t v7; // x19
char *v8; // x3
__int64 v9; // x19
unsigned __int64 v11; // x0
__int64 v12; // [xsp+50h] [xbp+50h] BYREF
size_t v13; // [xsp+58h] [xbp+58h]
void *v14; // [xsp+60h] [xbp+60h]
v3 = (__int64 *)cocos2d::CCFileUtils::sharedFileUtils(_stack_chk_guard);
v4 = *v3;
v12 = 0;
v13 = 0;
v5 = *(__int64 (__fastcall **)(__int64 *, __int64 *))(v4 + 240);
v14 = nullptr;
v6 = strlen((const char *)this);
v7 = v6;
if ( v6 > 0x16 )
{
v11 = (v6 + 16) & 0xFFFFFFFFFFFFFFF0LL;
v12 = v11 | 1;
v8 = (char *)operator new(v11);
v14 = v8;
v13 = v7;
}
else
{
LOBYTE(v12) = 2 * v6;
v8 = (char *)&v12 + 1;
if ( !v6 )
goto LABEL_3;
}
v8 = (char *)memcpy(v8, this, v7);
LABEL_3:
v8[v7] = 0;
v9 = v5(v3, &v12);
if ( (v12 & 1) != 0 )
operator delete(v14);
return v9;
}