//
// cocos2d::CCTMXMapInfo::internalInit from 0x1004cd520 to 0x1004cd63d (285 bytes)
//
// 4 xrefs:
// > cocos2d::CCTMXMapInfo::formatWithTMXFile @ 0x1004cd270
// > cocos2d::CCTMXMapInfo::initWithTMXFile @ 0x1004cd3ab
// > cocos2d::CCTMXMapInfo::formatWithXML @ 0x1004cd489
// > cocos2d::CCTMXMapInfo::initWithXML @ 0x1004cd4ff
//
// 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
//
void __fastcall cocos2d::CCTMXMapInfo::internalInit(cocos2d::CCTMXMapInfo *a1, const char *a2, const char *a3)
{
cocos2d::CCObject *v5; // rax
cocos2d::CCObject *v6; // rdi
cocos2d::CCObject *v7; // rax
cocos2d::CCFileUtils *v8; // rax
cocos2d::CCObject *v9; // rax
cocos2d::CCTMXMapInfo_vtbl *v10; // r14
void *v11; // r14
__int128 v12; // [rsp+0h] [rbp-30h] BYREF
__int64 v13; // [rsp+10h] [rbp-20h]
v5 = (cocos2d::CCObject *)sub_10071F9E0(a1, a2);
*(_QWORD *)&a1[1].m_uIndexInArray = v5;
v6 = v5;
cocos2d::CCObject::retain(v5);
v7 = (cocos2d::CCObject *)sub_10071F9E0(v6, a2);
*(_QWORD *)&a1[1].m_uAutoReleaseCount = v7;
cocos2d::CCObject::retain(v7);
if ( a2 )
{
v8 = cocos2d::CCFileUtils::sharedFileUtils();
((void (__fastcall *)(__int128 *, cocos2d::CCFileUtils *, const char *, _QWORD))v8->createCCArrayWithContentsOfFile)(
&v12,
v8,
a2,
0);
if ( (a1[2].m_uID & 1) != 0 )
operator delete(*(void **)&a1[2].m_uAutoReleaseCount);
*(_QWORD *)&a1[2].m_uAutoReleaseCount = v13;
*(_OWORD *)&a1[2].m_uID = v12;
}
if ( a3 )
std::string::assign((std::string *)&a1[2].m_uIndexInArray, a3);
v9 = (cocos2d::CCObject *)sub_10071FD00(4);
*(_QWORD *)&a1[1].m_unknown2 = v9;
cocos2d::CCObject::retain(v9);
v10 = (cocos2d::CCTMXMapInfo_vtbl *)operator new(0x48u);
cocos2d::CCDictionary::CCDictionary((__int64)v10);
a1[2].cocos2d::CCObject::cocos2d::CCCopying::__vftable = v10;
v11 = operator new(0x48u);
cocos2d::CCDictionary::CCDictionary((__int64)v11);
*(_QWORD *)&a1[3].m_nTag = v11;
std::string::assign((std::string *)&a1[2].cocos2d::CCSAXDelegator, "");
BYTE4(a1[1].cocos2d::CCSAXDelegator::__vftable) = 0;
LODWORD(a1[1].cocos2d::CCSAXDelegator::__vftable) = 1;
a1[1].m_uOrderOfArrival = 0;
a1[3].m_uAutoReleaseCount = 0;
}