// // cocos2d::CCUserDefault::setIntegerForKey from 0x18009f540 to 0x18009f666 (294 bytes) // // 5 xrefs: // > @ 0x18013f0f0 // > @ 0x18013f104 // > @ 0x18013f114 // > @ 0x1801438a8 // > @ 0x1801b768c // // 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::setIntegerForKey(cocos2d::CCUserDefault *this, const char *a2, int a3) { const struct tinyxml2::XMLElement *v4; // rax tinyxml2::XMLDocument *v5; // rdi struct tinyxml2::XMLElement *v6; // rbx void **v7; // rcx struct tinyxml2::XMLNode *v8; // rax const char *v9; // rdx tinyxml2::XMLNode *v10; // [rsp+20h] [rbp-58h] BYREF tinyxml2::XMLDocument *v11; // [rsp+28h] [rbp-50h] BYREF char v12[16]; // [rsp+30h] [rbp-48h] BYREF __int128 v13; // [rsp+40h] [rbp-38h] __int128 v14; // [rsp+50h] [rbp-28h] __int16 v15; // [rsp+60h] [rbp-18h] if ( !a2 ) return; v15 = 0; *(_OWORD *)v12 = 0; v13 = 0; v14 = 0; sub_180009530(v12, "%d", a3); v4 = sub_18009EE00((__int64)a2, &v10, &v11); v5 = v11; v6 = v4; if ( v4 ) { v7 = *((void ***)v4 + 6); if ( v7 ) { tinyxml2::XMLNode::SetValue(v7, v12, 0); goto LABEL_8; } } else { if ( !v10 ) goto LABEL_8; v6 = tinyxml2::XMLDocument::NewElement(v11, a2); tinyxml2::XMLNode::InsertEndChild(v10, v6); } v8 = tinyxml2::XMLDocument::NewText(v5, v12); tinyxml2::XMLNode::InsertEndChild(v6, v8); LABEL_8: if ( v5 ) { cocos2d::CCUserDefault::sharedUserDefault(); v9 = (const char *)&cocos2d::CCUserDefault::m_sFilePath; if ( *((_QWORD *)&xmmword_1801A8A40 + 1) > 0xFu ) v9 = cocos2d::CCUserDefault::m_sFilePath; tinyxml2::XMLDocument::SaveFile((__int64)v5, v9, 0); (*(void (__fastcall **)(tinyxml2::XMLDocument *, __int64))(*(_QWORD *)v5 + 128LL))(v5, 1); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source