{"type": "func", "start": 4295175304, "end": 4295175608, "name": "ChallengesPage::claimItem", "pseudocode": "// \n// ChallengesPage::claimItem from 0x100032c88 to 0x100032db8 (304 bytes)\n// \n// 1 xrefs:\n// > ChallengeNode::onClaimReward @ 0x100033ae4\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 ChallengesPage::claimItem(\n        ChallengesPage *a1,\n        ChallengeNode *a2,\n        GJChallengeItem *a3,\n        cocos2d::CCPoint a4)\n{\n  __int64 *v4; // x3\n  __int64 *v5; // x22\n  int m_position; // w20\n  GameStatsManager *v9; // x0\n  CurrencyRewardLayer *m_currencyRewardLayer; // x23\n  int v11; // w21\n  float v12; // s2\n  float v13; // s3\n  CurrencyRewardLayer *v14; // x0\n  GameStatsManager *v15; // x0\n  float v16; // s0\n  __int64 v17; // [xsp+18h] [xbp-38h] BYREF\n  cocos2d::CCPoint v18; // 0:s0.4,4:s1.4\n\n  v5 = v4;\n  m_position = a3->m_position;\n  v9 = GameStatsManager::sharedState();\n  GameStatsManager::completedChallenge(v9, a3);\n  m_currencyRewardLayer = a1->m_currencyRewardLayer;\n  v11 = a3->m_reward.random - a3->m_reward.seed;\n  sub_1000229B8(&v17, v5);\n  v18.x = 0.0;\n  if ( m_currencyRewardLayer )\n  {\n    CurrencyRewardLayer::createObjects(m_currencyRewardLayer, Star|Orb, v11, v18, v12);\n  }\n  else\n  {\n    v18.y = 1.0;\n    v14 = CurrencyRewardLayer::create(0, 0, 0, v11, Icon, 0, Icon, 0, v18, (CurrencyRewardType)&v17, v12, v13);\n    a1->m_currencyRewardLayer = v14;\n    v14->m_delegate = &a1->CurrencyRewardDelegate;\n    ((void (__fastcall *)(ChallengesPage *, CurrencyRewardLayer *, __int64))a1->addChild_0)(a1, v14, 14);\n  }\n  ChallengesPage::exitNodeAtSlot(a1, m_position, 0.0);\n  v15 = GameStatsManager::sharedState();\n  GameStatsManager::processChallengeQueue(v15, m_position);\n  ChallengesPage::createChallengeNode(a1, m_position, 0, 0.5, 1);\n  ChallengesPage::updateTimers(a1, v16);\n  ChallengesPage::updateDots(a1);\n}", "assembly": "; \n; ChallengesPage::claimItem from 0x100032c88 to 0x100032db8 (304 bytes)\n; \n; 1 xrefs:\n; > ChallengeNode::onClaimReward @ 0x100033ae4\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, #0x60                                          ; +0x0, 0x100032c88\nSTP             X24, X23, [SP,#0x50+var_30]                            ; +0x4, 0x100032c8c\nSTP             X22, X21, [SP,#0x50+var_20]                            ; +0x8, 0x100032c90\nSTP             X20, X19, [SP,#0x50+var_10]                            ; +0xc, 0x100032c94\nSTP             X29, X30, [SP,#0x50+var_s0]                            ; +0x10, 0x100032c98\nADD             X29, SP, #0x50                                         ; +0x14, 0x100032c9c\nMOV             X22, X3                                                ; +0x18, 0x100032ca0\nMOV             X21, X2                                                ; +0x1c, 0x100032ca4\nMOV             X19, X0                                                ; +0x20, 0x100032ca8\nLDR             W20, [X2,#0x68]                                        ; +0x24, 0x100032cac\nBL              GameStatsManager__sharedState                          ; +0x28, 0x100032cb0\nMOV             X1, X21                                                ; +0x2c, 0x100032cb4\nBL              GameStatsManager__completedChallenge                   ; +0x30, 0x100032cb8\nLDR             X23, [X19,#0x2B0]                                      ; +0x34, 0x100032cbc\nLDP             W8, W9, [X21,#0x48]                                    ; +0x38, 0x100032cc0\nSUB             W21, W8, W9                                            ; +0x3c, 0x100032cc4\nCBZ             X23, loc_100032CF4                                     ; +0x40, 0x100032cc8\nADD             X0, SP, #0x50+var_38                                   ; +0x44, 0x100032ccc\nMOV             X1, X22                                                ; +0x48, 0x100032cd0\nBL              sub_1000229B8                                          ; +0x4c, 0x100032cd4\nADD             X3, SP, #0x50+var_38                                   ; +0x50, 0x100032cd8\nFMOV            S0, WZR                                                ; +0x54, 0x100032cdc\nMOV             X0, X23                                                ; +0x58, 0x100032ce0\nMOV             W1, #3                                                 ; +0x5c, 0x100032ce4\nMOV             X2, X21                                                ; +0x60, 0x100032ce8\nBL              CurrencyRewardLayer__createObjects                     ; +0x64, 0x100032cec\nB               loc_100032D5C                                          ; +0x68, 0x100032cf0\nADD             X23, SP, #0x50+var_38                                  ; +0x6c, 0x100032cf4\nADD             X0, SP, #0x50+var_38                                   ; +0x70, 0x100032cf8\nMOV             X1, X22                                                ; +0x74, 0x100032cfc\nBL              sub_1000229B8                                          ; +0x78, 0x100032d00\nSTR             WZR, [SP,#0x50+var_48]                                 ; +0x7c, 0x100032d04\nSTR             X23, [SP,#0x50+var_50]                                 ; +0x80, 0x100032d08\nFMOV            S0, WZR                                                ; +0x84, 0x100032d0c\nFMOV            S1, #1.0                                               ; +0x88, 0x100032d10\nMOV             W0, #0                                                 ; +0x8c, 0x100032d14\nMOV             W1, #0                                                 ; +0x90, 0x100032d18\nMOV             W2, #0                                                 ; +0x94, 0x100032d1c\nMOV             X3, X21                                                ; +0x98, 0x100032d20\nMOV             W4, #0                                                 ; +0x9c, 0x100032d24\nMOV             W5, #0                                                 ; +0xa0, 0x100032d28\nMOV             W6, #0                                                 ; +0xa4, 0x100032d2c\nMOV             W7, #0                                                 ; +0xa8, 0x100032d30\nBL              CurrencyRewardLayer__create                            ; +0xac, 0x100032d34\nMOV             X1, X0                                                 ; +0xb0, 0x100032d38\nSTR             X0, [X19,#0x2B0]                                       ; +0xb4, 0x100032d3c\nADD             X8, X19, #0x288                                        ; +0xb8, 0x100032d40\nSTR             X8, [X0,#0x198]                                        ; +0xbc, 0x100032d44\nLDR             X8, [X19]                                              ; +0xc0, 0x100032d48\nLDR             X8, [X8,#0x1C0]                                        ; +0xc4, 0x100032d4c\nMOV             X0, X19                                                ; +0xc8, 0x100032d50\nMOV             W2, #0xE                                               ; +0xcc, 0x100032d54\nBLR             X8                                                     ; +0xd0, 0x100032d58\nFMOV            S0, WZR                                                ; +0xd4, 0x100032d5c\nMOV             X0, X19                                                ; +0xd8, 0x100032d60\nMOV             X1, X20                                                ; +0xdc, 0x100032d64\nBL              ChallengesPage__exitNodeAtSlot                         ; +0xe0, 0x100032d68\nBL              GameStatsManager__sharedState                          ; +0xe4, 0x100032d6c\nMOV             X1, X20                                                ; +0xe8, 0x100032d70\nBL              GameStatsManager__processChallengeQueue                ; +0xec, 0x100032d74\nFMOV            S0, #0.5                                               ; +0xf0, 0x100032d78\nMOV             X0, X19                                                ; +0xf4, 0x100032d7c\nMOV             X1, X20                                                ; +0xf8, 0x100032d80\nMOV             W2, #0                                                 ; +0xfc, 0x100032d84\nMOV             W3, #1                                                 ; +0x100, 0x100032d88\nBL              ChallengesPage__createChallengeNode                    ; +0x104, 0x100032d8c\nMOV             X0, X19                                                ; +0x108, 0x100032d90\nBL              ChallengesPage__updateTimers                           ; +0x10c, 0x100032d94\nMOV             X0, X19                                                ; +0x110, 0x100032d98\nBL              ChallengesPage__updateDots                             ; +0x114, 0x100032d9c\nLDP             X29, X30, [SP,#0x50+var_s0]                            ; +0x118, 0x100032da0\nLDP             X20, X19, [SP,#0x50+var_10]                            ; +0x11c, 0x100032da4\nLDP             X22, X21, [SP,#0x50+var_20]                            ; +0x120, 0x100032da8\nLDP             X24, X23, [SP,#0x50+var_30]                            ; +0x124, 0x100032dac\nADD             SP, SP, #0x60 ; '`'                                    ; +0x128, 0x100032db0\nRET                                                                    ; +0x12c, 0x100032db4", "xrefs": ["ChallengeNode::onClaimReward @ 0x100033ae4"], "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"}