{"type": "func", "start": 4295001064, "end": 4295001564, "name": "GJSmartTemplate::dataLoaded", "pseudocode": "// \n// GJSmartTemplate::dataLoaded from 0x1000083e8 to 0x1000085dc (500 bytes)\n// \n// 1 xrefs:\n// > GJSmartTemplate::createWithCoder @ 0x1000083d4\n// \n// This function is hookable on this platform (idp: arm, 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 10:57:11 +0000\n// \n\n__int64 __fastcall GJSmartTemplate::dataLoaded(__int64 a1, __int64 a2)\n{\n  __int64 DictForKey; // x0\n  __int64 v5; // x20\n  __int64 result; // x0\n  __int64 v7; // x21\n  __int64 v8; // x0\n  char *CString; // x0\n  __int64 v10; // x0\n  unsigned int *v11; // x9\n  __int64 v12; // x8\n  unsigned __int64 v13; // x22\n  unsigned __int64 v14; // x23\n  std::string __p; // [xsp+0h] [xbp-60h] BYREF\n  std::string __str; // [xsp+18h] [xbp-48h] BYREF\n\n  *(_DWORD *)(a1 + 192) = DS_Dictionary::getIntegerForKey(a2, \"1\");\n  DS_Dictionary::getStringForKey(&__str, a2, \"2\");\n  if ( *(char *)(a1 + 167) < 0 )\n    operator delete(*(void **)(a1 + 144));\n  *(std::string *)(a1 + 144) = __str;\n  *(_BYTE *)(a1 + 138) = (unsigned int)DS_Dictionary::getIntegerForKey(a2, \"4\") != 0;\n  *(_BYTE *)(a1 + 136) = (unsigned int)DS_Dictionary::getIntegerForKey(a2, \"5\") != 0;\n  *(_BYTE *)(a1 + 137) = (unsigned int)DS_Dictionary::getIntegerForKey(a2, \"6\") != 0;\n  *(_BYTE *)(a1 + 139) = (unsigned int)DS_Dictionary::getIntegerForKey(a2, \"7\") != 0;\n  DictForKey = DS_Dictionary::getDictForKey(a2, \"3\", 0);\n  sub_100004430(a1, DictForKey);\n  v5 = cocos2d::CCDictionary::allKeys(*(_QWORD *)(a1 + 56));\n  result = sub_1002E757C(v5);\n  if ( (_DWORD)result )\n  {\n    v7 = 0;\n    do\n    {\n      v8 = cocos2d::CCArray::stringAtIndex(v5, v7);\n      CString = (char *)cocos2d::CCString::getCString(v8);\n      sub_100009900((int)&__str, CString);\n      if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 )\n        sub_1000097D0(&__p, __str.__r_.__value_.__l.__data_);\n      else\n        __p = __str;\n      sub_100004698((_QWORD *)a1, (__int128 *)&__p);\n      if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )\n        operator delete(__p.__r_.__value_.__l.__data_);\n      v10 = cocos2d::CCDictionary::objectForKey(*(_QWORD *)(a1 + 56), &__str);\n      if ( v10 )\n      {\n        v11 = *(unsigned int **)(v10 + 56);\n        v12 = *v11;\n        if ( (_DWORD)v12 )\n        {\n          v13 = *((_QWORD *)v11 + 2);\n          v14 = v13 + 8 * v12 - 8;\n          do\n          {\n            if ( !*(_QWORD *)v13 )\n              break;\n            std::string::operator=((std::string *)(*(_QWORD *)v13 + 56LL), &__str);\n            v13 += 8LL;\n          }\n          while ( v13 <= v14 );\n        }\n      }\n      if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 )\n        operator delete(__str.__r_.__value_.__l.__data_);\n      v7 = (unsigned int)(v7 + 1);\n      result = sub_1002E757C(v5);\n    }\n    while ( (unsigned int)v7 < (unsigned int)result );\n  }\n  return result;\n}", "assembly": "; \n; GJSmartTemplate::dataLoaded from 0x1000083e8 to 0x1000085dc (500 bytes)\n; \n; 1 xrefs:\n; > GJSmartTemplate::createWithCoder @ 0x1000083d4\n; \n; This function is hookable on this platform (idp: arm, 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 10:57:11 +0000\n; \nSUB             SP, SP, #0x70                                          ; +0x0, 0x1000083e8\nSTP             X24, X23, [SP,#0x60+var_30]                            ; +0x4, 0x1000083ec\nSTP             X22, X21, [SP,#0x60+var_20]                            ; +0x8, 0x1000083f0\nSTP             X20, X19, [SP,#0x60+var_10]                            ; +0xc, 0x1000083f4\nSTP             X29, X30, [SP,#0x60+var_s0]                            ; +0x10, 0x1000083f8\nADD             X29, SP, #0x60                                         ; +0x14, 0x1000083fc\nMOV             X20, X1                                                ; +0x18, 0x100008400\nMOV             X19, X0                                                ; +0x1c, 0x100008404\nADRL            X1, a1; \"1\"                                            ; +0x20, 0x100008408\nMOV             X0, X20                                                ; +0x28, 0x100008410\nBL              DS_Dictionary__getIntegerForKey                        ; +0x2c, 0x100008414\nSTR             W0, [X19,#0xC0]                                        ; +0x30, 0x100008418\nADRL            X1, a2; \"2\"                                            ; +0x34, 0x10000841c\nADD             X8, SP, #0x60+__str                                    ; +0x3c, 0x100008424\nMOV             X0, X20                                                ; +0x40, 0x100008428\nBL              DS_Dictionary__getStringForKey                         ; +0x44, 0x10000842c\nLDRSB           W8, [X19,#0xA7]                                        ; +0x48, 0x100008430\nTBZ             W8, #0x1F, loc_100008440                               ; +0x4c, 0x100008434\nLDUR            X0, [X19,#0x90]; __p                                   ; +0x50, 0x100008438\nBL              __ZdlPv; operator delete(void *)                       ; +0x54, 0x10000843c\nLDUR            Q0, [SP,#0x60+__str]                                   ; +0x58, 0x100008440\nSTUR            Q0, [X19,#0x90]                                        ; +0x5c, 0x100008444\nLDR             X8, [SP,#0x60+__str.__r_.__value_+0x10]                ; +0x60, 0x100008448\nSTUR            X8, [X19,#0xA0]                                        ; +0x64, 0x10000844c\nADRL            X1, a4; \"4\"                                            ; +0x68, 0x100008450\nMOV             X0, X20                                                ; +0x70, 0x100008458\nBL              DS_Dictionary__getIntegerForKey                        ; +0x74, 0x10000845c\nCMP             W0, #0                                                 ; +0x78, 0x100008460\nCSET            W8, NE                                                 ; +0x7c, 0x100008464\nSTRB            W8, [X19,#0x8A]                                        ; +0x80, 0x100008468\nADRL            X1, a5; \"5\"                                            ; +0x84, 0x10000846c\nMOV             X0, X20                                                ; +0x8c, 0x100008474\nBL              DS_Dictionary__getIntegerForKey                        ; +0x90, 0x100008478\nCMP             W0, #0                                                 ; +0x94, 0x10000847c\nCSET            W8, NE                                                 ; +0x98, 0x100008480\nSTRB            W8, [X19,#0x88]                                        ; +0x9c, 0x100008484\nADRL            X1, a6; \"6\"                                            ; +0xa0, 0x100008488\nMOV             X0, X20                                                ; +0xa8, 0x100008490\nBL              DS_Dictionary__getIntegerForKey                        ; +0xac, 0x100008494\nCMP             W0, #0                                                 ; +0xb0, 0x100008498\nCSET            W8, NE                                                 ; +0xb4, 0x10000849c\nSTRB            W8, [X19,#0x89]                                        ; +0xb8, 0x1000084a0\nADRL            X1, a7; \"7\"                                            ; +0xbc, 0x1000084a4\nMOV             X0, X20                                                ; +0xc4, 0x1000084ac\nBL              DS_Dictionary__getIntegerForKey                        ; +0xc8, 0x1000084b0\nCMP             W0, #0                                                 ; +0xcc, 0x1000084b4\nCSET            W8, NE                                                 ; +0xd0, 0x1000084b8\nSTRB            W8, [X19,#0x8B]                                        ; +0xd4, 0x1000084bc\nADRL            X1, a3; \"3\"                                            ; +0xd8, 0x1000084c0\nMOV             X0, X20                                                ; +0xe0, 0x1000084c8\nMOV             W2, #0                                                 ; +0xe4, 0x1000084cc\nBL              DS_Dictionary__getDictForKey                           ; +0xe8, 0x1000084d0\nMOV             X1, X0                                                 ; +0xec, 0x1000084d4\nMOV             X0, X19                                                ; +0xf0, 0x1000084d8\nBL              sub_100004430                                          ; +0xf4, 0x1000084dc\nLDR             X0, [X19,#0x38]                                        ; +0xf8, 0x1000084e0\nBL              cocos2d__CCDictionary__allKeys                         ; +0xfc, 0x1000084e4\nMOV             X20, X0                                                ; +0x100, 0x1000084e8\nBL              sub_1002E757C                                          ; +0x104, 0x1000084ec\nCBZ             W0, loc_1000085C4                                      ; +0x108, 0x1000084f0\nMOV             W21, #0                                                ; +0x10c, 0x1000084f4\nMOV             X0, X20                                                ; +0x110, 0x1000084f8\nMOV             X1, X21                                                ; +0x114, 0x1000084fc\nBL              cocos2d__CCArray__stringAtIndex                        ; +0x118, 0x100008500\nBL              cocos2d__CCString__getCString                          ; +0x11c, 0x100008504\nMOV             X1, X0; __s                                            ; +0x120, 0x100008508\nADD             X0, SP, #0x60+__str; int                               ; +0x124, 0x10000850c\nBL              sub_100009900                                          ; +0x128, 0x100008510\nLDRSB           W8, [SP,#0x60+__str.__r_.__value_+0x17]                ; +0x12c, 0x100008514\nTBNZ            W8, #0x1F, loc_100008530                               ; +0x130, 0x100008518\nLDUR            Q0, [SP,#0x60+__str]                                   ; +0x134, 0x10000851c\nSTR             Q0, [SP,#0x60+__p]                                     ; +0x138, 0x100008520\nLDR             X8, [SP,#0x60+__str.__r_.__value_+0x10]                ; +0x13c, 0x100008524\nSTR             X8, [SP,#0x60+var_50]                                  ; +0x140, 0x100008528\nB               loc_10000853C                                          ; +0x144, 0x10000852c\nLDP             X1, X2, [SP,#0x60+__str]; __src                        ; +0x148, 0x100008530\nMOV             X0, SP; __dst                                          ; +0x14c, 0x100008534\nBL              sub_1000097D0                                          ; +0x150, 0x100008538\nMOV             X1, SP                                                 ; +0x154, 0x10000853c\nMOV             X0, X19                                                ; +0x158, 0x100008540\nBL              sub_100004698                                          ; +0x15c, 0x100008544\nLDRSB           W8, [SP,#0x60+var_50+7]                                ; +0x160, 0x100008548\nTBZ             W8, #0x1F, loc_100008558                               ; +0x164, 0x10000854c\nLDR             X0, [SP,#0x60+__p]; __p                                ; +0x168, 0x100008550\nBL              __ZdlPv; operator delete(void *)                       ; +0x16c, 0x100008554\nLDR             X0, [X19,#0x38]                                        ; +0x170, 0x100008558\nADD             X1, SP, #0x60+__str                                    ; +0x174, 0x10000855c\nBL              cocos2d__CCDictionary__objectForKey                    ; +0x178, 0x100008560\nCBZ             X0, loc_1000085A0                                      ; +0x17c, 0x100008564\nLDR             X9, [X0,#0x38]                                         ; +0x180, 0x100008568\nLDR             W8, [X9]                                               ; +0x184, 0x10000856c\nCBZ             W8, loc_1000085A0                                      ; +0x188, 0x100008570\nLDR             X22, [X9,#0x10]                                        ; +0x18c, 0x100008574\nADD             X8, X22, X8,LSL#3                                      ; +0x190, 0x100008578\nSUB             X23, X8, #8                                            ; +0x194, 0x10000857c\nLDR             X8, [X22]                                              ; +0x198, 0x100008580\nCBZ             X8, loc_1000085A0                                      ; +0x19c, 0x100008584\nADD             X0, X8, #0x38 ; '8'; this                              ; +0x1a0, 0x100008588\nADD             X1, SP, #0x60+__str; __str                             ; +0x1a4, 0x10000858c\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5_; std::string::operator=(std::string const&) ; +0x1a8, 0x100008590\nADD             X22, X22, #8                                           ; +0x1ac, 0x100008594\nCMP             X22, X23                                               ; +0x1b0, 0x100008598\nB.LS            loc_100008580                                          ; +0x1b4, 0x10000859c\nLDRSB           W8, [SP,#0x60+__str.__r_.__value_+0x17]                ; +0x1b8, 0x1000085a0\nTBZ             W8, #0x1F, loc_1000085B0                               ; +0x1bc, 0x1000085a4\nLDR             X0, [SP,#0x60+__str]; __p                              ; +0x1c0, 0x1000085a8\nBL              __ZdlPv; operator delete(void *)                       ; +0x1c4, 0x1000085ac\nADD             W21, W21, #1                                           ; +0x1c8, 0x1000085b0\nMOV             X0, X20                                                ; +0x1cc, 0x1000085b4\nBL              sub_1002E757C                                          ; +0x1d0, 0x1000085b8\nCMP             W21, W0                                                ; +0x1d4, 0x1000085bc\nB.CC            loc_1000084F8                                          ; +0x1d8, 0x1000085c0\nLDP             X29, X30, [SP,#0x60+var_s0]                            ; +0x1dc, 0x1000085c4\nLDP             X20, X19, [SP,#0x60+var_10]                            ; +0x1e0, 0x1000085c8\nLDP             X22, X21, [SP,#0x60+var_20]                            ; +0x1e4, 0x1000085cc\nLDP             X24, X23, [SP,#0x60+var_30]                            ; +0x1e8, 0x1000085d0\nADD             SP, SP, #0x70 ; 'p'                                    ; +0x1ec, 0x1000085d4\nRET                                                                    ; +0x1f0, 0x1000085d8", "xrefs": ["GJSmartTemplate::createWithCoder @ 0x1000083d4"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "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"}