// // sub_5EB9B4 from 0x5eb9b4 to 0x5eba7c (200 bytes) // // 6 xrefs: // > sub_5EBA84 @ 0x5eba98 // > cocos2d::CCUserDefault::getBoolForKey @ 0x5ebb56 // > cocos2d::CCUserDefault::getIntegerForKey @ 0x5ebbe2 // > cocos2d::CCUserDefault::getFloatForKey @ 0x5ebc68 // > cocos2d::CCUserDefault::getDoubleForKey @ 0x5ebcf8 // > cocos2d::CCUserDefault::getStringForKey @ 0x5ebd86 // // 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 // bool __fastcall sub_5EB9B4(const char *a1, tinyxml2::XMLDocument **a2) { _BOOL4 result; // r0 tinyxml2::XMLDocument *v5; // r5 cocos2d::CCFileUtils *v6; // r7 void (__fastcall *addSearchResolutionsOrder)(cocos2d::CCFileUtils *__hidden, const unsigned __int8 *); // r8 cocos2d::CCUserDefault *v8; // r0 int *XMLFilePath; // r0 const char *v10; // r0 char *v11; // r7 tinyxml2::XMLNode *v12; // r0 int ChildElement; // r5 cocos2d::CCUserDefault *v14; // r0 int *v15; // r0 const char *Str; // r0 _DWORD v17[2]; // [sp+0h] [bp-8h] BYREF v17[0] = a1; v17[1] = a2; result = cocos2d::CCUserDefault::isXMLFileExist(); if ( result ) { if ( a1 ) { v5 = (tinyxml2::XMLDocument *)operator new(0x174u); tinyxml2::XMLDocument::XMLDocument(v5, 1, 0); *a2 = v5; v6 = cocos2d::CCFileUtils::sharedFileUtils(); addSearchResolutionsOrder = v6->addSearchResolutionsOrder; v8 = cocos2d::CCUserDefault::sharedUserDefault(); XMLFilePath = cocos2d::CCUserDefault::getXMLFilePath(v8); v10 = (const char *)((int (__fastcall *)(cocos2d::CCFileUtils *, int, const char *, _DWORD *))addSearchResolutionsOrder)( v6, *XMLFilePath, "rb", v17); v11 = (char *)v10; if ( v10 && (tinyxml2::XMLDocument::Parse(v5, v10, 0xFFFFFFFF), operator delete[](v11), (v12 = (tinyxml2::XMLNode *)tinyxml2::XMLNode::FirstChildElement(v5, nullptr)) != nullptr) ) { ChildElement = tinyxml2::XMLNode::FirstChildElement(v12, nullptr); if ( ChildElement ) { do { Str = (const char *)tinyxml2::StrPair::GetStr((tinyxml2::StrPair *)(ChildElement + 12)); if ( !strcmp(Str, a1) ) break; ChildElement = tinyxml2::XMLNode::NextSiblingElement((tinyxml2::XMLNode *)ChildElement, nullptr); } while ( ChildElement ); } else { v14 = cocos2d::CCUserDefault::sharedUserDefault(); v15 = cocos2d::CCUserDefault::getXMLFilePath(v14); remove((const char *)*v15); } return ChildElement; } else { return 0; } } else { return 0; } } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source