//
// cocos2d::CCDictionary::writeToFile from 0x18000c620 to 0x18000c6cf (175 bytes)
//
// 2 xrefs:
// > ??> @ 0x18014cf68
// > ??> @ 0x1801b7e94
//
// 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:20 +0000
//
// Hidden C++ exception states: #wind=1
__int64 __fastcall cocos2d::CCDictionary::writeToFile(cocos2d::CCDictionary *this, char *a2)
{
struct cocos2d::CCFileUtils *v3; // rax
unsigned __int8 v4; // bl
void *v5; // r8
void *Block[3]; // [rsp+30h] [rbp-38h] BYREF
unsigned __int64 v8; // [rsp+48h] [rbp-20h]
sub_180005A10(Block, a2);
v3 = cocos2d::CCFileUtils::sharedFileUtils();
v4 = (*(__int64 (__fastcall **)(struct cocos2d::CCFileUtils *, cocos2d::CCDictionary *, void **))(*(_QWORD *)v3 + 240LL))(
v3,
this,
Block);
if ( v8 > 0xF )
{
v5 = Block[0];
if ( v8 + 1 >= 0x1000 )
{
v5 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v5 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free_0(v5);
}
return v4;
}