//
// sub_180071AB0 from 0x180071ab0 to 0x180071c95 (485 bytes)
//
// 6 xrefs:
// > sub_180071AB0 @ 0x180071c49
// > sub_180071CA0 @ 0x180071dbb
// > cocos2d::CCFileUtils::writeToFile @ 0x18007461b
// > ??> @ 0x180144134
// > ??> @ 0x180144144
// > ??> @ 0x1801be53c
//
// 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:57 +0000
//
struct tinyxml2::XMLElement *__fastcall sub_180071AB0(__int64 a1, tinyxml2::XMLDocument *a2)
{
struct tinyxml2::XMLElement *result; // rax
tinyxml2::XMLNode *v5; // r15
__int64 v6; // rdi
__int64 i; // r14
struct tinyxml2::XMLNode *v8; // rbx
struct tinyxml2::XMLNode *v9; // rax
__int64 v10; // rdi
cocos2d::CCString *v11; // rbx
tinyxml2::XMLNode *v12; // rdi
const char *CString; // rax
struct tinyxml2::XMLNode *v14; // rax
__int64 v15; // rbx
struct tinyxml2::XMLElement *v16; // rax
unsigned int *v17; // rbx
__int64 v18; // rax
_QWORD *v19; // rbx
_QWORD *j; // rbp
struct tinyxml2::XMLNode *v21; // rax
__int64 v22; // rax
result = tinyxml2::XMLDocument::NewElement(a2, "dict");
v5 = result;
if ( a1 )
{
v6 = *(_QWORD *)(a1 + 56);
if ( v6 )
{
for ( i = *(_QWORD *)(v6 + 288); ; i = *(_QWORD *)(i + 288) )
{
v8 = tinyxml2::XMLDocument::NewElement(a2, "key");
tinyxml2::XMLNode::InsertEndChild(v5, v8);
v9 = tinyxml2::XMLDocument::NewText(a2, (const char *)v6);
tinyxml2::XMLNode::InsertEndChild(v8, v9);
v10 = *(_QWORD *)(v6 + 264);
v11 = (cocos2d::CCString *)_RTDynamicCast(
v10,
0,
&cocos2d::CCObject `RTTI Type Descriptor',
&cocos2d::CCString `RTTI Type Descriptor',
0);
if ( v11 )
{
v12 = tinyxml2::XMLDocument::NewElement(a2, "string");
CString = cocos2d::CCString::getCString(v11);
v14 = tinyxml2::XMLDocument::NewText(a2, CString);
tinyxml2::XMLNode::InsertEndChild(v12, v14);
}
else
{
v15 = _RTDynamicCast(
v10,
0,
&cocos2d::CCObject `RTTI Type Descriptor',
&cocos2d::CCArray `RTTI Type Descriptor',
0);
if ( v15 )
{
v16 = tinyxml2::XMLDocument::NewElement(a2, "array");
v17 = *(unsigned int **)(v15 + 56);
v12 = v16;
v18 = *v17;
if ( (_DWORD)v18 )
{
v19 = *((_QWORD **)v17 + 2);
for ( j = &v19[v18 - 1]; v19 <= j; ++v19 )
{
if ( !*v19 )
break;
v21 = (struct tinyxml2::XMLNode *)sub_180071CA0(*v19, a2);
if ( v21 )
tinyxml2::XMLNode::InsertEndChild(v12, v21);
}
}
}
else
{
v22 = _RTDynamicCast(
v10,
0,
&cocos2d::CCObject `RTTI Type Descriptor',
&cocos2d::CCDictionary `RTTI Type Descriptor',
0);
if ( !v22 )
goto LABEL_18;
v12 = (tinyxml2::XMLNode *)sub_180071AB0(v22, a2);
}
}
if ( v12 )
tinyxml2::XMLNode::InsertEndChild(v5, v12);
LABEL_18:
v6 = i;
if ( !i )
return v5;
}
}
}
return result;
}