{"type": "func", "start": 6288232, "end": 6288460, "name": "DS_Dictionary::setObjectForKey", "pseudocode": "// \n// DS_Dictionary::setObjectForKey from 0x5ff368 to 0x5ff44c (228 bytes)\n// \n// 2 xrefs:\n// > DS_Dictionary::setArrayForKey @ 0x5ff34c\n// > DS_Dictionary::setDictForKey @ 0x5ff4dc\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 DS_Dictionary::setObjectForKey(DS_Dictionary *a1, const char *a2, cocos2d::CCObject *a3)\n{\n  char *CString; // r0\n  const char *v7; // [sp+Ch] [bp-10h] BYREF\n  const char *v8; // [sp+10h] [bp-Ch] BYREF\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_776584((int)&v7, CString);\n      v8 = v7;\n      v7 = (const char *)&unk_ACDDA8;\n      DS_Dictionary::setStringForKey((int)a1, a2, &v8);\n      sub_774008(&v8);\n      sub_774008(&v7);\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 ( ((int (__fastcall *)(cocos2d::CCObject *))a3->canEncode)(a3) )\n  {\n    DS_Dictionary::setSubDictForKey(a1, a2, 0, 1);\n    a3->encodeWithCoder(a3, a1);\n    DS_Dictionary::stepOutOfSubDict(a1);\n  }\n}", "assembly": "; \n; DS_Dictionary::setObjectForKey from 0x5ff368 to 0x5ff44c (228 bytes)\n; \n; 2 xrefs:\n; > DS_Dictionary::setArrayForKey @ 0x5ff34c\n; > DS_Dictionary::setDictForKey @ 0x5ff4dc\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\nPUSH.W          {R4-R9,LR}                                             ; +0x0, 0x5ff368\nSUB             SP, SP, #0x1C                                          ; +0x4, 0x5ff36c\nLDR             R5, =(_GLOBAL_OFFSET_TABLE_ - 0x5FF37A)                ; +0x6, 0x5ff36e\nMOV             R6, R0                                                 ; +0x8, 0x5ff370\nLDR             R3, =(__stack_chk_guard_ptr - 0xAB8990)                ; +0xa, 0x5ff372\nMOV             R8, R1                                                 ; +0xc, 0x5ff374\nADD             R5, PC; _GLOBAL_OFFSET_TABLE_                          ; +0xe, 0x5ff376\nMOV             R4, R2                                                 ; +0x10, 0x5ff378\nLDR             R7, [R5,R3]; __stack_chk_guard                         ; +0x12, 0x5ff37a\nLDR             R3, [R7]                                               ; +0x14, 0x5ff37c\nSTR             R3, [SP,#0x1C+var_8]                                   ; +0x16, 0x5ff37e\nCMP             R2, #0                                                 ; +0x18, 0x5ff380\nBEQ             loc_5FF414                                             ; +0x1a, 0x5ff382\nLDR             R3, =(_ZTIN7cocos2d8CCObjectE_ptr - 0xAB8990)          ; +0x1c, 0x5ff384\nMOV             R0, R2; lpsrc                                          ; +0x1e, 0x5ff386\nLDR             R3, [R5,R3]; _ZTIN7cocos2d8CCObjectE_ptr               ; +0x20, 0x5ff388\nSTR             R3, [SP,#0x1C+lpstype]                                 ; +0x22, 0x5ff38a\nLDR             R3, =(_ZTIN7cocos2d8CCStringE_ptr - 0xAB8990)          ; +0x24, 0x5ff38c\nLDR             R1, [SP,#0x1C+lpstype]; lpstype                        ; +0x26, 0x5ff38e\nLDR             R3, [R5,R3]; _ZTIN7cocos2d8CCStringE_ptr               ; +0x28, 0x5ff390\nSTR             R3, [SP,#0x1C+var_18]                                  ; +0x2a, 0x5ff392\nMOV             R2, R3; lpdtype                                        ; +0x2c, 0x5ff394\nMOVS            R3, #0; s2d                                            ; +0x2e, 0x5ff396\nBL              __dynamic_cast                                         ; +0x30, 0x5ff398\nMOV             R3, R0; s2d                                            ; +0x34, 0x5ff39c\nCBNZ            R0, loc_5FF3CE                                         ; +0x36, 0x5ff39e\nLDR             R2, =(_ZTIN7cocos2d12CCDictionaryE_ptr - 0xAB8990)     ; +0x38, 0x5ff3a0\nMOV             R0, R4; lpsrc                                          ; +0x3a, 0x5ff3a2\nLDR             R1, [SP,#0x1C+lpstype]; lpstype                        ; +0x3c, 0x5ff3a4\nLDR             R2, [R5,R2]; _ZTIN7cocos2d12CCDictionaryE_ptr ; lpdtype ; +0x3e, 0x5ff3a6\nSTR             R2, [SP,#0x1C+var_18]                                  ; +0x40, 0x5ff3a8\nBL              __dynamic_cast                                         ; +0x42, 0x5ff3aa\nMOV             R3, R0; s2d                                            ; +0x46, 0x5ff3ae\nCBNZ            R0, loc_5FF408                                         ; +0x48, 0x5ff3b0\nLDR             R2, =(_ZTIN7cocos2d7CCArrayE_ptr - 0xAB8990)           ; +0x4a, 0x5ff3b2\nMOV             R0, R4; lpsrc                                          ; +0x4c, 0x5ff3b4\nLDR             R1, [SP,#0x1C+lpstype]; lpstype                        ; +0x4e, 0x5ff3b6\nLDR             R2, [R5,R2]; _ZTIN7cocos2d7CCArrayE_ptr ; lpdtype      ; +0x50, 0x5ff3b8\nSTR             R2, [SP,#0x1C+var_18]                                  ; +0x52, 0x5ff3ba\nBL              __dynamic_cast                                         ; +0x54, 0x5ff3bc\nCBZ             R0, loc_5FF414                                         ; +0x58, 0x5ff3c0\nMOV             R0, R6; this                                           ; +0x5a, 0x5ff3c2\nMOV             R1, R8; char *                                         ; +0x5c, 0x5ff3c4\nMOV             R2, R4; cocos2d::CCArray *                             ; +0x5e, 0x5ff3c6\nBL              _ZN13DS_Dictionary14setArrayForKeyEPKcPN7cocos2d7CCArrayE; DS_Dictionary::setArrayForKey(char const*,cocos2d::CCArray *) ; +0x60, 0x5ff3c8\nB               loc_5FF43A                                             ; +0x64, 0x5ff3cc\nMOV             R0, R4; this                                           ; +0x66, 0x5ff3ce\nADD.W           R9, SP, #0x1C+var_10                                   ; +0x68, 0x5ff3d0\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x6c, 0x5ff3d4\nADD             R2, SP, #0x1C+var_14                                   ; +0x70, 0x5ff3d8\nADD             R4, SP, #0x1C+var_C                                    ; +0x72, 0x5ff3da\nMOV             R1, R0; char *                                         ; +0x74, 0x5ff3dc\nMOV             R0, R9; int                                            ; +0x76, 0x5ff3de\nBL              sub_776584                                             ; +0x78, 0x5ff3e0\nLDR             R3, [SP,#0x1C+var_10]                                  ; +0x7c, 0x5ff3e4\nMOV             R0, R6                                                 ; +0x7e, 0x5ff3e6\nMOV             R1, R8                                                 ; +0x80, 0x5ff3e8\nMOV             R2, R4                                                 ; +0x82, 0x5ff3ea\nSTR             R3, [SP,#0x1C+var_C]                                   ; +0x84, 0x5ff3ec\nLDR             R3, =(off_AB5BA0 - 0xAB8990)                           ; +0x86, 0x5ff3ee\nLDR             R3, [R5,R3]; dword_ACDD9C                              ; +0x88, 0x5ff3f0\nADDS            R3, #0xC                                               ; +0x8a, 0x5ff3f2\nSTR             R3, [SP,#0x1C+var_10]                                  ; +0x8c, 0x5ff3f4\nBL              _ZN13DS_Dictionary15setStringForKeyEPKcRKSs; DS_Dictionary::setStringForKey(char const*,std::string const&) ; +0x8e, 0x5ff3f6\nMOV             R0, R4                                                 ; +0x92, 0x5ff3fa\nBL              sub_774008                                             ; +0x94, 0x5ff3fc\nMOV             R0, R9                                                 ; +0x98, 0x5ff400\nBL              sub_774008                                             ; +0x9a, 0x5ff402\nB               loc_5FF43A                                             ; +0x9e, 0x5ff406\nMOV             R0, R6; this                                           ; +0xa0, 0x5ff408\nMOV             R1, R8; char *                                         ; +0xa2, 0x5ff40a\nMOV             R2, R4; cocos2d::CCDictionary *                        ; +0xa4, 0x5ff40c\nBL              _ZN13DS_Dictionary13setDictForKeyEPKcPN7cocos2d12CCDictionaryE; DS_Dictionary::setDictForKey(char const*,cocos2d::CCDictionary *) ; +0xa6, 0x5ff40e\nB               loc_5FF43A                                             ; +0xaa, 0x5ff412\nLDR             R3, [R4]                                               ; +0xac, 0x5ff414\nMOV             R0, R4                                                 ; +0xae, 0x5ff416\nLDR             R3, [R3,#0x1C]                                         ; +0xb0, 0x5ff418\nBLX             R3                                                     ; +0xb2, 0x5ff41a\nCBZ             R0, loc_5FF43A                                         ; +0xb4, 0x5ff41c\nMOV             R0, R6; this                                           ; +0xb6, 0x5ff41e\nMOV             R1, R8; char *                                         ; +0xb8, 0x5ff420\nMOVS            R2, #0; bool                                           ; +0xba, 0x5ff422\nMOVS            R3, #1; bool                                           ; +0xbc, 0x5ff424\nBL              _ZN13DS_Dictionary16setSubDictForKeyEPKcbb; DS_Dictionary::setSubDictForKey(char const*,bool,bool) ; +0xbe, 0x5ff426\nLDR             R3, [R4]                                               ; +0xc2, 0x5ff42a\nMOV             R0, R4                                                 ; +0xc4, 0x5ff42c\nMOV             R1, R6                                                 ; +0xc6, 0x5ff42e\nLDR             R3, [R3,#0x18]                                         ; +0xc8, 0x5ff430\nBLX             R3                                                     ; +0xca, 0x5ff432\nMOV             R0, R6; this                                           ; +0xcc, 0x5ff434\nBL              _ZN13DS_Dictionary16stepOutOfSubDictEv; DS_Dictionary::stepOutOfSubDict(void) ; +0xce, 0x5ff436\nLDR             R2, [SP,#0x1C+var_8]                                   ; +0xd2, 0x5ff43a\nLDR             R3, [R7]                                               ; +0xd4, 0x5ff43c\nCMP             R2, R3                                                 ; +0xd6, 0x5ff43e\nBEQ             loc_5FF446                                             ; +0xd8, 0x5ff440\nBLX             __stack_chk_fail                                       ; +0xda, 0x5ff442\nADD             SP, SP, #0x1C                                          ; +0xde, 0x5ff446\nPOP.W           {R4-R9,PC}                                             ; +0xe0, 0x5ff448", "xrefs": ["DS_Dictionary::setArrayForKey @ 0x5ff34c", "DS_Dictionary::setDictForKey @ 0x5ff4dc"], "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"}