{"type": "func", "start": 6442578736, "end": 6442579184, "name": "DS_Dictionary::setObjectForKey", "pseudocode": "// \n// DS_Dictionary::setObjectForKey from 0x18001f330 to 0x18001f4f0 (448 bytes)\n// \n// 4 xrefs:\n// > DS_Dictionary::setArrayForKey @ 0x18001e80c\n// > DS_Dictionary::setDictForKey @ 0x18001ed8d\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801aecec\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\n// Hidden C++ exception states: #wind=1\nvoid __fastcall DS_Dictionary::setObjectForKey(DS_Dictionary *this, const char *a2, cocos2d::CCString *a3)\n{\n  std::string *CString; // rax\n  size_t v7; // r8\n  void *v8; // rcx\n  __int128 v9; // [rsp+30h] [rbp-68h] BYREF\n  __int128 v10; // [rsp+40h] [rbp-58h]\n  void *Block[2]; // [rsp+58h] [rbp-40h] BYREF\n  __int128 v12; // [rsp+68h] [rbp-30h]\n\n  if ( _RTDynamicCast(a3, 0, &cocos2d::CCObject `RTTI Type Descriptor', &cocos2d::CCString `RTTI Type Descriptor', 0) )\n  {\n    CString = cocos2d::CCString::getCString(a3);\n    v9 = 0;\n    v10 = 0u;\n    v7 = -1;\n    do\n      ++v7;\n    while ( CString->m_data.m_smallStorage._Elems[v7] );\n    sub_18000CE60(&v9, CString, v7);\n    *(_OWORD *)Block = v9;\n    v12 = v10;\n    DS_Dictionary::setStringForKey(this, a2, Block, 0);\n    if ( *((_QWORD *)&v12 + 1) > 0xFu )\n    {\n      v8 = Block[0];\n      if ( (unsigned __int64)(*((_QWORD *)&v12 + 1) + 1LL) >= 0x1000 )\n      {\n        v8 = *((void **)Block[0] - 1);\n        if ( (unsigned __int64)((char *)Block[0] - (char *)v8 - 8) > 0x1F )\n          invalid_parameter_noinfo_noreturn();\n      }\n      j_j_free_0(v8);\n    }\n  }\n  else if ( _RTDynamicCast(\n              a3,\n              0,\n              &cocos2d::CCObject `RTTI Type Descriptor',\n              &cocos2d::CCDictionary `RTTI Type Descriptor',\n              0) )\n  {\n    DS_Dictionary::setDictForKey(this, a2, (struct cocos2d::CCDictionary *)a3);\n  }\n  else if ( _RTDynamicCast(\n              a3,\n              0,\n              &cocos2d::CCObject `RTTI Type Descriptor',\n              &cocos2d::CCArray `RTTI Type Descriptor',\n              0) )\n  {\n    DS_Dictionary::setArrayForKey(this, a2, (struct cocos2d::CCArray *)a3);\n  }\n  else if ( ((unsigned __int8 (__fastcall *)(cocos2d::CCString *))a3->canEncode)(a3) )\n  {\n    DS_Dictionary::setSubDictForKey(this, a2, 0, 1);\n    ((void (__fastcall *)(cocos2d::CCString *, DS_Dictionary *))a3->encodeWithCoder)(a3, this);\n    if ( (unsigned __int64)(this->dictTree._Mypair._Myval2._Mylast - this->dictTree._Mypair._Myval2._Myfirst) > 1 )\n      --this->dictTree._Mypair._Myval2._Mylast;\n  }\n}", "assembly": "; \n; DS_Dictionary::setObjectForKey from 0x18001f330 to 0x18001f4f0 (448 bytes)\n; \n; 4 xrefs:\n; > DS_Dictionary::setArrayForKey @ 0x18001e80c\n; > DS_Dictionary::setDictForKey @ 0x18001ed8d\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801aecec\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\nmov     [rsp+arg_18], rbx                                              ; +0x0, 0x18001f330\npush    rbp                                                            ; +0x5, 0x18001f335\npush    rsi                                                            ; +0x6, 0x18001f336\npush    rdi                                                            ; +0x7, 0x18001f337\nsub     rsp, 80h                                                       ; +0x8, 0x18001f338\nmov     rax, cs:__security_cookie                                      ; +0xf, 0x18001f33f\nxor     rax, rsp                                                       ; +0x16, 0x18001f346\nmov     [rsp+98h+var_20], rax                                          ; +0x19, 0x18001f349\nmov     rbx, r8                                                        ; +0x1e, 0x18001f34e\nmov     rsi, rdx                                                       ; +0x21, 0x18001f351\nmov     rdi, rcx                                                       ; +0x24, 0x18001f354\nxor     ebp, ebp                                                       ; +0x27, 0x18001f357\nmov     [rsp+98h+var_78], ebp                                          ; +0x29, 0x18001f359\nlea     r9, ??_R0?AVCCString@cocos2d@@@8; cocos2d::CCString `RTTI Type Descriptor' ; +0x2d, 0x18001f35d\nlea     r8, ??_R0?AVCCObject@cocos2d@@@8; cocos2d::CCObject `RTTI Type Descriptor' ; +0x34, 0x18001f364\nxor     edx, edx                                                       ; +0x3b, 0x18001f36b\nmov     rcx, rbx                                                       ; +0x3d, 0x18001f36d\ncall    __RTDynamicCast                                                ; +0x40, 0x18001f370\nmov     rcx, rbx; this                                                 ; +0x45, 0x18001f375\ntest    rax, rax                                                       ; +0x48, 0x18001f378\njz      loc_18001F427                                                  ; +0x4b, 0x18001f37b\ncall    ?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x51, 0x18001f381\nxorps   xmm0, xmm0                                                     ; +0x56, 0x18001f386\nmovups  [rsp+98h+var_68], xmm0                                         ; +0x59, 0x18001f389\nmov     qword ptr [rsp+98h+var_58], rbp                                ; +0x5e, 0x18001f38e\nmov     qword ptr [rsp+98h+var_58+8], rbp                              ; +0x63, 0x18001f393\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x68, 0x18001f398\nnop                                                                    ; +0x6f, 0x18001f39f\ninc     r8                                                             ; +0x70, 0x18001f3a0\ncmp     [rax+r8], bpl                                                  ; +0x73, 0x18001f3a3\njnz     short loc_18001F3A0                                            ; +0x77, 0x18001f3a7\nmov     rdx, rax                                                       ; +0x79, 0x18001f3a9\nlea     rcx, [rsp+98h+var_68]                                          ; +0x7c, 0x18001f3ac\ncall    sub_18000CE60                                                  ; +0x81, 0x18001f3b1\nmovups  xmm0, [rsp+98h+var_68]                                         ; +0x86, 0x18001f3b6\nmovups  xmmword ptr [rsp+98h+Block], xmm0                              ; +0x8b, 0x18001f3bb\nmovups  xmm1, [rsp+98h+var_58]                                         ; +0x90, 0x18001f3c0\nmovups  [rsp+98h+var_30], xmm1                                         ; +0x95, 0x18001f3c5\nxor     r9d, r9d                                                       ; +0x9a, 0x18001f3ca\nlea     r8, [rsp+98h+Block]                                            ; +0x9d, 0x18001f3cd\nmov     rdx, rsi                                                       ; +0xa2, 0x18001f3d2\nmov     rcx, rdi                                                       ; +0xa5, 0x18001f3d5\ncall    ?setStringForKey@DS_Dictionary@@QEAAXPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N@Z; DS_Dictionary::setStringForKey(char const *,std::string const &,bool) ; +0xa8, 0x18001f3d8\nnop                                                                    ; +0xad, 0x18001f3dd\nmov     rdx, qword ptr [rsp+98h+var_30+8]                              ; +0xae, 0x18001f3de\ncmp     rdx, 0Fh                                                       ; +0xb3, 0x18001f3e3\njbe     loc_18001F4D0                                                  ; +0xb7, 0x18001f3e7\ninc     rdx                                                            ; +0xbd, 0x18001f3ed\nmov     rcx, [rsp+98h+Block]; Block                                    ; +0xc0, 0x18001f3f0\nmov     rax, rcx                                                       ; +0xc5, 0x18001f3f5\ncmp     rdx, 1000h                                                     ; +0xc8, 0x18001f3f8\njb      short loc_18001F41D                                            ; +0xcf, 0x18001f3ff\nadd     rdx, 27h ; '''                                                 ; +0xd1, 0x18001f401\nmov     rcx, [rcx-8]                                                   ; +0xd5, 0x18001f405\nsub     rax, rcx                                                       ; +0xd9, 0x18001f409\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0xdc, 0x18001f40c\ncmp     rax, 1Fh                                                       ; +0xe0, 0x18001f410\njbe     short loc_18001F41D                                            ; +0xe4, 0x18001f414\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0xe6, 0x18001f416\ndb 0CCh                                                                ; +0xec, 0x18001f41c\ncall    j_j_free_0                                                     ; +0xed, 0x18001f41d\njmp     loc_18001F4D0                                                  ; +0xf2, 0x18001f422\nmov     [rsp+98h+var_78], ebp                                          ; +0xf7, 0x18001f427\nlea     r9, ??_R0?AVCCDictionary@cocos2d@@@8; cocos2d::CCDictionary `RTTI Type Descriptor' ; +0xfb, 0x18001f42b\nlea     r8, ??_R0?AVCCObject@cocos2d@@@8; cocos2d::CCObject `RTTI Type Descriptor' ; +0x102, 0x18001f432\nxor     edx, edx                                                       ; +0x109, 0x18001f439\ncall    __RTDynamicCast                                                ; +0x10b, 0x18001f43b\ntest    rax, rax                                                       ; +0x110, 0x18001f440\njz      short loc_18001F455                                            ; +0x113, 0x18001f443\nmov     r8, rbx; struct cocos2d::CCDictionary *                        ; +0x115, 0x18001f445\nmov     rdx, rsi; char *                                               ; +0x118, 0x18001f448\nmov     rcx, rdi; this                                                 ; +0x11b, 0x18001f44b\ncall    ?setDictForKey@DS_Dictionary@@QEAAXPEBDPEAVCCDictionary@cocos2d@@@Z; DS_Dictionary::setDictForKey(char const *,cocos2d::CCDictionary *) ; +0x11e, 0x18001f44e\njmp     short loc_18001F4D0                                            ; +0x123, 0x18001f453\nmov     [rsp+98h+var_78], ebp                                          ; +0x125, 0x18001f455\nlea     r9, ??_R0?AVCCArray@cocos2d@@@8; cocos2d::CCArray `RTTI Type Descriptor' ; +0x129, 0x18001f459\nlea     r8, ??_R0?AVCCObject@cocos2d@@@8; cocos2d::CCObject `RTTI Type Descriptor' ; +0x130, 0x18001f460\nxor     edx, edx                                                       ; +0x137, 0x18001f467\nmov     rcx, rbx                                                       ; +0x139, 0x18001f469\ncall    __RTDynamicCast                                                ; +0x13c, 0x18001f46c\ntest    rax, rax                                                       ; +0x141, 0x18001f471\njz      short loc_18001F486                                            ; +0x144, 0x18001f474\nmov     r8, rbx; struct cocos2d::CCArray *                             ; +0x146, 0x18001f476\nmov     rdx, rsi; char *                                               ; +0x149, 0x18001f479\nmov     rcx, rdi; this                                                 ; +0x14c, 0x18001f47c\ncall    ?setArrayForKey@DS_Dictionary@@QEAAXPEBDPEAVCCArray@cocos2d@@@Z; DS_Dictionary::setArrayForKey(char const *,cocos2d::CCArray *) ; +0x14f, 0x18001f47f\njmp     short loc_18001F4D0                                            ; +0x154, 0x18001f484\nmov     rax, [rbx]                                                     ; +0x156, 0x18001f486\nmov     rcx, rbx                                                       ; +0x159, 0x18001f489\ncall    qword ptr [rax+30h]                                            ; +0x15c, 0x18001f48c\ntest    al, al                                                         ; +0x15f, 0x18001f48f\njz      short loc_18001F4D0                                            ; +0x161, 0x18001f491\nmov     r9b, 1; bool                                                   ; +0x163, 0x18001f493\nxor     r8d, r8d; bool                                                 ; +0x166, 0x18001f496\nmov     rdx, rsi; char *                                               ; +0x169, 0x18001f499\nmov     rcx, rdi; this                                                 ; +0x16c, 0x18001f49c\ncall    ?setSubDictForKey@DS_Dictionary@@QEAAXPEBD_N1@Z; DS_Dictionary::setSubDictForKey(char const *,bool,bool) ; +0x16f, 0x18001f49f\nmov     rax, [rbx]                                                     ; +0x174, 0x18001f4a4\nmov     rdx, rdi                                                       ; +0x177, 0x18001f4a7\nmov     rcx, rbx                                                       ; +0x17a, 0x18001f4aa\ncall    qword ptr [rax+28h]                                            ; +0x17d, 0x18001f4ad\nmov     rax, [rdi+0D8h]                                                ; +0x180, 0x18001f4b0\nsub     rax, [rdi+0D0h]                                                ; +0x187, 0x18001f4b7\nsar     rax, 3                                                         ; +0x18e, 0x18001f4be\ncmp     rax, 1                                                         ; +0x192, 0x18001f4c2\njbe     short loc_18001F4D0                                            ; +0x196, 0x18001f4c6\nadd     qword ptr [rdi+0D8h], 0FFFFFFFFFFFFFFF8h                       ; +0x198, 0x18001f4c8\nmov     rcx, [rsp+98h+var_20]                                          ; +0x1a0, 0x18001f4d0\nxor     rcx, rsp; StackCookie                                          ; +0x1a5, 0x18001f4d5\ncall    __security_check_cookie                                        ; +0x1a8, 0x18001f4d8\nmov     rbx, [rsp+98h+arg_18]                                          ; +0x1ad, 0x18001f4dd\nadd     rsp, 80h                                                       ; +0x1b5, 0x18001f4e5\npop     rdi                                                            ; +0x1bc, 0x18001f4ec\npop     rsi                                                            ; +0x1bd, 0x18001f4ed\npop     rbp                                                            ; +0x1be, 0x18001f4ee\nretn                                                                   ; +0x1bf, 0x18001f4ef", "xrefs": ["DS_Dictionary::setArrayForKey @ 0x18001e80c", "DS_Dictionary::setDictForKey @ 0x18001ed8d", "<???> @ 0x1801438a8", "<???> @ 0x1801aecec"], "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"}