//
// cocos2d::CCTMXMapInfo::internalInit from 0x1004c9090 to 0x1004c91ad (285 bytes)
//
// 4 xrefs:
// > cocos2d::CCTMXMapInfo::formatWithTMXFile @ 0x1004c8de0
// > cocos2d::CCTMXMapInfo::initWithTMXFile @ 0x1004c8f1b
// > cocos2d::CCTMXMapInfo::formatWithXML @ 0x1004c8ff9
// > cocos2d::CCTMXMapInfo::initWithXML @ 0x1004c906f
//
// 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 12:31:09 +0000
//
std::string *__fastcall cocos2d::CCTMXMapInfo::internalInit(__int64 a1, __int64 a2, const std::string::value_type *a3)
{
__int64 v5; // rax
__int64 v6; // rdi
__int64 v7; // rax
__int64 v8; // rdi
__int64 v9; // rax
__int64 v10; // rax
void *v11; // r14
void *v12; // r14
std::string *result; // rax
__int128 v14; // [rsp+0h] [rbp-30h] BYREF
__int64 v15; // [rsp+10h] [rbp-20h]
v5 = sub_1007FE900(a1);
*(_QWORD *)(a1 + 96) = v5;
v6 = v5;
cocos2d::CCObject::retain(v5);
v7 = sub_1007FE900(v6);
*(_QWORD *)(a1 + 88) = v7;
v8 = v7;
cocos2d::CCObject::retain(v7);
if ( a2 )
{
v9 = cocos2d::CCFileUtils::sharedFileUtils(v8, a2);
(*(void (__fastcall **)(__int128 *, __int64, __int64, _QWORD))(*(_QWORD *)v9 + 48LL))(&v14, v9, a2, 0);
if ( (*(_BYTE *)(a1 + 136) & 1) != 0 )
operator delete(*(void **)(a1 + 152));
*(_QWORD *)(a1 + 152) = v15;
*(_OWORD *)(a1 + 136) = v14;
}
if ( a3 )
std::string::assign((std::string *)(a1 + 160), a3);
v10 = sub_1007FEC20(4);
*(_QWORD *)(a1 + 104) = v10;
cocos2d::CCObject::retain(v10);
v11 = operator new(0x48u);
cocos2d::CCDictionary::CCDictionary((__int64)v11);
*(_QWORD *)(a1 + 128) = v11;
v12 = operator new(0x48u);
cocos2d::CCDictionary::CCDictionary((__int64)v12);
*(_QWORD *)(a1 + 208) = v12;
result = std::string::assign((std::string *)(a1 + 184), "");
*(_BYTE *)(a1 + 124) = 0;
*(_DWORD *)(a1 + 120) = 1;
*(_DWORD *)(a1 + 112) = 0;
*(_DWORD *)(a1 + 216) = 0;
return result;
}