// // cocos2d::CCFileUtils::writeToFile from 0x180074540 to 0x18007468f (335 bytes) // // 4 xrefs: // > @ 0x180106a78 // > @ 0x180107828 // > @ 0x18014cf68 // > @ 0x1801be680 // // 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 // // Hidden C++ exception states: #wind=1 bool __fastcall cocos2d::CCFileUtils::writeToFile(__int64 a1, __int64 a2, _QWORD *a3) { __int64 v5; // rax __int64 v6; // rdx tinyxml2::XMLDocument *v7; // rdi struct tinyxml2::XMLNode *v8; // rax tinyxml2::XMLDocument *v9; // rcx struct tinyxml2::XMLNode *v11; // rax tinyxml2::XMLElement *v12; // rsi tinyxml2::XMLAttribute *Attribute; // rax struct tinyxml2::XMLElement *v14; // rax bool v15; // bl v5 = sub_1800E4AC0(0x280u); if ( v5 ) { LOBYTE(v6) = 1; v7 = (tinyxml2::XMLDocument *)tinyxml2::XMLDocument::XMLDocument(v5, v6, 0); } else { v7 = nullptr; } if ( !v7 ) return 0; v8 = tinyxml2::XMLDocument::NewDeclaration(v7, "xml version=\"1.0\" encoding=\"UTF-8\""); v9 = v7; if ( !v8 || (tinyxml2::XMLNode::InsertEndChild(v7, v8), v11 = tinyxml2::XMLDocument::NewElement( v7, "!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\""), tinyxml2::XMLNode::InsertEndChild(v7, v11), v12 = tinyxml2::XMLDocument::NewElement(v7, "plist"), Attribute = tinyxml2::XMLElement::FindOrCreateAttribute(v12, "version"), tinyxml2::XMLAttribute::SetAttribute(Attribute, "1.0"), v9 = v7, !v12) ) { (*(void (__fastcall **)(tinyxml2::XMLDocument *, __int64))(*(_QWORD *)v7 + 128LL))(v9, 1); return 0; } tinyxml2::XMLNode::InsertEndChild(v7, v12); v14 = sub_180071AB0(a2, v7); if ( v14 ) { tinyxml2::XMLNode::InsertEndChild(v12, v14); if ( a3[3] > 0xFu ) a3 = (_QWORD *)*a3; v15 = (unsigned int)tinyxml2::XMLDocument::SaveFile(v7, a3, 0) == 0; (*(void (__fastcall **)(tinyxml2::XMLDocument *, __int64))(*(_QWORD *)v7 + 128LL))(v7, 1); return v15; } else { (*(void (__fastcall **)(tinyxml2::XMLDocument *, __int64))(*(_QWORD *)v7 + 128LL))(v7, 1); return 0; } }