{"type": "func", "start": 6442575632, "end": 6442575952, "name": "DS_Dictionary::setArrayForKey", "pseudocode": "// \n// DS_Dictionary::setArrayForKey from 0x18001e710 to 0x18001e850 (320 bytes)\n// \n// 5 xrefs:\n// > DS_Dictionary::setObjectForKey @ 0x18001f47f\n// > <???> @ 0x180133520\n// > <???> @ 0x180133554\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801aec50\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::setArrayForKey(DS_Dictionary *this, const char *a2, struct cocos2d::CCArray *a3)\n{\n  const char *v5; // r8\n  __int64 v6; // rax\n  const char *v7; // r8\n  unsigned int i; // ebx\n  struct cocos2d::CCString *v9; // rdi\n  cocos2d::CCString *v10; // rax\n  std::string *CString; // rax\n  __int64 v12; // [rsp+50h] [rbp+18h] BYREF\n  char v13; // [rsp+58h] [rbp+20h] BYREF\n\n  if ( a3 )\n  {\n    DS_Dictionary::setSubDictForKey(this, a2, 0, 1);\n    pugi::xml_node::xml_node((cocos2d::CCThread *)&v12);\n    v5 = \"k\";\n    if ( this->compatible )\n      v5 = \"key\";\n    v12 = *(_QWORD *)sub_18007F870(&this->dictTree._Mypair._Myval2._Mylast[-1], &v13, v5);\n    v6 = sub_18007F910(&v12, &v13, 3);\n    sub_180085410(v6, \"_isArr\");\n    v7 = \"t\";\n    if ( this->compatible )\n      v7 = \"true\";\n    sub_180080EE0(&this->dictTree._Mypair._Myval2._Mylast[-1], &v13, v7, &v12);\n    for ( i = 0; i < (unsigned int)cocos2d::CCArray::count(a3); ++i )\n    {\n      v9 = cocos2d::CCArray::stringAtIndex(a3, i);\n      v10 = cocos2d::CCString::createWithFormat(\"k_%i\", i);\n      CString = cocos2d::CCString::getCString(v10);\n      DS_Dictionary::setObjectForKey(this, CString->m_data.m_smallStorage._Elems, v9);\n    }\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::setArrayForKey from 0x18001e710 to 0x18001e850 (320 bytes)\n; \n; 5 xrefs:\n; > DS_Dictionary::setObjectForKey @ 0x18001f47f\n; > <???> @ 0x180133520\n; > <???> @ 0x180133554\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801aec50\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, 0x18001e710\njz      locret_18001E84F                                               ; +0x3, 0x18001e713\npush    rbp                                                            ; +0x9, 0x18001e719\npush    rsi                                                            ; +0xa, 0x18001e71a\nsub     rsp, 28h                                                       ; +0xb, 0x18001e71b\nmov     rbp, r8                                                        ; +0xf, 0x18001e71f\nmov     [rsp+38h+arg_0], rbx                                           ; +0x12, 0x18001e722\nxor     r8d, r8d; bool                                                 ; +0x17, 0x18001e727\nmov     r9b, 1; bool                                                   ; +0x1a, 0x18001e72a\nmov     rsi, rcx                                                       ; +0x1d, 0x18001e72d\ncall    ?setSubDictForKey@DS_Dictionary@@QEAAXPEBD_N1@Z; DS_Dictionary::setSubDictForKey(char const *,bool,bool) ; +0x20, 0x18001e730\nlea     rcx, [rsp+38h+arg_10]; this                                    ; +0x25, 0x18001e735\ncall    pugi__xml_node__xml_node                                       ; +0x2a, 0x18001e73a\nmov     rcx, [rsi+0D8h]                                                ; +0x2f, 0x18001e73f\nlea     rax, aKey; \"key\"                                               ; +0x36, 0x18001e746\nsub     rcx, 8                                                         ; +0x3d, 0x18001e74d\nlea     r8, aK; \"k\"                                                    ; +0x41, 0x18001e751\ncmp     byte ptr [rsi+0E8h], 0                                         ; +0x48, 0x18001e758\nlea     rdx, [rsp+38h+arg_18]                                          ; +0x4f, 0x18001e75f\ncmovnz  r8, rax                                                        ; +0x54, 0x18001e764\ncall    sub_18007F870                                                  ; +0x58, 0x18001e768\nmov     r8d, 3                                                         ; +0x5d, 0x18001e76d\nlea     rdx, [rsp+38h+arg_18]                                          ; +0x63, 0x18001e773\nmov     rcx, [rax]                                                     ; +0x68, 0x18001e778\nmov     [rsp+38h+arg_10], rcx                                          ; +0x6b, 0x18001e77b\nlea     rcx, [rsp+38h+arg_10]                                          ; +0x70, 0x18001e780\ncall    sub_18007F910                                                  ; +0x75, 0x18001e785\nmov     rcx, rax                                                       ; +0x7a, 0x18001e78a\nlea     rdx, aIsarr; \"_isArr\"                                          ; +0x7d, 0x18001e78d\ncall    sub_180085410                                                  ; +0x84, 0x18001e794\ncmp     byte ptr [rsi+0E8h], 0                                         ; +0x89, 0x18001e799\nlea     rax, aTrue; \"true\"                                             ; +0x90, 0x18001e7a0\nmov     rcx, [rsi+0D8h]                                                ; +0x97, 0x18001e7a7\nlea     r8, aT; \"t\"                                                    ; +0x9e, 0x18001e7ae\ncmovnz  r8, rax                                                        ; +0xa5, 0x18001e7b5\nlea     r9, [rsp+38h+arg_10]                                           ; +0xa9, 0x18001e7b9\nsub     rcx, 8                                                         ; +0xae, 0x18001e7be\nlea     rdx, [rsp+38h+arg_18]                                          ; +0xb2, 0x18001e7c2\ncall    sub_180080EE0                                                  ; +0xb7, 0x18001e7c7\nmov     rcx, rbp; this                                                 ; +0xbc, 0x18001e7cc\nxor     ebx, ebx                                                       ; +0xbf, 0x18001e7cf\ncall    ?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xc1, 0x18001e7d1\ntest    eax, eax                                                       ; +0xc6, 0x18001e7d6\njz      short loc_18001E824                                            ; +0xc8, 0x18001e7d8\nmov     [rsp+38h+var_18], rdi                                          ; +0xca, 0x18001e7da\nnop                                                                    ; +0xcf, 0x18001e7df\nmov     edx, ebx; unsigned int                                         ; +0xd0, 0x18001e7e0\nmov     rcx, rbp; this                                                 ; +0xd2, 0x18001e7e2\ncall    ?stringAtIndex@CCArray@cocos2d@@QEAAPEAVCCString@2@I@Z; cocos2d::CCArray::stringAtIndex(uint) ; +0xd5, 0x18001e7e5\nmov     edx, ebx                                                       ; +0xda, 0x18001e7ea\nlea     rcx, aKI; \"k_%i\"                                               ; +0xdc, 0x18001e7ec\nmov     rdi, rax                                                       ; +0xe3, 0x18001e7f3\ncall    ?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0xe6, 0x18001e7f6\nmov     rcx, rax; this                                                 ; +0xeb, 0x18001e7fb\ncall    ?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0xee, 0x18001e7fe\nmov     r8, rdi; struct cocos2d::CCObject *                            ; +0xf3, 0x18001e803\nmov     rdx, rax; char *                                               ; +0xf6, 0x18001e806\nmov     rcx, rsi; this                                                 ; +0xf9, 0x18001e809\ncall    ?setObjectForKey@DS_Dictionary@@QEAAXPEBDPEAVCCObject@cocos2d@@@Z; DS_Dictionary::setObjectForKey(char const *,cocos2d::CCObject *) ; +0xfc, 0x18001e80c\nmov     rcx, rbp; this                                                 ; +0x101, 0x18001e811\ninc     ebx                                                            ; +0x104, 0x18001e814\ncall    ?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x106, 0x18001e816\ncmp     ebx, eax                                                       ; +0x10b, 0x18001e81b\njb      short loc_18001E7E0                                            ; +0x10d, 0x18001e81d\nmov     rdi, [rsp+38h+var_18]                                          ; +0x10f, 0x18001e81f\nmov     rax, [rsi+0D8h]                                                ; +0x114, 0x18001e824\nsub     rax, [rsi+0D0h]                                                ; +0x11b, 0x18001e82b\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x122, 0x18001e832\nsar     rax, 3                                                         ; +0x127, 0x18001e837\ncmp     rax, 1                                                         ; +0x12b, 0x18001e83b\njbe     short loc_18001E849                                            ; +0x12f, 0x18001e83f\nadd     qword ptr [rsi+0D8h], 0FFFFFFFFFFFFFFF8h                       ; +0x131, 0x18001e841\nadd     rsp, 28h                                                       ; +0x139, 0x18001e849\npop     rsi                                                            ; +0x13d, 0x18001e84d\npop     rbp                                                            ; +0x13e, 0x18001e84e\nretn                                                                   ; +0x13f, 0x18001e84f", "xrefs": ["DS_Dictionary::setObjectForKey @ 0x18001f47f", "<???> @ 0x180133520", "<???> @ 0x180133554", "<???> @ 0x1801438a8", "<???> @ 0x1801aec50"], "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"}