//
// cocos2d::CCDictionary::createWithContentsOfFileThreadSafe from 0x18000a290 to 0x18000a323 (147 bytes)
//
// 4 xrefs:
// > cocos2d::CCDictionary::createWithContentsOfFile @ 0x18000a276
// > cocos2d::CCSpriteFrameCache::removeSpriteFramesFromFile @ 0x180092115
// > ??> @ 0x1801438a8
// > ??> @ 0x1801adce4
//
// 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
//
// Hidden C++ exception states: #wind=1
struct cocos2d::CCDictionary *__fastcall cocos2d::CCDictionary::createWithContentsOfFileThreadSafe(char *a1)
{
struct cocos2d::CCFileUtils *v1; // rax
__int64 v2; // rbx
void *v3; // rcx
void *Block[3]; // [rsp+20h] [rbp-38h] BYREF
unsigned __int64 v6; // [rsp+38h] [rbp-20h]
sub_180005910(Block, a1);
v1 = cocos2d::CCFileUtils::sharedFileUtils();
v2 = ((__int64 (__fastcall *)(struct cocos2d::CCFileUtils *, void **))v1->writeToFile)(v1, Block);
if ( v6 > 0xF )
{
v3 = Block[0];
if ( v6 + 1 >= 0x1000 )
{
v3 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v3 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free_0(v3);
}
return (struct cocos2d::CCDictionary *)v2;
}