{"type": "func", "start": 8443020, "end": 8443266, "name": "DS_Dictionary::setObjectForKey", "pseudocode": "// \n// DS_Dictionary::setObjectForKey from 0x80d48c to 0x80d582 (246 bytes)\n// \n// 2 xrefs:\n// > DS_Dictionary::setArrayForKey @ 0x80d470\n// > DS_Dictionary::setDictForKey @ 0x80d61e\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 12:01:33 +0000\n// \n\nDS_Dictionary *__fastcall DS_Dictionary::setObjectForKey(DS_Dictionary *this, const char *a2, cocos2d::CCObject *lpsrc)\n{\n  DS_Dictionary *result; // r0\n  char *CString; // r4\n  size_t v8; // r0\n  int v9; // r0\n  int v10; // r1\n  int v11; // r2\n  int v12; // [sp+Ch] [bp-20h] BYREF\n  int v13; // [sp+10h] [bp-1Ch]\n  int v14; // [sp+14h] [bp-18h]\n  _DWORD v15[3]; // [sp+18h] [bp-14h] BYREF\n\n  if ( lpsrc )\n  {\n    if ( _dynamic_cast(\n           lpsrc,\n           (const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,\n           (const struct __class_type_info *)&`typeinfo for'cocos2d::CCString,\n           0) )\n    {\n      v12 = 0;\n      v13 = 0;\n      v14 = 0;\n      CString = cocos2d::CCString::getCString(lpsrc);\n      v8 = strlen(CString);\n      std::string::__init(&v12, CString, v8);\n      v9 = v12;\n      v10 = v13;\n      v11 = v14;\n      v12 = 0;\n      v13 = 0;\n      v14 = 0;\n      v15[0] = v9;\n      v15[1] = v10;\n      v15[2] = v11;\n      DS_Dictionary::setStringForKey((int)this, a2, (unsigned __int8 *)v15);\n      std::string::~string((int)v15);\n      return (DS_Dictionary *)std::string::~string((int)&v12);\n    }\n    if ( _dynamic_cast(\n           lpsrc,\n           (const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,\n           (const struct __class_type_info *)&`typeinfo for'cocos2d::CCDictionary,\n           0) )\n    {\n      return (DS_Dictionary *)DS_Dictionary::setDictForKey(this, a2, lpsrc);\n    }\n    if ( _dynamic_cast(\n           lpsrc,\n           (const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,\n           (const struct __class_type_info *)&`typeinfo for'cocos2d::CCArray,\n           0) )\n    {\n      return DS_Dictionary::setArrayForKey(this, a2, lpsrc);\n    }\n  }\n  result = (DS_Dictionary *)(*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)lpsrc + 28))(lpsrc);\n  if ( result )\n  {\n    DS_Dictionary::setSubDictForKey(this, a2, 0, 1);\n    (*(void (__fastcall **)(cocos2d::CCObject *, DS_Dictionary *))(*(_DWORD *)lpsrc + 24))(lpsrc, this);\n    return (DS_Dictionary *)DS_Dictionary::stepOutOfSubDict((int)this);\n  }\n  return result;\n}", "assembly": "; \n; DS_Dictionary::setObjectForKey from 0x80d48c to 0x80d582 (246 bytes)\n; \n; 2 xrefs:\n; > DS_Dictionary::setArrayForKey @ 0x80d470\n; > DS_Dictionary::setDictForKey @ 0x80d61e\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 12:01:33 +0000\n; \nPUSH.W          {R4-R9,LR}                                             ; +0x0, 0x80d48c\nMOV             R9, R1                                                 ; +0x4, 0x80d490\nLDR             R6, =(_GLOBAL_OFFSET_TABLE_ - 0x80D49E)                ; +0x6, 0x80d492\nSUB             SP, SP, #0x2C                                          ; +0x8, 0x80d494\nLDR             R3, =(__stack_chk_guard_ptr - 0xD1D93C)                ; +0xa, 0x80d496\nMOV             R5, R0                                                 ; +0xc, 0x80d498\nADD             R6, PC; _GLOBAL_OFFSET_TABLE_                          ; +0xe, 0x80d49a\nMOV             R4, R2                                                 ; +0x10, 0x80d49c\nLDR             R3, [R6,R3]; __stack_chk_guard                         ; +0x12, 0x80d49e\nLDR             R1, [R3]                                               ; +0x14, 0x80d4a0\nMOV             R8, R3                                                 ; +0x16, 0x80d4a2\nSTR             R1, [SP,#0x2C+var_8]                                   ; +0x18, 0x80d4a4\nCMP             R2, #0                                                 ; +0x1a, 0x80d4a6\nBEQ             loc_80D548                                             ; +0x1c, 0x80d4a8\nLDR             R3, =(_ZTIN7cocos2d8CCObjectE_ptr - 0xD1D93C)          ; +0x1e, 0x80d4aa\nMOV             R0, R2; lpsrc                                          ; +0x20, 0x80d4ac\nLDR             R3, [R6,R3]; _ZTIN7cocos2d8CCObjectE_ptr               ; +0x22, 0x80d4ae\nSTR             R3, [SP,#0x2C+lpstype]                                 ; +0x24, 0x80d4b0\nLDR             R3, =(_ZTIN7cocos2d8CCStringE_ptr - 0xD1D93C)          ; +0x26, 0x80d4b2\nLDR             R1, [SP,#0x2C+lpstype]; lpstype                        ; +0x28, 0x80d4b4\nLDR             R3, [R6,R3]; _ZTIN7cocos2d8CCStringE_ptr               ; +0x2a, 0x80d4b6\nSTR             R3, [SP,#0x2C+var_28]                                  ; +0x2c, 0x80d4b8\nMOV             R2, R3; lpdtype                                        ; +0x2e, 0x80d4ba\nMOVS            R3, #0; s2d                                            ; +0x30, 0x80d4bc\nBL              __dynamic_cast                                         ; +0x32, 0x80d4be\nMOV             R3, R0; s2d                                            ; +0x36, 0x80d4c2\nCBNZ            R0, loc_80D4F4                                         ; +0x38, 0x80d4c4\nLDR             R2, =(_ZTIN7cocos2d12CCDictionaryE_ptr - 0xD1D93C)     ; +0x3a, 0x80d4c6\nMOV             R0, R4; lpsrc                                          ; +0x3c, 0x80d4c8\nLDR             R1, [SP,#0x2C+lpstype]; lpstype                        ; +0x3e, 0x80d4ca\nLDR             R2, [R6,R2]; _ZTIN7cocos2d12CCDictionaryE_ptr ; lpdtype ; +0x40, 0x80d4cc\nSTR             R2, [SP,#0x2C+var_28]                                  ; +0x42, 0x80d4ce\nBL              __dynamic_cast                                         ; +0x44, 0x80d4d0\nMOV             R3, R0; s2d                                            ; +0x48, 0x80d4d4\nCBNZ            R0, loc_80D53C                                         ; +0x4a, 0x80d4d6\nLDR             R2, =(_ZTIN7cocos2d7CCArrayE_ptr - 0xD1D93C)           ; +0x4c, 0x80d4d8\nMOV             R0, R4; lpsrc                                          ; +0x4e, 0x80d4da\nLDR             R1, [SP,#0x2C+lpstype]; lpstype                        ; +0x50, 0x80d4dc\nLDR             R2, [R6,R2]; _ZTIN7cocos2d7CCArrayE_ptr ; lpdtype      ; +0x52, 0x80d4de\nSTR             R2, [SP,#0x2C+var_28]                                  ; +0x54, 0x80d4e0\nBL              __dynamic_cast                                         ; +0x56, 0x80d4e2\nCBZ             R0, loc_80D548                                         ; +0x5a, 0x80d4e6\nMOV             R0, R5; this                                           ; +0x5c, 0x80d4e8\nMOV             R1, R9; char *                                         ; +0x5e, 0x80d4ea\nMOV             R2, R4; cocos2d::CCArray *                             ; +0x60, 0x80d4ec\nBL              _ZN13DS_Dictionary14setArrayForKeyEPKcPN7cocos2d7CCArrayE; DS_Dictionary::setArrayForKey(char const*,cocos2d::CCArray *) ; +0x62, 0x80d4ee\nB               loc_80D56E                                             ; +0x66, 0x80d4f2\nMOV             R0, R4; this                                           ; +0x68, 0x80d4f4\nMOVS            R6, #0                                                 ; +0x6a, 0x80d4f6\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x6c, 0x80d4f8\nSTR             R6, [SP,#0x2C+var_20]                                  ; +0x70, 0x80d4fc\nSTR             R6, [SP,#0x2C+var_1C]                                  ; +0x72, 0x80d4fe\nADD             R7, SP, #0x2C+var_20                                   ; +0x74, 0x80d500\nSTR             R6, [SP,#0x2C+var_18]                                  ; +0x76, 0x80d502\nMOV             R4, R0                                                 ; +0x78, 0x80d504\nBLX             strlen                                                 ; +0x7a, 0x80d506\nMOV             R1, R4                                                 ; +0x7e, 0x80d50a\nADD             R4, SP, #0x2C+var_14                                   ; +0x80, 0x80d50c\nMOV             R2, R0                                                 ; +0x82, 0x80d50e\nMOV             R0, R7                                                 ; +0x84, 0x80d510\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcj; std::string::__init(char const*,uint) ; +0x86, 0x80d512\nLDM.W           R7, {R0-R2}                                            ; +0x8a, 0x80d516\nSTR             R6, [SP,#0x2C+var_20]                                  ; +0x8e, 0x80d51a\nSTR             R6, [SP,#0x2C+var_1C]                                  ; +0x90, 0x80d51c\nSTR             R6, [SP,#0x2C+var_18]                                  ; +0x92, 0x80d51e\nSTM.W           R4, {R0-R2}                                            ; +0x94, 0x80d520\nMOV             R0, R5                                                 ; +0x98, 0x80d524\nMOV             R1, R9                                                 ; +0x9a, 0x80d526\nMOV             R2, R4                                                 ; +0x9c, 0x80d528\nBL              _ZN13DS_Dictionary15setStringForKeyEPKcRKNSt6__ndk112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE; DS_Dictionary::setStringForKey(char const*,std::string const&) ; +0x9e, 0x80d52a\nMOV             R0, R4                                                 ; +0xa2, 0x80d52e\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0xa4, 0x80d530\nMOV             R0, R7                                                 ; +0xa8, 0x80d534\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0xaa, 0x80d536\nB               loc_80D56E                                             ; +0xae, 0x80d53a\nMOV             R0, R5; this                                           ; +0xb0, 0x80d53c\nMOV             R1, R9; char *                                         ; +0xb2, 0x80d53e\nMOV             R2, R4; cocos2d::CCDictionary *                        ; +0xb4, 0x80d540\nBL              _ZN13DS_Dictionary13setDictForKeyEPKcPN7cocos2d12CCDictionaryE; DS_Dictionary::setDictForKey(char const*,cocos2d::CCDictionary *) ; +0xb6, 0x80d542\nB               loc_80D56E                                             ; +0xba, 0x80d546\nLDR             R3, [R4]                                               ; +0xbc, 0x80d548\nMOV             R0, R4                                                 ; +0xbe, 0x80d54a\nLDR             R3, [R3,#0x1C]                                         ; +0xc0, 0x80d54c\nBLX             R3                                                     ; +0xc2, 0x80d54e\nCBZ             R0, loc_80D56E                                         ; +0xc4, 0x80d550\nMOV             R0, R5; this                                           ; +0xc6, 0x80d552\nMOV             R1, R9; char *                                         ; +0xc8, 0x80d554\nMOVS            R2, #0; bool                                           ; +0xca, 0x80d556\nMOVS            R3, #1; bool                                           ; +0xcc, 0x80d558\nBL              _ZN13DS_Dictionary16setSubDictForKeyEPKcbb; DS_Dictionary::setSubDictForKey(char const*,bool,bool) ; +0xce, 0x80d55a\nLDR             R3, [R4]                                               ; +0xd2, 0x80d55e\nMOV             R0, R4                                                 ; +0xd4, 0x80d560\nMOV             R1, R5                                                 ; +0xd6, 0x80d562\nLDR             R3, [R3,#0x18]                                         ; +0xd8, 0x80d564\nBLX             R3                                                     ; +0xda, 0x80d566\nMOV             R0, R5; this                                           ; +0xdc, 0x80d568\nBL              _ZN13DS_Dictionary16stepOutOfSubDictEv; DS_Dictionary::stepOutOfSubDict(void) ; +0xde, 0x80d56a\nLDR             R2, [SP,#0x2C+var_8]                                   ; +0xe2, 0x80d56e\nLDR.W           R3, [R8]                                               ; +0xe4, 0x80d570\nCMP             R2, R3                                                 ; +0xe8, 0x80d574\nBEQ             loc_80D57C                                             ; +0xea, 0x80d576\nBLX             __stack_chk_fail                                       ; +0xec, 0x80d578\nADD             SP, SP, #0x2C ; ','                                    ; +0xf0, 0x80d57c\nPOP.W           {R4-R9,PC}                                             ; +0xf2, 0x80d57e", "xrefs": ["DS_Dictionary::setArrayForKey @ 0x80d470", "DS_Dictionary::setDictForKey @ 0x80d61e"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}