// // cocos2d::CCUserDefault::setStringForKey from 0x18009f670 to 0x18009f75e (238 bytes) // // 6 xrefs: // > cocos2d::CCUserDefault::setBoolForKey @ 0x18009f257 // > @ 0x18013f174 // > @ 0x18013f188 // > @ 0x18013f198 // > @ 0x1801438a8 // > @ 0x1801b76bc // // 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 // void __fastcall cocos2d::CCUserDefault::setStringForKey(__int64 a1, const char *a2, __int64 a3) { const char *v3; // rdi const struct tinyxml2::XMLElement *v5; // rax tinyxml2::XMLDocument *v6; // rsi struct tinyxml2::XMLElement *v7; // rbx void **v8; // rcx const char *v9; // rdx struct tinyxml2::XMLNode *v10; // rax const char *v11; // rdx tinyxml2::XMLNode *v12; // [rsp+48h] [rbp+10h] BYREF tinyxml2::XMLDocument *v13; // [rsp+58h] [rbp+20h] BYREF if ( a2 ) { v3 = (const char *)a3; if ( *(_QWORD *)(a3 + 24) > 0xFu ) v3 = *(const char **)a3; if ( v3 ) { v5 = sub_18009EE00((__int64)a2, &v12, &v13); v6 = v13; v7 = v5; if ( v5 ) { v8 = *((void ***)v5 + 6); v9 = v3; if ( v8 ) { tinyxml2::XMLNode::SetValue(v8, v3, 0); goto LABEL_11; } } else { if ( !v12 ) goto LABEL_11; v7 = tinyxml2::XMLDocument::NewElement(v13, a2); tinyxml2::XMLNode::InsertEndChild(v12, v7); v9 = v3; } v10 = tinyxml2::XMLDocument::NewText(v6, v9); tinyxml2::XMLNode::InsertEndChild(v7, v10); LABEL_11: if ( v6 ) { cocos2d::CCUserDefault::sharedUserDefault(); v11 = (const char *)&cocos2d::CCUserDefault::m_sFilePath; if ( *((_QWORD *)&xmmword_1801A8A40 + 1) > 0xFu ) v11 = cocos2d::CCUserDefault::m_sFilePath; tinyxml2::XMLDocument::SaveFile((__int64)v6, v11, 0); (*(void (__fastcall **)(tinyxml2::XMLDocument *, __int64))(*(_QWORD *)v6 + 128LL))(v6, 1); } } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source