{"type": "func", "start": 9473160, "end": 9473548, "name": "ChallengesPage::claimItem", "pseudocode": "// \n// ChallengesPage::claimItem from 0x908c88 to 0x908e0c (388 bytes)\n// \n// 2 xrefs:\n// > ChallengeNode::onClaimReward @ 0x908e70\n// > <???> @ 0xc2370\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 ChallengesPage::claimItem(ChallengesPage *a1, ChallengeNode *a2, GJChallengeItem *a3, cocos2d::CCPoint a4)\n{\n  cocos2d::CCPoint *v4; // x3\n  int m_position; // w22\n  GameStatsManager *v8; // x0\n  CurrencyRewardLayer *m_currencyRewardLayer; // x23\n  const cocos2d::CCPoint *v10; // x1\n  float v11; // s2\n  float v12; // s3\n  GameStatsManager *v13; // x0\n  CurrencyRewardLayer *v14; // x0\n  cocos2d::CCPoint *v15; // [xsp+58h] [xbp+48h]\n  int v16; // [xsp+58h] [xbp+48h]\n  cocos2d::CCPoint v17; // [xsp+60h] [xbp+50h] BYREF\n  cocos2d::CCPoint v18; // 0:s0.4,4:s1.4\n\n  v15 = v4;\n  m_position = a3->m_position;\n  v8 = GameStatsManager::sharedState();\n  GameStatsManager::completedChallenge(v8, a3);\n  m_currencyRewardLayer = a1->m_currencyRewardLayer;\n  v10 = v15;\n  v16 = a3->m_reward.random - a3->m_reward.seed;\n  cocos2d::CCPoint::CCPoint(&v17, v10);\n  v18.x = 0.0;\n  if ( m_currencyRewardLayer )\n  {\n    CurrencyRewardLayer::createObjects(m_currencyRewardLayer, Star|Orb, v16, v18, v11);\n  }\n  else\n  {\n    v18.y = 1.0;\n    v14 = CurrencyRewardLayer::create(0, 0, 0, v16, Icon, 0, Icon, 0, v18, (CurrencyRewardType)&v17, v11, v12);\n    a1->m_currencyRewardLayer = v14;\n    v14->m_delegate = &a1->CurrencyRewardDelegate;\n    a1->addChild_0(a1, a1->m_currencyRewardLayer, 14);\n  }\n  ChallengesPage::exitNodeAtSlot(a1, m_position, 0.0);\n  v13 = GameStatsManager::sharedState();\n  GameStatsManager::processChallengeQueue(v13, m_position);\n  ChallengesPage::createChallengeNode(a1, m_position, 0, 0.5, 1);\n  ChallengesPage::updateTimers(a1, 0.0);\n  ChallengesPage::updateDots(a1);\n}", "assembly": "; \n; ChallengesPage::claimItem from 0x908c88 to 0x908e0c (388 bytes)\n; \n; 2 xrefs:\n; > ChallengeNode::onClaimReward @ 0x908e70\n; > <???> @ 0xc2370\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, 0x908c88\nSTP             X29, X30, [SP,#0x70+var_60]                            ; +0x4, 0x908c8c\nADD             X29, SP, #0x10                                         ; +0x8, 0x908c90\nSTP             X19, X20, [SP,#0x70+var_50]                            ; +0xc, 0x908c94\nADRP            X20, #__stack_chk_guard_ptr@PAGE                       ; +0x10, 0x908c98\nMOV             X19, X0                                                ; +0x14, 0x908c9c\nSTP             X21, X22, [SP,#0x70+var_40]                            ; +0x18, 0x908ca0\nSTR             X3, [X29,#0x60+var_18]                                 ; +0x1c, 0x908ca4\nMOV             X21, X2                                                ; +0x20, 0x908ca8\nLDR             X0, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x24, 0x908cac\nSTR             X23, [SP,#0x70+var_30]                                 ; +0x28, 0x908cb0\nLDR             W22, [X2,#0x68]                                        ; +0x2c, 0x908cb4\nLDR             X0, [X0]; this                                         ; +0x30, 0x908cb8\nSTR             X0, [X29,#0x60+var_8]                                  ; +0x34, 0x908cbc\nBL              _ZN16GameStatsManager11sharedStateEv; GameStatsManager::sharedState(void) ; +0x38, 0x908cc0\nMOV             X1, X21; GJChallengeItem *                             ; +0x3c, 0x908cc4\nBL              _ZN16GameStatsManager18completedChallengeEP15GJChallengeItem; GameStatsManager::completedChallenge(GJChallengeItem *) ; +0x40, 0x908cc8\nLDR             X23, [X19,#0x2B0]                                      ; +0x44, 0x908ccc\nLDR             X3, [X29,#0x60+var_18]                                 ; +0x48, 0x908cd0\nCBZ             X23, loc_908D88                                        ; +0x4c, 0x908cd4\nLDR             W2, [X21,#0x48]                                        ; +0x50, 0x908cd8\nADD             X0, X29, #0x60+var_10; this                            ; +0x54, 0x908cdc\nLDR             W4, [X21,#0x4C]                                        ; +0x58, 0x908ce0\nMOV             X1, X3; cocos2d::CCPoint *                             ; +0x5c, 0x908ce4\nSTR             X0, [X29,#0x60+var_20]                                 ; +0x60, 0x908ce8\nSUB             W2, W2, W4                                             ; +0x64, 0x908cec\nSTR             X2, [X29,#0x60+var_18]                                 ; +0x68, 0x908cf0\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x6c, 0x908cf4\nFMOV            S0, WZR                                                ; +0x70, 0x908cf8\nLDR             X2, [X29,#0x60+var_18]; int                            ; +0x74, 0x908cfc\nLDR             X3, [X29,#0x60+var_20]; cocos2d::CCPoint *             ; +0x78, 0x908d00\nMOV             X0, X23; int                                           ; +0x7c, 0x908d04\nMOV             W1, #3; int                                            ; +0x80, 0x908d08\nBL              _ZN19CurrencyRewardLayer13createObjectsE18CurrencySpriteTypeiN7cocos2d7CCPointEf; CurrencyRewardLayer::createObjects(CurrencySpriteType,int,cocos2d::CCPoint,float) ; +0x84, 0x908d0c\nFMOV            S0, WZR; float                                         ; +0x88, 0x908d10\nMOV             W1, W22; int                                           ; +0x8c, 0x908d14\nMOV             X0, X19; this                                          ; +0x90, 0x908d18\nBL              _ZN14ChallengesPage14exitNodeAtSlotEif; ChallengesPage::exitNodeAtSlot(int,float) ; +0x94, 0x908d1c\nBL              _ZN16GameStatsManager11sharedStateEv; GameStatsManager::sharedState(void) ; +0x98, 0x908d20\nMOV             W1, W22; int                                           ; +0x9c, 0x908d24\nBL              _ZN16GameStatsManager21processChallengeQueueEi; GameStatsManager::processChallengeQueue(int) ; +0xa0, 0x908d28\nMOV             W1, W22; int                                           ; +0xa4, 0x908d2c\nMOV             W2, #0; bool                                           ; +0xa8, 0x908d30\nMOV             W3, #1; bool                                           ; +0xac, 0x908d34\nMOV             X0, X19; this                                          ; +0xb0, 0x908d38\nFMOV            S0, #0.5; float                                        ; +0xb4, 0x908d3c\nBL              _ZN14ChallengesPage19createChallengeNodeEibfb; ChallengesPage::createChallengeNode(int,bool,float,bool) ; +0xb8, 0x908d40\nFMOV            S0, WZR; float                                         ; +0xbc, 0x908d44\nMOV             X0, X19; this                                          ; +0xc0, 0x908d48\nBL              _ZN14ChallengesPage12updateTimersEf; ChallengesPage::updateTimers(float) ; +0xc4, 0x908d4c\nMOV             X0, X19; this                                          ; +0xc8, 0x908d50\nBL              _ZN14ChallengesPage10updateDotsEv; ChallengesPage::updateDots(void) ; +0xcc, 0x908d54\nLDR             X20, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0xd0, 0x908d58\nLDR             X1, [X29,#0x60+var_8]                                  ; +0xd4, 0x908d5c\nLDR             X0, [X20]                                              ; +0xd8, 0x908d60\nCMP             X1, X0                                                 ; +0xdc, 0x908d64\nB.NE            loc_908E08                                             ; +0xe0, 0x908d68\nSUB             SP, X29, #0x10                                         ; +0xe4, 0x908d6c\nLDP             X19, X20, [SP,#0x70+var_50]                            ; +0xe8, 0x908d70\nLDP             X21, X22, [SP,#0x70+var_40]                            ; +0xec, 0x908d74\nLDR             X23, [SP,#0x70+var_30]                                 ; +0xf0, 0x908d78\nLDP             X29, X30, [SP,#0x70+var_60]                            ; +0xf4, 0x908d7c\nADD             SP, SP, #0x70 ; 'p'                                    ; +0xf8, 0x908d80\nRET                                                                    ; +0xfc, 0x908d84\nLDR             W2, [X21,#0x48]                                        ; +0x100, 0x908d88\nADD             X23, X29, #0x60+var_10                                 ; +0x104, 0x908d8c\nLDR             W4, [X21,#0x4C]                                        ; +0x108, 0x908d90\nMOV             X0, X23; this                                          ; +0x10c, 0x908d94\nMOV             X1, X3; cocos2d::CCPoint *                             ; +0x110, 0x908d98\nSUB             W3, W2, W4                                             ; +0x114, 0x908d9c\nSTR             X3, [X29,#0x60+var_18]                                 ; +0x118, 0x908da0\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x11c, 0x908da4\nSTR             X23, [SP,#0x70+var_70]                                 ; +0x120, 0x908da8\nFMOV            S0, WZR                                                ; +0x124, 0x908dac\nLDR             X3, [X29,#0x60+var_18]                                 ; +0x128, 0x908db0\nMOV             W1, #0                                                 ; +0x12c, 0x908db4\nMOV             W2, #0                                                 ; +0x130, 0x908db8\nSTR             WZR, [SP,#0x70+var_68]                                 ; +0x134, 0x908dbc\nMOV             W4, #0                                                 ; +0x138, 0x908dc0\nMOV             W5, #0                                                 ; +0x13c, 0x908dc4\nMOV             W6, #0                                                 ; +0x140, 0x908dc8\nMOV             W7, #0                                                 ; +0x144, 0x908dcc\nMOV             W0, #0                                                 ; +0x148, 0x908dd0\nFMOV            S1, #1.0                                               ; +0x14c, 0x908dd4\nBL              _ZN19CurrencyRewardLayer6createEiiii18CurrencySpriteTypeiS0_iN7cocos2d7CCPointE18CurrencyRewardTypeff; CurrencyRewardLayer::create(int,int,int,int,CurrencySpriteType,int,CurrencySpriteType,int,cocos2d::CCPoint,CurrencyRewardType,float,float) ; +0x150, 0x908dd8\nMOV             X1, X0                                                 ; +0x154, 0x908ddc\nSTR             X0, [X19,#0x2B0]                                       ; +0x158, 0x908de0\nADD             X3, X19, #0x288                                        ; +0x15c, 0x908de4\nMOV             X0, X19                                                ; +0x160, 0x908de8\nMOV             W2, #0xE                                               ; +0x164, 0x908dec\nSTR             X3, [X1,#0x198]                                        ; +0x168, 0x908df0\nLDR             X3, [X19]                                              ; +0x16c, 0x908df4\nLDR             X1, [X19,#0x2B0]                                       ; +0x170, 0x908df8\nLDR             X3, [X3,#0x1C0]                                        ; +0x174, 0x908dfc\nBLR             X3                                                     ; +0x178, 0x908e00\nB               loc_908D10                                             ; +0x17c, 0x908e04\nBL              .__stack_chk_fail                                      ; +0x180, 0x908e08", "xrefs": ["ChallengeNode::onClaimReward @ 0x908e70", "<???> @ 0xc2370"], "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"}