//
// cocos2d::CCDictionary::writeToFile from 0x100310130 to 0x100310204 (212 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
bool __fastcall cocos2d::CCDictionary::writeToFile(cocos2d::CCDictionary *a1, const char *a2)
{
double v2; // xmm0_8
cocos2d::CCDictionary *v3; // rbx
cocos2d::CCFileUtils *v4; // r14
size_t v5; // rax
size_t v6; // r12
char *v7; // r13
size_t v8; // rbx
bool result; // al
bool v10; // bl
_QWORD __dst[2]; // [rsp+10h] [rbp-40h] BYREF
void *__p; // [rsp+20h] [rbp-30h]
v3 = a1;
v4 = cocos2d::CCFileUtils::sharedFileUtils();
v5 = strlen(a2);
if ( v5 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(v2);
v6 = v5;
if ( v5 >= 0x17 )
{
v8 = 26;
if ( (v5 | 7) != 0x17 )
v8 = (v5 | 7) + 1;
v7 = (char *)operator new(v8);
__p = v7;
__dst[0] = v8 + 1;
v3 = a1;
__dst[1] = v6;
goto LABEL_8;
}
LOBYTE(__dst[0]) = 2 * v5;
v7 = (char *)__dst + 1;
if ( v5 )
LABEL_8:
memcpy(v7, a2, v6);
v7[v6] = 0;
result = ((__int64 (__fastcall *)(cocos2d::CCFileUtils *, cocos2d::CCDictionary *, _QWORD *))v4->__vftable[1].getClassTypeInfo)(
v4,
v3,
__dst);
if ( (__dst[0] & 1) != 0 )
{
v10 = result;
operator delete(__p);
return v10;
}
return result;
}