{"type": "func", "start": 6442577008, "end": 6442577383, "name": "DS_Dictionary::setDictForKey", "pseudocode": "// \n// DS_Dictionary::setDictForKey from 0x18001ec70 to 0x18001ede7 (375 bytes)\n// \n// 3 xrefs:\n// > DS_Dictionary::setObjectForKey @ 0x18001f44e\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801aecc8\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::setDictForKey(DS_Dictionary *this, const char *a2, struct cocos2d::CCDictionary *a3)\n{\n  cocos2d::CCArray *v6; // r14\n  unsigned int i; // esi\n  cocos2d::CCString *v8; // rax\n  std::string *CString; // rax\n  const char *v10; // rbx\n  size_t v11; // r8\n  struct cocos2d::CCObject *v12; // rbp\n  void *v13; // rcx\n  __int128 v14; // [rsp+28h] [rbp-60h] BYREF\n  __int64 v15; // [rsp+38h] [rbp-50h]\n  unsigned __int64 v16; // [rsp+40h] [rbp-48h]\n\n  if ( a3 )\n  {\n    DS_Dictionary::setSubDictForKey(this, a2);\n    if ( DS_Dictionary::stepIntoSubDictWithKey(this, a2) )\n    {\n      v6 = cocos2d::CCDictionary::allKeys(a3);\n      for ( i = 0; i < (unsigned int)cocos2d::CCArray::count(v6); ++i )\n      {\n        v8 = cocos2d::CCArray::stringAtIndex(v6, i);\n        CString = cocos2d::CCString::getCString(v8);\n        v10 = (const char *)CString;\n        v14 = 0;\n        v15 = 0;\n        v16 = 0;\n        v11 = -1;\n        do\n          ++v11;\n        while ( CString->m_data.m_smallStorage._Elems[v11] );\n        sub_18000CE60(&v14, CString, v11);\n        v12 = (struct cocos2d::CCObject *)cocos2d::CCDictionary::objectForKey((__int64)a3, (unsigned __int8 *)&v14);\n        if ( v16 > 0xF )\n        {\n          v13 = (void *)v14;\n          if ( v16 + 1 >= 0x1000 )\n          {\n            v13 = *(void **)(v14 - 8);\n            if ( (unsigned __int64)(v14 - (_QWORD)v13 - 8) > 0x1F )\n              invalid_parameter_noinfo_noreturn();\n          }\n          j_j_free_0(v13);\n        }\n        v15 = 0;\n        v16 = 15;\n        LOBYTE(v14) = 0;\n        DS_Dictionary::setObjectForKey(this, v10, v12);\n      }\n      if ( (unsigned __int64)(this->dictTree._Mypair._Myval2._Mylast - this->dictTree._Mypair._Myval2._Myfirst) > 1 )\n        --this->dictTree._Mypair._Myval2._Mylast;\n    }\n  }\n}", "assembly": "; \n; DS_Dictionary::setDictForKey from 0x18001ec70 to 0x18001ede7 (375 bytes)\n; \n; 3 xrefs:\n; > DS_Dictionary::setObjectForKey @ 0x18001f44e\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801aecc8\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\ntest    r8, r8                                                         ; +0x0, 0x18001ec70\njz      locret_18001EDDF                                               ; +0x3, 0x18001ec73\npush    rbx                                                            ; +0x9, 0x18001ec79\npush    rbp                                                            ; +0xa, 0x18001ec7a\npush    rsi                                                            ; +0xb, 0x18001ec7b\npush    rdi                                                            ; +0xc, 0x18001ec7c\npush    r12                                                            ; +0xd, 0x18001ec7d\npush    r14                                                            ; +0xf, 0x18001ec7f\npush    r15                                                            ; +0x11, 0x18001ec81\nsub     rsp, 50h                                                       ; +0x13, 0x18001ec83\nmov     rax, cs:__security_cookie                                      ; +0x17, 0x18001ec87\nxor     rax, rsp                                                       ; +0x1e, 0x18001ec8e\nmov     [rsp+88h+var_40], rax                                          ; +0x21, 0x18001ec91\nmov     r15, r8                                                        ; +0x26, 0x18001ec96\nmov     rbx, rdx                                                       ; +0x29, 0x18001ec99\nmov     rdi, rcx                                                       ; +0x2c, 0x18001ec9c\nxor     r12d, r12d                                                     ; +0x2f, 0x18001ec9f\ncall    ?setSubDictForKey@DS_Dictionary@@QEAAXPEBD@Z; DS_Dictionary::setSubDictForKey(char const *) ; +0x32, 0x18001eca2\nmov     rdx, rbx; char *                                               ; +0x37, 0x18001eca7\nmov     rcx, rdi; this                                                 ; +0x3a, 0x18001ecaa\ncall    ?stepIntoSubDictWithKey@DS_Dictionary@@QEAA_NPEBD@Z; DS_Dictionary::stepIntoSubDictWithKey(char const *) ; +0x3d, 0x18001ecad\ntest    al, al                                                         ; +0x42, 0x18001ecb2\njz      loc_18001EDC4                                                  ; +0x44, 0x18001ecb4\nmov     rcx, r15; this                                                 ; +0x4a, 0x18001ecba\ncall    ?allKeys@CCDictionary@cocos2d@@QEAAPEAVCCArray@2@XZ; cocos2d::CCDictionary::allKeys(void) ; +0x4d, 0x18001ecbd\nmov     r14, rax                                                       ; +0x52, 0x18001ecc2\nmov     esi, r12d                                                      ; +0x55, 0x18001ecc5\nmov     rcx, rax; this                                                 ; +0x58, 0x18001ecc8\ncall    ?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x5b, 0x18001eccb\ntest    eax, eax                                                       ; +0x60, 0x18001ecd0\njz      loc_18001EDA4                                                  ; +0x62, 0x18001ecd2\nnop     dword ptr [rax+rax+00000000h]                                  ; +0x68, 0x18001ecd8\nmov     edx, esi; unsigned int                                         ; +0x70, 0x18001ece0\nmov     rcx, r14; this                                                 ; +0x72, 0x18001ece2\ncall    ?stringAtIndex@CCArray@cocos2d@@QEAAPEAVCCString@2@I@Z; cocos2d::CCArray::stringAtIndex(uint) ; +0x75, 0x18001ece5\nmov     rcx, rax; this                                                 ; +0x7a, 0x18001ecea\ncall    ?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x7d, 0x18001eced\nmov     rbx, rax                                                       ; +0x82, 0x18001ecf2\nxorps   xmm0, xmm0                                                     ; +0x85, 0x18001ecf5\nmovups  [rsp+88h+var_60], xmm0                                         ; +0x88, 0x18001ecf8\nmov     [rsp+88h+var_50], r12                                          ; +0x8d, 0x18001ecfd\nmov     [rsp+88h+var_48], r12                                          ; +0x92, 0x18001ed02\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x97, 0x18001ed07\nxchg    ax, ax                                                         ; +0x9e, 0x18001ed0e\ninc     r8                                                             ; +0xa0, 0x18001ed10\ncmp     byte ptr [rax+r8], 0                                           ; +0xa3, 0x18001ed13\njnz     short loc_18001ED10                                            ; +0xa8, 0x18001ed18\nmov     rdx, rbx                                                       ; +0xaa, 0x18001ed1a\nlea     rcx, [rsp+88h+var_60]                                          ; +0xad, 0x18001ed1d\ncall    sub_18000CE60                                                  ; +0xb2, 0x18001ed22\nnop                                                                    ; +0xb7, 0x18001ed27\nlea     rdx, [rsp+88h+var_60]                                          ; +0xb8, 0x18001ed28\nmov     rcx, r15                                                       ; +0xbd, 0x18001ed2d\ncall    ?objectForKey@CCDictionary@cocos2d@@QEAAPEAVCCObject@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::objectForKey(std::string const &) ; +0xc0, 0x18001ed30\nmov     rbp, rax                                                       ; +0xc5, 0x18001ed35\nmov     rdx, [rsp+88h+var_48]                                          ; +0xc8, 0x18001ed38\ncmp     rdx, 0Fh                                                       ; +0xcd, 0x18001ed3d\njbe     short loc_18001ED71                                            ; +0xd1, 0x18001ed41\ninc     rdx                                                            ; +0xd3, 0x18001ed43\nmov     rcx, qword ptr [rsp+88h+var_60]                                ; +0xd6, 0x18001ed46\nmov     rax, rcx                                                       ; +0xdb, 0x18001ed4b\ncmp     rdx, 1000h                                                     ; +0xde, 0x18001ed4e\njb      short loc_18001ED6C                                            ; +0xe5, 0x18001ed55\nadd     rdx, 27h ; '''                                                 ; +0xe7, 0x18001ed57\nmov     rcx, [rcx-8]; Block                                            ; +0xeb, 0x18001ed5b\nsub     rax, rcx                                                       ; +0xef, 0x18001ed5f\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0xf2, 0x18001ed62\ncmp     rax, 1Fh                                                       ; +0xf6, 0x18001ed66\nja      short loc_18001EDE0                                            ; +0xfa, 0x18001ed6a\ncall    j_j_free_0                                                     ; +0xfc, 0x18001ed6c\nmov     [rsp+88h+var_50], r12                                          ; +0x101, 0x18001ed71\nmov     [rsp+88h+var_48], 0Fh                                          ; +0x106, 0x18001ed76\nmov     byte ptr [rsp+88h+var_60], 0                                   ; +0x10f, 0x18001ed7f\nmov     r8, rbp; struct cocos2d::CCObject *                            ; +0x114, 0x18001ed84\nmov     rdx, rbx; char *                                               ; +0x117, 0x18001ed87\nmov     rcx, rdi; this                                                 ; +0x11a, 0x18001ed8a\ncall    ?setObjectForKey@DS_Dictionary@@QEAAXPEBDPEAVCCObject@cocos2d@@@Z; DS_Dictionary::setObjectForKey(char const *,cocos2d::CCObject *) ; +0x11d, 0x18001ed8d\ninc     esi                                                            ; +0x122, 0x18001ed92\nmov     rcx, r14; this                                                 ; +0x124, 0x18001ed94\ncall    ?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x127, 0x18001ed97\ncmp     esi, eax                                                       ; +0x12c, 0x18001ed9c\njb      loc_18001ECE0                                                  ; +0x12e, 0x18001ed9e\nmov     rax, [rdi+0D8h]                                                ; +0x134, 0x18001eda4\nsub     rax, [rdi+0D0h]                                                ; +0x13b, 0x18001edab\nsar     rax, 3                                                         ; +0x142, 0x18001edb2\ncmp     rax, 1                                                         ; +0x146, 0x18001edb6\njbe     short loc_18001EDC4                                            ; +0x14a, 0x18001edba\nadd     qword ptr [rdi+0D8h], 0FFFFFFFFFFFFFFF8h                       ; +0x14c, 0x18001edbc\nmov     rcx, [rsp+88h+var_40]                                          ; +0x154, 0x18001edc4\nxor     rcx, rsp; StackCookie                                          ; +0x159, 0x18001edc9\ncall    __security_check_cookie                                        ; +0x15c, 0x18001edcc\nadd     rsp, 50h                                                       ; +0x161, 0x18001edd1\npop     r15                                                            ; +0x165, 0x18001edd5\npop     r14                                                            ; +0x167, 0x18001edd7\npop     r12                                                            ; +0x169, 0x18001edd9\npop     rdi                                                            ; +0x16b, 0x18001eddb\npop     rsi                                                            ; +0x16c, 0x18001eddc\npop     rbp                                                            ; +0x16d, 0x18001eddd\npop     rbx                                                            ; +0x16e, 0x18001edde\nretn                                                                   ; +0x16f, 0x18001eddf\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0x170, 0x18001ede0\ndb 0CCh                                                                ; +0x176, 0x18001ede6", "xrefs": ["DS_Dictionary::setObjectForKey @ 0x18001f44e", "<???> @ 0x1801438a8", "<???> @ 0x1801aecc8"], "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"}