{"type": "func", "start": 4298274372, "end": 4298274660, "name": "GameStatsManager::createSecretChestItems", "pseudocode": "// \n// GameStatsManager::createSecretChestItems from 0x100327644 to 0x100327764 (288 bytes)\n// \n// 1 xrefs:\n// > GameStatsManager::init @ 0x100325698\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 GameStatsManager::createSecretChestItems(GameStatsManager *a1)\n{\n  cocos2d::CCDictionary *v2; // x0\n  cocos2d::CCDictionary *v3; // x0\n  cocos2d::CCDictionary *m_allTreasureRoomChests; // x8\n  cocos2d::CCDictElement *m_pElements; // x24\n  cocos2d::CCObject *m_pObject; // x25\n  __int64 v7; // x21\n  unsigned int v8; // w22\n  _DWORD *v9; // x0\n  cocos2d::CCDictionary *m_allTreasureRoomChestItems; // x23\n  cocos2d::CCObject *v11; // x0\n  void *__p[2]; // [xsp+8h] [xbp-58h] BYREF\n  char v13; // [xsp+1Fh] [xbp-41h]\n\n  if ( !a1->m_allTreasureRoomChestItems )\n  {\n    v2 = cocos2d::CCDictionary::create();\n    a1->m_allTreasureRoomChestItems = v2;\n    cocos2d::CCObject::retain(v2);\n    v3 = cocos2d::CCDictionary::create();\n    a1->m_allTreasureRoomChests = v3;\n    cocos2d::CCObject::retain(v3);\n    GameStatsManager::createSecretChestRewards(a1);\n    m_allTreasureRoomChests = a1->m_allTreasureRoomChests;\n    if ( m_allTreasureRoomChests )\n    {\n      m_pElements = m_allTreasureRoomChests->m_pElements;\n      while ( m_pElements )\n      {\n        m_pObject = m_pElements->m_pObject;\n        m_pElements = (cocos2d::CCDictElement *)m_pElements->hh.next;\n        if ( m_pObject )\n        {\n          v7 = *(_QWORD *)&m_pObject[1].m_nTag;\n          if ( v7 )\n          {\n            if ( (unsigned int)sub_10024A36C(*(_QWORD *)&m_pObject[1].m_nTag) )\n            {\n              v8 = 0;\n              do\n              {\n                v9 = (_DWORD *)sub_10024A388(v7, v8);\n                if ( v9[14] == 9 )\n                {\n                  GameStatsManager::getItemKey(__p, v9, (unsigned int)v9[16], (unsigned int)v9[15]);\n                  cocos2d::CCDictionary::objectForKey_1(a1->m_allTreasureRoomChestItems, __p);\n                  m_allTreasureRoomChestItems = a1->m_allTreasureRoomChestItems;\n                  v11 = sub_100268F4C(\"%i\", LODWORD(m_pObject[1].__vftable));\n                  cocos2d::CCDictionary::setObject_1(m_allTreasureRoomChestItems, v11, __p);\n                  if ( v13 < 0 )\n                    operator delete(__p[0]);\n                }\n                ++v8;\n              }\n              while ( v8 < (unsigned int)sub_10024A36C(v7) );\n            }\n          }\n        }\n      }\n    }\n  }\n}", "assembly": "; \n; GameStatsManager::createSecretChestItems from 0x100327644 to 0x100327764 (288 bytes)\n; \n; 1 xrefs:\n; > GameStatsManager::init @ 0x100325698\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\nSUB             SP, SP, #0x70                                          ; +0x0, 0x100327644\nSTP             X26, X25, [SP,#0x60+var_40]                            ; +0x4, 0x100327648\nSTP             X24, X23, [SP,#0x60+var_30]                            ; +0x8, 0x10032764c\nSTP             X22, X21, [SP,#0x60+var_20]                            ; +0xc, 0x100327650\nSTP             X20, X19, [SP,#0x60+var_10]                            ; +0x10, 0x100327654\nSTP             X29, X30, [SP,#0x60+var_s0]                            ; +0x14, 0x100327658\nADD             X29, SP, #0x60                                         ; +0x18, 0x10032765c\nLDR             X8, [X0,#0x160]                                        ; +0x1c, 0x100327660\nCBZ             X8, loc_100327684                                      ; +0x20, 0x100327664\nLDP             X29, X30, [SP,#0x60+var_s0]                            ; +0x24, 0x100327668\nLDP             X20, X19, [SP,#0x60+var_10]                            ; +0x28, 0x10032766c\nLDP             X22, X21, [SP,#0x60+var_20]                            ; +0x2c, 0x100327670\nLDP             X24, X23, [SP,#0x60+var_30]                            ; +0x30, 0x100327674\nLDP             X26, X25, [SP,#0x60+var_40]                            ; +0x34, 0x100327678\nADD             SP, SP, #0x70 ; 'p'                                    ; +0x38, 0x10032767c\nRET                                                                    ; +0x3c, 0x100327680\nMOV             X19, X0                                                ; +0x40, 0x100327684\nBL              cocos2d__CCDictionary__create                          ; +0x44, 0x100327688\nSTR             X0, [X19,#0x160]                                       ; +0x48, 0x10032768c\nBL              cocos2d__CCObject__retain                              ; +0x4c, 0x100327690\nBL              cocos2d__CCDictionary__create                          ; +0x50, 0x100327694\nSTR             X0, [X19,#0x158]                                       ; +0x54, 0x100327698\nBL              cocos2d__CCObject__retain                              ; +0x58, 0x10032769c\nMOV             X0, X19                                                ; +0x5c, 0x1003276a0\nBL              GameStatsManager__createSecretChestRewards             ; +0x60, 0x1003276a4\nLDR             X8, [X19,#0x158]                                       ; +0x64, 0x1003276a8\nCBZ             X8, loc_100327668                                      ; +0x68, 0x1003276ac\nLDR             X24, [X8,#0x38]                                        ; +0x6c, 0x1003276b0\nCBZ             X24, loc_100327668                                     ; +0x70, 0x1003276b4\nADRL            X20, aI; \"%i\"                                          ; +0x74, 0x1003276b8\nLDR             X25, [X24,#0x108]                                      ; +0x7c, 0x1003276c0\nLDR             X24, [X24,#0x120]                                      ; +0x80, 0x1003276c4\nCBZ             X25, loc_10032775C                                     ; +0x84, 0x1003276c8\nLDR             X21, [X25,#0x48]                                       ; +0x88, 0x1003276cc\nCBZ             X21, loc_10032775C                                     ; +0x8c, 0x1003276d0\nMOV             X0, X21                                                ; +0x90, 0x1003276d4\nBL              sub_10024A36C                                          ; +0x94, 0x1003276d8\nCBZ             W0, loc_10032775C                                      ; +0x98, 0x1003276dc\nMOV             W22, #0                                                ; +0x9c, 0x1003276e0\nMOV             X0, X21                                                ; +0xa0, 0x1003276e4\nMOV             X1, X22                                                ; +0xa4, 0x1003276e8\nBL              sub_10024A388                                          ; +0xa8, 0x1003276ec\nLDR             W8, [X0,#0x38]                                         ; +0xac, 0x1003276f0\nCMP             W8, #9                                                 ; +0xb0, 0x1003276f4\nB.NE            loc_100327748                                          ; +0xb4, 0x1003276f8\nLDP             W2, W1, [X0,#0x3C]                                     ; +0xb8, 0x1003276fc\nADD             X8, SP, #0x60+__p                                      ; +0xbc, 0x100327700\nBL              GameStatsManager__getItemKey                           ; +0xc0, 0x100327704\nLDR             X0, [X19,#0x160]                                       ; +0xc4, 0x100327708\nADD             X1, SP, #0x60+__p                                      ; +0xc8, 0x10032770c\nBL              cocos2d__CCDictionary__objectForKey_1                  ; +0xcc, 0x100327710\nLDR             X23, [X19,#0x160]                                      ; +0xd0, 0x100327714\nLDR             W8, [X25,#0x38]                                        ; +0xd4, 0x100327718\nSTR             X8, [SP,#0x60+var_60]                                  ; +0xd8, 0x10032771c\nMOV             X0, X20                                                ; +0xdc, 0x100327720\nBL              sub_100268F4C                                          ; +0xe0, 0x100327724\nMOV             X1, X0                                                 ; +0xe4, 0x100327728\nADD             X2, SP, #0x60+__p                                      ; +0xe8, 0x10032772c\nMOV             X0, X23                                                ; +0xec, 0x100327730\nBL              cocos2d__CCDictionary__setObject_1                     ; +0xf0, 0x100327734\nLDRSB           W8, [SP,#0x60+var_41]                                  ; +0xf4, 0x100327738\nTBZ             W8, #0x1F, loc_100327748                               ; +0xf8, 0x10032773c\nLDR             X0, [SP,#0x60+__p]; __p                                ; +0xfc, 0x100327740\nBL              __ZdlPv; operator delete(void *)                       ; +0x100, 0x100327744\nADD             W22, W22, #1                                           ; +0x104, 0x100327748\nMOV             X0, X21                                                ; +0x108, 0x10032774c\nBL              sub_10024A36C                                          ; +0x10c, 0x100327750\nCMP             W22, W0                                                ; +0x110, 0x100327754\nB.CC            loc_1003276E4                                          ; +0x114, 0x100327758\nCBNZ            X24, loc_1003276C0                                     ; +0x118, 0x10032775c\nB               loc_100327668                                          ; +0x11c, 0x100327760", "xrefs": ["GameStatsManager::init @ 0x100325698"], "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"}