{"type": "func", "start": 9524868, "end": 9525252, "name": "DailyLevelPage::claimLevelReward", "pseudocode": "// \n// DailyLevelPage::claimLevelReward from 0x915684 to 0x915804 (384 bytes)\n// \n// 2 xrefs:\n// > DailyLevelNode::onClaimReward @ 0x9158a0\n// > <???> @ 0x49260\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 DailyLevelPage::claimLevelReward(DailyLevelPage *a1, DailyLevelNode *a2, GJGameLevel *a3, cocos2d::CCPoint a4)\n{\n  const cocos2d::CCPoint *v4; // x3\n  const cocos2d::CCPoint *v7; // x23\n  GameStatsManager *v9; // x0\n  GJRewardItem *v10; // x0\n  GJRewardItem *v11; // x22\n  RewardUnlockLayer *v12; // x23\n  GameLevelManager *v13; // x0\n  GameStatsManager *v14; // x0\n  float v15; // s2\n  float v16; // s3\n  CurrencyRewardLayer *v17; // x0\n  int BonusDiamonds; // [xsp+58h] [xbp+48h]\n  cocos2d::CCPoint v19; // [xsp+60h] [xbp+50h] BYREF\n  cocos2d::CCPoint v20; // 0:s0.4,4:s1.4\n\n  v7 = v4;\n  v9 = GameStatsManager::sharedState();\n  v10 = GameStatsManager::completedDailyLevel(v9, a3);\n  v11 = v10;\n  if ( v10 )\n  {\n    v12 = RewardUnlockLayer::create(v10->m_rewardType, nullptr);\n    a1->addChild_0(a1, v12, 100);\n    RewardUnlockLayer::showCollectReward(v12, v11);\n  }\n  else\n  {\n    v14 = GameStatsManager::sharedState();\n    BonusDiamonds = GameStatsManager::getBonusDiamonds(v14, a3->m_stars.random - a3->m_stars.seed);\n    cocos2d::CCPoint::CCPoint(&v19, v7);\n    v20.x = 0.0;\n    v20.y = 1.0;\n    v17 = CurrencyRewardLayer::create(0, 0, 0, BonusDiamonds, Icon, 0, Icon, 0, v20, (CurrencyRewardType)&v19, v15, v16);\n    a1->addChild_0(a1, v17, 14);\n  }\n  DailyLevelPage::exitDailyNode(a1, a2, 0.0);\n  v13 = GameLevelManager::sharedState();\n  if ( GameLevelManager::getDailyID(v13, a1->m_type) <= a3->m_dailyID.random - a3->m_dailyID.seed )\n    DailyLevelPage::createDailyNode(a1, nullptr, 0, 0.5, 0);\n  else\n    DailyLevelPage::downloadAndCreateNode(a1);\n}", "assembly": "; \n; DailyLevelPage::claimLevelReward from 0x915684 to 0x915804 (384 bytes)\n; \n; 2 xrefs:\n; > DailyLevelNode::onClaimReward @ 0x9158a0\n; > <???> @ 0x49260\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, 0x915684\nSTP             X29, X30, [SP,#0x70+var_60]                            ; +0x4, 0x915688\nADD             X29, SP, #0x10                                         ; +0x8, 0x91568c\nSTP             X19, X20, [SP,#0x70+var_50]                            ; +0xc, 0x915690\nADRP            X20, #__stack_chk_guard_ptr@PAGE                       ; +0x10, 0x915694\nMOV             X19, X0                                                ; +0x14, 0x915698\nSTP             X21, X22, [SP,#0x70+var_40]                            ; +0x18, 0x91569c\nSTP             X23, X24, [SP,#0x70+var_30]                            ; +0x1c, 0x9156a0\nLDR             X0, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x20, 0x9156a4\nMOV             X21, X2                                                ; +0x24, 0x9156a8\nMOV             X23, X3                                                ; +0x28, 0x9156ac\nMOV             X24, X1                                                ; +0x2c, 0x9156b0\nLDR             X0, [X0]; this                                         ; +0x30, 0x9156b4\nSTR             X0, [X29,#0x60+var_8]                                  ; +0x34, 0x9156b8\nBL              _ZN16GameStatsManager11sharedStateEv; GameStatsManager::sharedState(void) ; +0x38, 0x9156bc\nMOV             X1, X21; GJGameLevel *                                 ; +0x3c, 0x9156c0\nBL              _ZN16GameStatsManager19completedDailyLevelEP11GJGameLevel; GameStatsManager::completedDailyLevel(GJGameLevel *) ; +0x40, 0x9156c4\nMOV             X22, X0                                                ; +0x44, 0x9156c8\nCBZ             X0, loc_915784                                         ; +0x48, 0x9156cc\nLDR             W0, [X0,#0x40]; this                                   ; +0x4c, 0x9156d0\nMOV             X1, #0; int                                            ; +0x50, 0x9156d4\nBL              _ZN17RewardUnlockLayer6createEiP11RewardsPage; RewardUnlockLayer::create(int,RewardsPage *) ; +0x54, 0x9156d8\nMOV             X23, X0                                                ; +0x58, 0x9156dc\nLDR             X3, [X19]                                              ; +0x5c, 0x9156e0\nMOV             X0, X19                                                ; +0x60, 0x9156e4\nMOV             X1, X23                                                ; +0x64, 0x9156e8\nMOV             W2, #0x64 ; 'd'                                        ; +0x68, 0x9156ec\nLDR             X3, [X3,#0x1C0]                                        ; +0x6c, 0x9156f0\nBLR             X3                                                     ; +0x70, 0x9156f4\nMOV             X0, X23; this                                          ; +0x74, 0x9156f8\nMOV             X1, X22; GJRewardItem *                                ; +0x78, 0x9156fc\nBL              _ZN17RewardUnlockLayer17showCollectRewardEP12GJRewardItem; RewardUnlockLayer::showCollectReward(GJRewardItem *) ; +0x7c, 0x915700\nFMOV            S0, WZR; float                                         ; +0x80, 0x915704\nMOV             X1, X24; DailyLevelNode *                              ; +0x84, 0x915708\nMOV             X0, X19; this                                          ; +0x88, 0x91570c\nBL              _ZN14DailyLevelPage13exitDailyNodeEP14DailyLevelNodef; DailyLevelPage::exitDailyNode(DailyLevelNode *,float) ; +0x8c, 0x915710\nBL              _ZN16GameLevelManager11sharedStateEv; GameLevelManager::sharedState(void) ; +0x90, 0x915714\nLDR             W1, [X19,#0x2BC]                                       ; +0x94, 0x915718\nBL              _ZN16GameLevelManager10getDailyIDE16GJTimedLevelType; GameLevelManager::getDailyID(GJTimedLevelType) ; +0x98, 0x91571c\nLDR             W1, [X21,#0x294]                                       ; +0x9c, 0x915720\nLDR             W2, [X21,#0x298]                                       ; +0xa0, 0x915724\nSUB             W1, W1, W2                                             ; +0xa4, 0x915728\nCMP             W0, W1                                                 ; +0xa8, 0x91572c\nMOV             X0, X19; this                                          ; +0xac, 0x915730\nB.GT            loc_91577C                                             ; +0xb0, 0x915734\nMOV             X1, #0; GJGameLevel *                                  ; +0xb4, 0x915738\nMOV             W2, #0; bool                                           ; +0xb8, 0x91573c\nMOV             W3, #0; bool                                           ; +0xbc, 0x915740\nFMOV            S0, #0.5; float                                        ; +0xc0, 0x915744\nBL              _ZN14DailyLevelPage15createDailyNodeEP11GJGameLevelbfb; DailyLevelPage::createDailyNode(GJGameLevel *,bool,float,bool) ; +0xc4, 0x915748\nLDR             X20, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0xc8, 0x91574c\nLDR             X1, [X29,#0x60+var_8]                                  ; +0xcc, 0x915750\nLDR             X0, [X20]                                              ; +0xd0, 0x915754\nCMP             X1, X0                                                 ; +0xd4, 0x915758\nB.NE            loc_915800                                             ; +0xd8, 0x91575c\nSUB             SP, X29, #0x10                                         ; +0xdc, 0x915760\nLDP             X19, X20, [SP,#0x70+var_50]                            ; +0xe0, 0x915764\nLDP             X21, X22, [SP,#0x70+var_40]                            ; +0xe4, 0x915768\nLDP             X23, X24, [SP,#0x70+var_30]                            ; +0xe8, 0x91576c\nLDP             X29, X30, [SP,#0x70+var_60]                            ; +0xec, 0x915770\nADD             SP, SP, #0x70 ; 'p'                                    ; +0xf0, 0x915774\nRET                                                                    ; +0xf4, 0x915778\nBL              _ZN14DailyLevelPage21downloadAndCreateNodeEv; DailyLevelPage::downloadAndCreateNode(void) ; +0xf8, 0x91577c\nB               loc_91574C                                             ; +0xfc, 0x915780\nBL              _ZN16GameStatsManager11sharedStateEv; GameStatsManager::sharedState(void) ; +0x100, 0x915784\nADD             X22, X29, #0x60+var_10                                 ; +0x104, 0x915788\nLDR             W2, [X21,#0x2B0]                                       ; +0x108, 0x91578c\nLDR             W1, [X21,#0x2B4]                                       ; +0x10c, 0x915790\nSUB             W1, W2, W1; int                                        ; +0x110, 0x915794\nBL              _ZN16GameStatsManager16getBonusDiamondsEi; GameStatsManager::getBonusDiamonds(int) ; +0x114, 0x915798\nMOV             W3, W0                                                 ; +0x118, 0x91579c\nMOV             X1, X23; cocos2d::CCPoint *                            ; +0x11c, 0x9157a0\nMOV             X0, X22; this                                          ; +0x120, 0x9157a4\nSTR             X3, [X29,#0x60+var_18]                                 ; +0x124, 0x9157a8\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x128, 0x9157ac\nSTR             X22, [SP,#0x70+var_70]                                 ; +0x12c, 0x9157b0\nFMOV            S0, WZR                                                ; +0x130, 0x9157b4\nLDR             X3, [X29,#0x60+var_18]                                 ; +0x134, 0x9157b8\nMOV             W1, #0                                                 ; +0x138, 0x9157bc\nMOV             W2, #0                                                 ; +0x13c, 0x9157c0\nSTR             WZR, [SP,#0x70+var_68]                                 ; +0x140, 0x9157c4\nMOV             W4, #0                                                 ; +0x144, 0x9157c8\nMOV             W5, #0                                                 ; +0x148, 0x9157cc\nMOV             W6, #0                                                 ; +0x14c, 0x9157d0\nMOV             W7, #0                                                 ; +0x150, 0x9157d4\nMOV             W0, #0                                                 ; +0x154, 0x9157d8\nFMOV            S1, #1.0                                               ; +0x158, 0x9157dc\nBL              _ZN19CurrencyRewardLayer6createEiiii18CurrencySpriteTypeiS0_iN7cocos2d7CCPointE18CurrencyRewardTypeff; CurrencyRewardLayer::create(int,int,int,int,CurrencySpriteType,int,CurrencySpriteType,int,cocos2d::CCPoint,CurrencyRewardType,float,float) ; +0x15c, 0x9157e0\nMOV             X1, X0                                                 ; +0x160, 0x9157e4\nLDR             X3, [X19]                                              ; +0x164, 0x9157e8\nMOV             X0, X19                                                ; +0x168, 0x9157ec\nMOV             W2, #0xE                                               ; +0x16c, 0x9157f0\nLDR             X3, [X3,#0x1C0]                                        ; +0x170, 0x9157f4\nBLR             X3                                                     ; +0x174, 0x9157f8\nB               loc_915704                                             ; +0x178, 0x9157fc\nBL              .__stack_chk_fail                                      ; +0x17c, 0x915800", "xrefs": ["DailyLevelNode::onClaimReward @ 0x9158a0", "<???> @ 0x49260"], "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"}