//
// cocos2d::CCTMXMapInfo::internalInit from 0x1800af860 to 0x1800af9e0 (384 bytes)
//
// 6 xrefs:
// > cocos2d::CCTMXMapInfo::formatWithTMXFile @ 0x1800af599
// > cocos2d::CCTMXMapInfo::formatWithXML @ 0x1800af648
// > cocos2d::CCTMXMapInfo::initWithTMXFile @ 0x1800af77c
// > cocos2d::CCTMXMapInfo::initWithXML @ 0x1800af7b7
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b84cc
//
// 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=2
void __fastcall cocos2d::CCTMXMapInfo::internalInit(cocos2d::CCTMXMapInfo *this, const char *a2, char *a3)
{
struct cocos2d::CCArray *v6; // rax
struct cocos2d::CCArray *v7; // rax
struct cocos2d::CCFileUtils *v8; // rax
__int64 v9; // rax
_BYTE *v10; // rcx
size_t v11; // r8
struct cocos2d::CCArray *v12; // rax
cocos2d::CCDictionary *v13; // rax
cocos2d::CCDictionary *v14; // rax
cocos2d::CCDictionary *v15; // rax
cocos2d::CCDictionary *v16; // rax
void *Block; // [rsp+28h] [rbp-40h] BYREF
unsigned __int64 v18; // [rsp+40h] [rbp-28h]
v6 = cocos2d::CCArray::create();
*((_QWORD *)this + 12) = v6;
cocos2d::CCObject::retain(v6);
v7 = cocos2d::CCArray::create();
*((_QWORD *)this + 11) = v7;
cocos2d::CCObject::retain(v7);
if ( a2 )
{
v8 = cocos2d::CCFileUtils::sharedFileUtils();
v9 = ((__int64 (__fastcall *)(struct cocos2d::CCFileUtils *, void **, const char *, _QWORD))v8->createCCArrayWithContentsOfFile)(
v8,
&Block,
a2,
0);
sub_1800656E0((__int64)this + 136, v9);
if ( v18 > 0xF )
{
v10 = Block;
if ( v18 + 1 >= 0x1000 )
{
v10 = *((_BYTE **)Block - 1);
if ( (unsigned __int64)((_BYTE *)Block - v10 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free_0(v10);
}
}
if ( a3 )
{
v11 = -1;
do
++v11;
while ( a3[v11] );
sub_180010050((void **)this + 21, a3, v11);
}
v12 = cocos2d::CCArray::createWithCapacity(4u);
*((_QWORD *)this + 13) = v12;
cocos2d::CCObject::retain(v12);
v13 = (cocos2d::CCDictionary *)operator new(0x48u);
if ( v13 )
v14 = cocos2d::CCDictionary::CCDictionary(v13);
else
v14 = nullptr;
*((_QWORD *)this + 16) = v14;
v15 = (cocos2d::CCDictionary *)operator new(0x48u);
if ( v15 )
v16 = cocos2d::CCDictionary::CCDictionary(v15);
else
v16 = nullptr;
*((_QWORD *)this + 29) = v16;
sub_180010050((void **)this + 25, (void *)Buf2, 0);
*((_BYTE *)this + 124) = 0;
*((_DWORD *)this + 30) = 1;
*((_DWORD *)this + 28) = 0;
*((_DWORD *)this + 60) = 0;
}