// // CCContentManager::addDictDS from 0x100163920 to 0x100163af8 (472 bytes) // // 0 xrefs: // // 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 12:25:08 +0000 // __int64 __fastcall CCContentManager::addDictDS(__int64 a1, const char *a2) { const char *v2; // rbx __int64 v3; // r14 __int64 v4; // r15 size_t v5; // rax size_t v6; // r12 char *v7; // r13 size_t v8; // r14 __int64 DictForKey; // r15 _QWORD *v10; // r12 void *v11; // rdi __int64 v12; // r14 size_t v13; // rax size_t v14; // r12 char *v15; // r13 size_t v16; // r14 __int64 v18; // [rsp+8h] [rbp-48h] size_t __dst; // [rsp+10h] [rbp-40h] BYREF size_t v20; // [rsp+18h] [rbp-38h] void *__p; // [rsp+20h] [rbp-30h] v2 = a2; v3 = a1; v4 = *(_QWORD *)(a1 + 56); v5 = strlen(a2); if ( v5 >= 0xFFFFFFFFFFFFFFF8LL ) goto LABEL_25; v6 = v5; if ( v5 >= 0x17 ) { v8 = 26; if ( (v5 | 7) != 0x17 ) v8 = (v5 | 7) + 1; v7 = (char *)operator new(v8); __p = v7; __dst = v8 + 1; v3 = a1; v2 = a2; v20 = v6; goto LABEL_8; } LOBYTE(__dst) = 2 * v5; v7 = (char *)&__dst + 1; if ( v5 ) LABEL_8: memcpy(v7, v2, v6); v7[v6] = 0; DictForKey = cocos2d::CCDictionary::objectForKey(v4, &__dst); if ( (__dst & 1) != 0 ) operator delete(__p); if ( !DictForKey ) { v10 = operator new(0xF0u); sub_100158EB0((__int64)v10); DS_Dictionary::loadRootSubDictFromFile(v10, v2); DictForKey = DS_Dictionary::getDictForKey(v10, nullptr, 0); v11 = (void *)v10[26]; if ( v11 ) { v10[27] = v11; operator delete(v11); } pugi::xml_document::dxml_document(v10); operator delete(v10); v12 = *(_QWORD *)(v3 + 56); v13 = strlen(v2); if ( v13 < 0xFFFFFFFFFFFFFFF8LL ) { v14 = v13; if ( v13 >= 0x17 ) { v18 = v12; v16 = 26; if ( (v13 | 7) != 0x17 ) v16 = (v13 | 7) + 1; v15 = (char *)operator new(v16); __p = v15; __dst = v16 + 1; v12 = v18; v20 = v14; } else { LOBYTE(__dst) = 2 * v13; v15 = (char *)&__dst + 1; if ( !v13 ) { LABEL_22: v15[v14] = 0; cocos2d::CCDictionary::setObject(v12, DictForKey, &__dst); if ( (__dst & 1) != 0 ) operator delete(__p); return DictForKey; } } memcpy(v15, v2, v14); goto LABEL_22; } LABEL_25: sub_100003630(); } return DictForKey; }