{"type": "func", "start": 4298323260, "end": 4298323392, "name": "GameStatsManager::collectReward", "pseudocode": "// \n// GameStatsManager::collectReward from 0x10033353c to 0x1003335c0 (132 bytes)\n// \n// 1 xrefs:\n// > RewardsPage::rewardsStatusFinished @ 0x1001c4b30\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// local variable allocation has failed, the output may be wrong!\nvoid __fastcall GameStatsManager::collectReward(GameStatsManager *a1, GJRewardType a2, GJRewardItem *a3)\n{\n  __int64 v4; // x20\n  cocos2d::CCDictionary *m_dailyChests; // x21\n  void *__p[2]; // [xsp+8h] [xbp-38h] BYREF\n  char v8; // [xsp+1Fh] [xbp-21h]\n\n  if ( a3 )\n  {\n    v4 = *(_QWORD *)&a2;\n    if ( !GameStatsManager::hasRewardBeenCollected(a1, a2, a3->m_chestID) )\n    {\n      GameStatsManager::registerRewardsFromItem(a1, a3);\n      m_dailyChests = a1->m_dailyChests;\n      GameStatsManager::getRewardKey(v4, (unsigned int)a3->m_chestID, __p);\n      cocos2d::CCDictionary::setObject_1(m_dailyChests, a3, __p);\n      if ( v8 < 0 )\n        operator delete(__p[0]);\n    }\n  }\n}", "assembly": "; \n; GameStatsManager::collectReward from 0x10033353c to 0x1003335c0 (132 bytes)\n; \n; 1 xrefs:\n; > RewardsPage::rewardsStatusFinished @ 0x1001c4b30\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, #0x50                                          ; +0x0, 0x10033353c\nSTP             X22, X21, [SP,#0x40+var_20]                            ; +0x4, 0x100333540\nSTP             X20, X19, [SP,#0x40+var_10]                            ; +0x8, 0x100333544\nSTP             X29, X30, [SP,#0x40+var_s0]                            ; +0xc, 0x100333548\nADD             X29, SP, #0x40                                         ; +0x10, 0x10033354c\nCBZ             X2, loc_1003335AC                                      ; +0x14, 0x100333550\nMOV             X19, X2                                                ; +0x18, 0x100333554\nMOV             X20, X1                                                ; +0x1c, 0x100333558\nMOV             X21, X0                                                ; +0x20, 0x10033355c\nLDR             W2, [X2,#0x38]                                         ; +0x24, 0x100333560\nBL              GameStatsManager__hasRewardBeenCollected               ; +0x28, 0x100333564\nTBNZ            W0, #0, loc_1003335AC                                  ; +0x2c, 0x100333568\nMOV             X0, X21                                                ; +0x30, 0x10033356c\nMOV             X1, X19                                                ; +0x34, 0x100333570\nBL              GameStatsManager__registerRewardsFromItem              ; +0x38, 0x100333574\nLDR             X21, [X21,#0x1E0]                                      ; +0x3c, 0x100333578\nLDR             W2, [X19,#0x38]                                        ; +0x40, 0x10033357c\nADD             X8, SP, #0x40+__p                                      ; +0x44, 0x100333580\nMOV             X1, X20                                                ; +0x48, 0x100333584\nBL              GameStatsManager__getRewardKey                         ; +0x4c, 0x100333588\nADD             X2, SP, #0x40+__p                                      ; +0x50, 0x10033358c\nMOV             X0, X21                                                ; +0x54, 0x100333590\nMOV             X1, X19                                                ; +0x58, 0x100333594\nBL              cocos2d__CCDictionary__setObject_1                     ; +0x5c, 0x100333598\nLDRSB           W8, [SP,#0x40+var_21]                                  ; +0x60, 0x10033359c\nTBZ             W8, #0x1F, loc_1003335AC                               ; +0x64, 0x1003335a0\nLDR             X0, [SP,#0x40+__p]; __p                                ; +0x68, 0x1003335a4\nBL              __ZdlPv; operator delete(void *)                       ; +0x6c, 0x1003335a8\nLDP             X29, X30, [SP,#0x40+var_s0]                            ; +0x70, 0x1003335ac\nLDP             X20, X19, [SP,#0x40+var_10]                            ; +0x74, 0x1003335b0\nLDP             X22, X21, [SP,#0x40+var_20]                            ; +0x78, 0x1003335b4\nADD             SP, SP, #0x50 ; 'P'                                    ; +0x7c, 0x1003335b8\nRET                                                                    ; +0x80, 0x1003335bc", "xrefs": ["RewardsPage::rewardsStatusFinished @ 0x1001c4b30"], "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"}