{"type": "func", "start": 5372605264, "end": 5372605748, "name": "GJSmartTemplate::saveRemapToDict", "pseudocode": "// \n// GJSmartTemplate::saveRemapToDict from 0x1403b7350 to 0x1403b7534 (484 bytes)\n// \n// 8 xrefs:\n// > GJSmartTemplate::saveRemap @ 0x1403b6fed\n// > GJSmartTemplate::saveRemap @ 0x1403b7031\n// > GJSmartTemplate::saveRemap @ 0x1403b7076\n// > GJSmartTemplate::saveRemap @ 0x1403b7173\n// > GJSmartTemplate::saveRemap @ 0x1403b71b7\n// > GJSmartTemplate::saveRemap @ 0x1403b729f\n// > GJSmartTemplate::saveRemap @ 0x1403b72e3\n// > <???> @ 0x140923cfc\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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 11:31:25 +0000\n// \n\n// Hidden C++ exception states: #wind=2\nvoid __fastcall GJSmartTemplate::saveRemapToDict(__int64 a1, __int64 a2, const void **a3, __int64 a4)\n{\n  __int64 v7; // rcx\n  cocos2d::CCArray *v8; // r12\n  unsigned int v9; // r15d\n  cocos2d::CCString *v10; // rax\n  const char *CString; // rax\n  size_t v12; // r8\n  const void *v13; // rdx\n  void **v14; // rcx\n  char *v15; // rdi\n  unsigned __int64 v16; // r13\n  const void *v17; // r14\n  size_t v18; // rbp\n  size_t v19; // r8\n  int v20; // ebx\n  char *v21; // rax\n  struct cocos2d::CCObject *v22; // rax\n  void *Buf1[2]; // [rsp+48h] [rbp-60h] BYREF\n  size_t v25; // [rsp+58h] [rbp-50h]\n  unsigned __int64 v26; // [rsp+60h] [rbp-48h]\n\n  if ( *(_QWORD *)(a2 + 16) )\n  {\n    v8 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(a4, a2);\n    if ( !v8 )\n    {\n      v8 = (cocos2d::CCArray *)cocos2d::CCArray::create(v7);\n      cocos2d::CCDictionary::setObject(a4, v8, a2);\n    }\n    v9 = 0;\n    if ( cocos2d::CCArray::count(v8) )\n    {\n      while ( 1 )\n      {\n        v10 = cocos2d::CCArray::stringAtIndex(v8, v9);\n        CString = cocos2d::CCString::getCString(v10);\n        *(_OWORD *)Buf1 = 0;\n        v25 = 0;\n        v26 = 0;\n        v12 = -1;\n        do\n          ++v12;\n        while ( CString[v12] );\n        sub_14003D230(Buf1, CString, v12);\n        v13 = a3;\n        if ( (unsigned __int64)a3[3] > 0xF )\n          v13 = *a3;\n        v14 = Buf1;\n        v15 = (char *)Buf1[0];\n        v16 = v26;\n        if ( v26 > 0xF )\n          v14 = (void **)Buf1[0];\n        v17 = a3[2];\n        v18 = v25;\n        v19 = v25;\n        if ( (unsigned __int64)v17 < v25 )\n          v19 = (size_t)a3[2];\n        v20 = memcmp(v14, v13, v19);\n        if ( !v20 )\n        {\n          if ( v18 >= (unsigned __int64)v17 )\n            v20 = v18 > (unsigned __int64)v17;\n          else\n            v20 = -1;\n        }\n        if ( v16 > 0xF )\n        {\n          v21 = v15;\n          if ( v16 + 1 >= 0x1000 )\n          {\n            v15 = *((char **)v15 - 1);\n            if ( (unsigned __int64)(v21 - v15 - 8) > 0x1F )\n              invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n          }\n          j_j_free(v15);\n        }\n        if ( !v20 )\n          break;\n        if ( ++v9 >= cocos2d::CCArray::count(v8) )\n          goto LABEL_25;\n      }\n    }\n    else\n    {\nLABEL_25:\n      v22 = (struct cocos2d::CCObject *)cocos2d::CCString::create(a3);\n      cocos2d::CCArray::addObject(v8, v22);\n    }\n  }\n  sub_14003D310(a2);\n  sub_14003D310((__int64)a3);\n}", "assembly": "; \n; GJSmartTemplate::saveRemapToDict from 0x1403b7350 to 0x1403b7534 (484 bytes)\n; \n; 8 xrefs:\n; > GJSmartTemplate::saveRemap @ 0x1403b6fed\n; > GJSmartTemplate::saveRemap @ 0x1403b7031\n; > GJSmartTemplate::saveRemap @ 0x1403b7076\n; > GJSmartTemplate::saveRemap @ 0x1403b7173\n; > GJSmartTemplate::saveRemap @ 0x1403b71b7\n; > GJSmartTemplate::saveRemap @ 0x1403b729f\n; > GJSmartTemplate::saveRemap @ 0x1403b72e3\n; > <???> @ 0x140923cfc\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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 11:31:25 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1403b7350\npush    rbp                                                            ; +0x5, 0x1403b7355\npush    rsi                                                            ; +0x6, 0x1403b7356\npush    rdi                                                            ; +0x7, 0x1403b7357\npush    r12                                                            ; +0x8, 0x1403b7358\npush    r13                                                            ; +0xa, 0x1403b735a\npush    r14                                                            ; +0xc, 0x1403b735c\npush    r15                                                            ; +0xe, 0x1403b735e\nsub     rsp, 70h                                                       ; +0x10, 0x1403b7360\nmov     rax, cs:__security_cookie                                      ; +0x14, 0x1403b7364\nxor     rax, rsp                                                       ; +0x1b, 0x1403b736b\nmov     [rsp+0A8h+var_40], rax                                         ; +0x1e, 0x1403b736e\nmov     rbx, r9                                                        ; +0x23, 0x1403b7373\nmov     rsi, r8                                                        ; +0x26, 0x1403b7376\nmov     rdi, rdx                                                       ; +0x29, 0x1403b7379\nmov     [rsp+0A8h+var_78], rdx                                         ; +0x2c, 0x1403b737c\nmov     [rsp+0A8h+var_70], rdx                                         ; +0x31, 0x1403b7381\nmov     [rsp+0A8h+var_68], r8                                          ; +0x36, 0x1403b7386\ncmp     qword ptr [rdx+10h], 0                                         ; +0x3b, 0x1403b738b\njz      loc_1403B74FC                                                  ; +0x40, 0x1403b7390\nmov     rcx, rbx                                                       ; +0x46, 0x1403b7396\ncall    cs:?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 &) ; +0x49, 0x1403b7399\nmov     r12, rax                                                       ; +0x4f, 0x1403b739f\ntest    rax, rax                                                       ; +0x52, 0x1403b73a2\njnz     short loc_1403B73BF                                            ; +0x55, 0x1403b73a5\ncall    cs:?create@CCArray@cocos2d@@SAPEAV12@XZ; cocos2d::CCArray::create(void) ; +0x57, 0x1403b73a7\nmov     r12, rax                                                       ; +0x5d, 0x1403b73ad\nmov     r8, rdi                                                        ; +0x60, 0x1403b73b0\nmov     rdx, rax                                                       ; +0x63, 0x1403b73b3\nmov     rcx, rbx                                                       ; +0x66, 0x1403b73b6\ncall    cs:?setObject@CCDictionary@cocos2d@@QEAAXPEAVCCObject@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,std::string const &) ; +0x69, 0x1403b73b9\nxor     ebx, ebx                                                       ; +0x6f, 0x1403b73bf\nmov     r15d, ebx                                                      ; +0x71, 0x1403b73c1\nmov     rcx, r12                                                       ; +0x74, 0x1403b73c4\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x77, 0x1403b73c7\ntest    eax, eax                                                       ; +0x7d, 0x1403b73cd\njz      loc_1403B74E6                                                  ; +0x7f, 0x1403b73cf\nnop     word ptr [rax+rax+00000000h]                                   ; +0x85, 0x1403b73d5\nmov     edx, r15d                                                      ; +0x90, 0x1403b73e0\nmov     rcx, r12                                                       ; +0x93, 0x1403b73e3\ncall    cs:?stringAtIndex@CCArray@cocos2d@@QEAAPEAVCCString@2@I@Z; cocos2d::CCArray::stringAtIndex(uint) ; +0x96, 0x1403b73e6\nmov     rcx, rax                                                       ; +0x9c, 0x1403b73ec\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x9f, 0x1403b73ef\nxorps   xmm0, xmm0                                                     ; +0xa5, 0x1403b73f5\nmovups  xmmword ptr [rsp+0A8h+Buf1], xmm0                              ; +0xa8, 0x1403b73f8\nmov     [rsp+0A8h+var_50], rbx                                         ; +0xad, 0x1403b73fd\nmov     [rsp+0A8h+var_48], rbx                                         ; +0xb2, 0x1403b7402\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0xb7, 0x1403b7407\nxchg    ax, ax                                                         ; +0xbe, 0x1403b740e\ninc     r8                                                             ; +0xc0, 0x1403b7410\ncmp     byte ptr [rax+r8], 0                                           ; +0xc3, 0x1403b7413\njnz     short loc_1403B7410                                            ; +0xc8, 0x1403b7418\nmov     rdx, rax                                                       ; +0xca, 0x1403b741a\nlea     rcx, [rsp+0A8h+Buf1]                                           ; +0xcd, 0x1403b741d\ncall    sub_14003D230                                                  ; +0xd2, 0x1403b7422\nmov     rdx, rsi                                                       ; +0xd7, 0x1403b7427\ncmp     qword ptr [rsi+18h], 0Fh                                       ; +0xda, 0x1403b742a\njbe     short loc_1403B7434                                            ; +0xdf, 0x1403b742f\nmov     rdx, [rsi]; Buf2                                               ; +0xe1, 0x1403b7431\nlea     rcx, [rsp+0A8h+Buf1]                                           ; +0xe4, 0x1403b7434\nmov     rdi, [rsp+0A8h+Buf1]                                           ; +0xe9, 0x1403b7439\nmov     r13, [rsp+0A8h+var_48]                                         ; +0xee, 0x1403b743e\ncmp     r13, 0Fh                                                       ; +0xf3, 0x1403b7443\ncmova   rcx, rdi; Buf1                                                 ; +0xf7, 0x1403b7447\nmov     r14, [rsi+10h]                                                 ; +0xfb, 0x1403b744b\nmov     rbp, [rsp+0A8h+var_50]                                         ; +0xff, 0x1403b744f\nmov     r8, rbp                                                        ; +0x104, 0x1403b7454\ncmp     r14, rbp                                                       ; +0x107, 0x1403b7457\ncmovb   r8, r14; Size                                                  ; +0x10a, 0x1403b745a\ncall    memcmp                                                         ; +0x10e, 0x1403b745e\nmov     ebx, eax                                                       ; +0x113, 0x1403b7463\ntest    eax, eax                                                       ; +0x115, 0x1403b7465\njnz     short loc_1403B747D                                            ; +0x117, 0x1403b7467\ncmp     rbp, r14                                                       ; +0x119, 0x1403b7469\njnb     short loc_1403B7475                                            ; +0x11c, 0x1403b746c\nmov     ebx, 0FFFFFFFFh                                                ; +0x11e, 0x1403b746e\njmp     short loc_1403B747D                                            ; +0x123, 0x1403b7473\nxor     ebx, ebx                                                       ; +0x125, 0x1403b7475\ncmp     rbp, r14                                                       ; +0x127, 0x1403b7477\nsetnbe  bl                                                             ; +0x12a, 0x1403b747a\ncmp     r13, 0Fh                                                       ; +0x12d, 0x1403b747d\njbe     short loc_1403B74B0                                            ; +0x131, 0x1403b7481\nlea     rdx, [r13+1]                                                   ; +0x133, 0x1403b7483\nmov     rax, rdi                                                       ; +0x137, 0x1403b7487\ncmp     rdx, 1000h                                                     ; +0x13a, 0x1403b748a\njb      short loc_1403B74A8                                            ; +0x141, 0x1403b7491\nadd     rdx, 27h ; '''                                                 ; +0x143, 0x1403b7493\nmov     rdi, [rdi-8]                                                   ; +0x147, 0x1403b7497\nsub     rax, rdi                                                       ; +0x14b, 0x1403b749b\nsub     rax, 8                                                         ; +0x14e, 0x1403b749e\ncmp     rax, 1Fh                                                       ; +0x152, 0x1403b74a2\nja      short loc_1403B74CC                                            ; +0x156, 0x1403b74a6\nmov     rcx, rdi; Block                                                ; +0x158, 0x1403b74a8\ncall    j_j_free                                                       ; +0x15b, 0x1403b74ab\ntest    ebx, ebx                                                       ; +0x160, 0x1403b74b0\njz      short loc_1403B74FC                                            ; +0x162, 0x1403b74b2\ninc     r15d                                                           ; +0x164, 0x1403b74b4\nmov     rcx, r12                                                       ; +0x167, 0x1403b74b7\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x16a, 0x1403b74ba\ncmp     r15d, eax                                                      ; +0x170, 0x1403b74c0\njnb     short loc_1403B74E6                                            ; +0x173, 0x1403b74c3\nxor     ebx, ebx                                                       ; +0x175, 0x1403b74c5\njmp     loc_1403B73E0                                                  ; +0x177, 0x1403b74c7\nmov     [rsp+0A8h+Reserved], 0; Reserved                               ; +0x17c, 0x1403b74cc\nxor     r9d, r9d; LineNo                                               ; +0x185, 0x1403b74d5\nxor     r8d, r8d; FileName                                             ; +0x188, 0x1403b74d8\nxor     edx, edx; FunctionName                                         ; +0x18b, 0x1403b74db\nxor     ecx, ecx; Expression                                           ; +0x18d, 0x1403b74dd\ncall    cs:_invoke_watson                                              ; +0x18f, 0x1403b74df\nalign 2                                                                ; +0x195, 0x1403b74e5\nmov     rcx, rsi                                                       ; +0x196, 0x1403b74e6\ncall    cs:?create@CCString@cocos2d@@SAPEAV12@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCString::create(std::string const &) ; +0x199, 0x1403b74e9\nmov     rdx, rax                                                       ; +0x19f, 0x1403b74ef\nmov     rcx, r12                                                       ; +0x1a2, 0x1403b74f2\ncall    cs:?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x1a5, 0x1403b74f5\nnop                                                                    ; +0x1ab, 0x1403b74fb\nmov     rcx, [rsp+0A8h+var_78]                                         ; +0x1ac, 0x1403b74fc\ncall    sub_14003D310                                                  ; +0x1b1, 0x1403b7501\nnop                                                                    ; +0x1b6, 0x1403b7506\nmov     rcx, rsi                                                       ; +0x1b7, 0x1403b7507\ncall    sub_14003D310                                                  ; +0x1ba, 0x1403b750a\nmov     rcx, [rsp+0A8h+var_40]                                         ; +0x1bf, 0x1403b750f\nxor     rcx, rsp; StackCookie                                          ; +0x1c4, 0x1403b7514\ncall    __security_check_cookie                                        ; +0x1c7, 0x1403b7517\nmov     rbx, [rsp+0A8h+arg_0]                                          ; +0x1cc, 0x1403b751c\nadd     rsp, 70h                                                       ; +0x1d4, 0x1403b7524\npop     r15                                                            ; +0x1d8, 0x1403b7528\npop     r14                                                            ; +0x1da, 0x1403b752a\npop     r13                                                            ; +0x1dc, 0x1403b752c\npop     r12                                                            ; +0x1de, 0x1403b752e\npop     rdi                                                            ; +0x1e0, 0x1403b7530\npop     rsi                                                            ; +0x1e1, 0x1403b7531\npop     rbp                                                            ; +0x1e2, 0x1403b7532\nretn                                                                   ; +0x1e3, 0x1403b7533", "xrefs": ["GJSmartTemplate::saveRemap @ 0x1403b6fed", "GJSmartTemplate::saveRemap @ 0x1403b7031", "GJSmartTemplate::saveRemap @ 0x1403b7076", "GJSmartTemplate::saveRemap @ 0x1403b7173", "GJSmartTemplate::saveRemap @ 0x1403b71b7", "GJSmartTemplate::saveRemap @ 0x1403b729f", "GJSmartTemplate::saveRemap @ 0x1403b72e3", "<???> @ 0x140923cfc"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}