{"type": "func", "start": 4296418648, "end": 4296419048, "name": "DS_Dictionary::setObjectForKey", "pseudocode": "// \n// DS_Dictionary::setObjectForKey from 0x100162558 to 0x1001626e8 (400 bytes)\n// \n// 2 xrefs:\n// > DS_Dictionary::setArrayForKey @ 0x100162510\n// > DS_Dictionary::setDictForKey @ 0x100162ac4\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid __fastcall DS_Dictionary::setObjectForKey(DS_Dictionary *a1, const char *a2, cocos2d::CCObject *a3)\n{\n  char *CString; // x0\n  std::__vector_base<pugi::xml_node>::pointer end; // x8\n  void *v8[2]; // [xsp+8h] [xbp-58h] BYREF\n  __int64 v9; // [xsp+18h] [xbp-48h]\n  void *__p[2]; // [xsp+20h] [xbp-40h] BYREF\n  __int64 v11; // [xsp+30h] [xbp-30h]\n\n  if ( a3 )\n  {\n    if ( __dynamic_cast(\n           a3,\n           (const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,\n           (const struct __class_type_info *)&`typeinfo for'cocos2d::CCString,\n           0) )\n    {\n      CString = (char *)cocos2d::CCString::getCString((cocos2d::CCString *)a3);\n      sub_100009900(v8, CString);\n      *(_OWORD *)__p = *(_OWORD *)v8;\n      v11 = v9;\n      v8[1] = nullptr;\n      v9 = 0;\n      v8[0] = nullptr;\n      DS_Dictionary::setStringForKey((__int64)a1, a2, (__int64 *)__p, 0);\n      if ( SHIBYTE(v11) < 0 )\n        operator delete(__p[0]);\n      if ( SHIBYTE(v9) < 0 )\n        operator delete(v8[0]);\n      return;\n    }\n    if ( __dynamic_cast(\n           a3,\n           (const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,\n           (const struct __class_type_info *)&`typeinfo for'cocos2d::CCDictionary,\n           0) )\n    {\n      DS_Dictionary::setDictForKey(a1, a2, (cocos2d::CCDictionary *)a3);\n      return;\n    }\n    if ( __dynamic_cast(\n           a3,\n           (const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,\n           (const struct __class_type_info *)&`typeinfo for'cocos2d::CCArray,\n           0) )\n    {\n      DS_Dictionary::setArrayForKey(a1, a2, (cocos2d::CCArray *)a3);\n      return;\n    }\n  }\n  if ( ((unsigned int (__fastcall *)(cocos2d::CCObject *))a3->canEncode)(a3) )\n  {\n    DS_Dictionary::setSubDictForKey(a1, a2, 0, 1);\n    ((void (__fastcall *)(cocos2d::CCObject *, DS_Dictionary *))a3->encodeWithCoder)(a3, a1);\n    end = a1->dictTree.__end_;\n    if ( (unsigned __int64)((char *)end - (char *)a1->dictTree.__begin_) >= 9 )\n      a1->dictTree.__end_ = end - 1;\n  }\n}", "assembly": "; \n; DS_Dictionary::setObjectForKey from 0x100162558 to 0x1001626e8 (400 bytes)\n; \n; 2 xrefs:\n; > DS_Dictionary::setArrayForKey @ 0x100162510\n; > DS_Dictionary::setDictForKey @ 0x100162ac4\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nSUB             SP, SP, #0x70                                          ; +0x0, 0x100162558\nSTP             X22, X21, [SP,#0x60+var_20]                            ; +0x4, 0x10016255c\nSTP             X20, X19, [SP,#0x60+var_10]                            ; +0x8, 0x100162560\nSTP             X29, X30, [SP,#0x60+var_s0]                            ; +0xc, 0x100162564\nADD             X29, SP, #0x60                                         ; +0x10, 0x100162568\nMOV             X21, X2                                                ; +0x14, 0x10016256c\nMOV             X20, X1                                                ; +0x18, 0x100162570\nMOV             X19, X0                                                ; +0x1c, 0x100162574\nCBZ             X2, loc_100162680                                      ; +0x20, 0x100162578\nADRL            X1, _ZTIN7cocos2d8CCObjectE; lpstype                   ; +0x24, 0x10016257c\nADRL            X2, _ZTIN7cocos2d8CCStringE; lpdtype                   ; +0x2c, 0x100162584\nMOV             X0, X21; lpsrc                                         ; +0x34, 0x10016258c\nMOV             X3, #0; s2d                                            ; +0x38, 0x100162590\nBL              ___dynamic_cast                                        ; +0x3c, 0x100162594\nCBZ             X0, loc_100162600                                      ; +0x40, 0x100162598\nMOV             X0, X21                                                ; +0x44, 0x10016259c\nBL              cocos2d__CCString__getCString                          ; +0x48, 0x1001625a0\nMOV             X1, X0; __s                                            ; +0x4c, 0x1001625a4\nADD             X0, SP, #0x60+var_58; int                              ; +0x50, 0x1001625a8\nBL              sub_100009900                                          ; +0x54, 0x1001625ac\nLDUR            Q0, [SP,#0x60+var_58]                                  ; +0x58, 0x1001625b0\nSTR             Q0, [SP,#0x60+__p]                                     ; +0x5c, 0x1001625b4\nLDR             X8, [SP,#0x60+var_48]                                  ; +0x60, 0x1001625b8\nSTR             X8, [SP,#0x60+var_30]                                  ; +0x64, 0x1001625bc\nSTP             XZR, XZR, [SP,#0x60+var_58+8]                          ; +0x68, 0x1001625c0\nSTR             XZR, [SP,#0x60+var_58]                                 ; +0x6c, 0x1001625c4\nADD             X2, SP, #0x60+__p                                      ; +0x70, 0x1001625c8\nMOV             X0, X19                                                ; +0x74, 0x1001625cc\nMOV             X1, X20                                                ; +0x78, 0x1001625d0\nMOV             W3, #0                                                 ; +0x7c, 0x1001625d4\nBL              DS_Dictionary__setStringForKey                         ; +0x80, 0x1001625d8\nLDRSB           W8, [SP,#0x60+var_30+7]                                ; +0x84, 0x1001625dc\nTBZ             W8, #0x1F, loc_1001625EC                               ; +0x88, 0x1001625e0\nLDR             X0, [SP,#0x60+__p]; __p                                ; +0x8c, 0x1001625e4\nBL              __ZdlPv; operator delete(void *)                       ; +0x90, 0x1001625e8\nLDRSB           W8, [SP,#0x60+var_48+7]                                ; +0x94, 0x1001625ec\nTBZ             W8, #0x1F, loc_1001626D4                               ; +0x98, 0x1001625f0\nLDR             X0, [SP,#0x60+var_58]; __p                             ; +0x9c, 0x1001625f4\nBL              __ZdlPv; operator delete(void *)                       ; +0xa0, 0x1001625f8\nB               loc_1001626D4                                          ; +0xa4, 0x1001625fc\nADRL            X1, _ZTIN7cocos2d8CCObjectE; lpstype                   ; +0xa8, 0x100162600\nADRL            X2, _ZTIN7cocos2d12CCDictionaryE; lpdtype              ; +0xb0, 0x100162608\nMOV             X0, X21; lpsrc                                         ; +0xb8, 0x100162610\nMOV             X3, #0; s2d                                            ; +0xbc, 0x100162614\nBL              ___dynamic_cast                                        ; +0xc0, 0x100162618\nCBZ             X0, loc_100162640                                      ; +0xc4, 0x10016261c\nMOV             X0, X19                                                ; +0xc8, 0x100162620\nMOV             X1, X20                                                ; +0xcc, 0x100162624\nMOV             X2, X21                                                ; +0xd0, 0x100162628\nLDP             X29, X30, [SP,#0x60+var_s0]                            ; +0xd4, 0x10016262c\nLDP             X20, X19, [SP,#0x60+var_10]                            ; +0xd8, 0x100162630\nLDP             X22, X21, [SP,#0x60+var_20]                            ; +0xdc, 0x100162634\nADD             SP, SP, #0x70 ; 'p'                                    ; +0xe0, 0x100162638\nB               DS_Dictionary__setDictForKey                           ; +0xe4, 0x10016263c\nADRL            X1, _ZTIN7cocos2d8CCObjectE; lpstype                   ; +0xe8, 0x100162640\nADRL            X2, _ZTIN7cocos2d7CCArrayE; lpdtype                    ; +0xf0, 0x100162648\nMOV             X0, X21; lpsrc                                         ; +0xf8, 0x100162650\nMOV             X3, #0; s2d                                            ; +0xfc, 0x100162654\nBL              ___dynamic_cast                                        ; +0x100, 0x100162658\nCBZ             X0, loc_100162680                                      ; +0x104, 0x10016265c\nMOV             X0, X19                                                ; +0x108, 0x100162660\nMOV             X1, X20                                                ; +0x10c, 0x100162664\nMOV             X2, X21                                                ; +0x110, 0x100162668\nLDP             X29, X30, [SP,#0x60+var_s0]                            ; +0x114, 0x10016266c\nLDP             X20, X19, [SP,#0x60+var_10]                            ; +0x118, 0x100162670\nLDP             X22, X21, [SP,#0x60+var_20]                            ; +0x11c, 0x100162674\nADD             SP, SP, #0x70 ; 'p'                                    ; +0x120, 0x100162678\nB               DS_Dictionary__setArrayForKey                          ; +0x124, 0x10016267c\nLDR             X8, [X21]                                              ; +0x128, 0x100162680\nLDR             X8, [X8,#0x38]                                         ; +0x12c, 0x100162684\nMOV             X0, X21                                                ; +0x130, 0x100162688\nBLR             X8                                                     ; +0x134, 0x10016268c\nCBZ             W0, loc_1001626D4                                      ; +0x138, 0x100162690\nMOV             X0, X19                                                ; +0x13c, 0x100162694\nMOV             X1, X20                                                ; +0x140, 0x100162698\nMOV             W2, #0                                                 ; +0x144, 0x10016269c\nMOV             W3, #1                                                 ; +0x148, 0x1001626a0\nBL              DS_Dictionary__setSubDictForKey                        ; +0x14c, 0x1001626a4\nLDR             X8, [X21]                                              ; +0x150, 0x1001626a8\nLDR             X8, [X8,#0x30]                                         ; +0x154, 0x1001626ac\nMOV             X0, X21                                                ; +0x158, 0x1001626b0\nMOV             X1, X19                                                ; +0x15c, 0x1001626b4\nBLR             X8                                                     ; +0x160, 0x1001626b8\nLDP             X9, X8, [X19,#0xD0]                                    ; +0x164, 0x1001626bc\nSUB             X9, X8, X9                                             ; +0x168, 0x1001626c0\nCMP             X9, #9                                                 ; +0x16c, 0x1001626c4\nB.CC            loc_1001626D4                                          ; +0x170, 0x1001626c8\nSUB             X8, X8, #8                                             ; +0x174, 0x1001626cc\nSTR             X8, [X19,#0xD8]                                        ; +0x178, 0x1001626d0\nLDP             X29, X30, [SP,#0x60+var_s0]                            ; +0x17c, 0x1001626d4\nLDP             X20, X19, [SP,#0x60+var_10]                            ; +0x180, 0x1001626d8\nLDP             X22, X21, [SP,#0x60+var_20]                            ; +0x184, 0x1001626dc\nADD             SP, SP, #0x70 ; 'p'                                    ; +0x188, 0x1001626e0\nRET                                                                    ; +0x18c, 0x1001626e4", "xrefs": ["DS_Dictionary::setArrayForKey @ 0x100162510", "DS_Dictionary::setDictForKey @ 0x100162ac4"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}