{"type": "func", "start": 10940080, "end": 10940464, "name": "DailyLevelPage::claimLevelReward", "pseudocode": "// \n// DailyLevelPage::claimLevelReward from 0xa6eeb0 to 0xa6f030 (384 bytes)\n// \n// 2 xrefs:\n// > DailyLevelNode::onClaimReward @ 0xa6f0d0\n// > <???> @ 0x67450\n// \n// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 13:00:22 +0000\n// \n\n__int64 __fastcall DailyLevelPage::claimLevelReward(\n        int *a1,\n        DailyLevelNode *a2,\n        GJGameLevel *a3,\n        const cocos2d::CCPoint *a4)\n{\n  GameStatsManager *v8; // x0\n  GJRewardItem *v9; // x0\n  RewardsPage *v10; // x2\n  GJRewardItem *v11; // x22\n  RewardUnlockLayer *v12; // x23\n  GameLevelManager *v13; // x0\n  unsigned int *v14; // x0\n  GameStatsManager *v16; // x0\n  __int64 v17; // x0\n  int BonusDiamonds; // [xsp+58h] [xbp+48h]\n  _BYTE v19[8]; // [xsp+60h] [xbp+50h] BYREF\n\n  v8 = (GameStatsManager *)GameStatsManager::sharedState(_stack_chk_guard);\n  v9 = GameStatsManager::completedDailyLevel(v8, a3);\n  v11 = v9;\n  if ( v9 )\n  {\n    v12 = (RewardUnlockLayer *)RewardUnlockLayer::create((RewardUnlockLayer *)*((unsigned int *)v9 + 16), 0, v10);\n    (*(void (__fastcall **)(int *, RewardUnlockLayer *, __int64))(*(_QWORD *)a1 + 464LL))(a1, v12, 100);\n    RewardUnlockLayer::showCollectReward(v12, v11);\n  }\n  else\n  {\n    v16 = (GameStatsManager *)GameStatsManager::sharedState(nullptr);\n    BonusDiamonds = GameStatsManager::getBonusDiamonds(v16, *((_DWORD *)a3 + 237) - *((_DWORD *)a3 + 238));\n    cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v19, a4);\n    v17 = CurrencyRewardLayer::create(0, 0, 0, BonusDiamonds, 0, 0, 0, 0, 0.0, 1.0, (const cocos2d::CCPoint *)v19, 0);\n    (*(void (__fastcall **)(int *, __int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v17, 14);\n  }\n  v13 = (GameLevelManager *)DailyLevelPage::exitDailyNode((DailyLevelPage *)a1, a2, 0.0);\n  v14 = (unsigned int *)GameLevelManager::sharedState(v13);\n  if ( (int)GameLevelManager::getDailyID(v14, a1[183]) <= *((_DWORD *)a3 + 230) - *((_DWORD *)a3 + 231) )\n    DailyLevelPage::createDailyNode((DailyLevelPage *)a1, nullptr, 0, 0.5, 0);\n  else\n    DailyLevelPage::downloadAndCreateNode((DailyLevelPage *)a1);\n  return _stack_chk_guard;\n}", "assembly": "; \n; DailyLevelPage::claimLevelReward from 0xa6eeb0 to 0xa6f030 (384 bytes)\n; \n; 2 xrefs:\n; > DailyLevelNode::onClaimReward @ 0xa6f0d0\n; > <???> @ 0x67450\n; \n; This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 13:00:22 +0000\n; \nSUB             SP, SP, #0x70                                          ; +0x0, 0xa6eeb0\nSTP             X29, X30, [SP,#0x70+var_60]                            ; +0x4, 0xa6eeb4\nADD             X29, SP, #0x10                                         ; +0x8, 0xa6eeb8\nSTP             X19, X20, [SP,#0x70+var_50]                            ; +0xc, 0xa6eebc\nADRP            X20, #__stack_chk_guard_ptr@PAGE                       ; +0x10, 0xa6eec0\nMOV             X19, X0                                                ; +0x14, 0xa6eec4\nSTP             X21, X22, [SP,#0x70+var_40]                            ; +0x18, 0xa6eec8\nSTP             X23, X24, [SP,#0x70+var_30]                            ; +0x1c, 0xa6eecc\nLDR             X0, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x20, 0xa6eed0\nMOV             X21, X2                                                ; +0x24, 0xa6eed4\nMOV             X23, X3                                                ; +0x28, 0xa6eed8\nMOV             X24, X1                                                ; +0x2c, 0xa6eedc\nLDR             X0, [X0]; this                                         ; +0x30, 0xa6eee0\nSTR             X0, [X29,#0x60+var_8]                                  ; +0x34, 0xa6eee4\nBL              _ZN16GameStatsManager11sharedStateEv; GameStatsManager::sharedState(void) ; +0x38, 0xa6eee8\nMOV             X1, X21; GJGameLevel *                                 ; +0x3c, 0xa6eeec\nBL              _ZN16GameStatsManager19completedDailyLevelEP11GJGameLevel; GameStatsManager::completedDailyLevel(GJGameLevel *) ; +0x40, 0xa6eef0\nMOV             X22, X0                                                ; +0x44, 0xa6eef4\nCBZ             X0, loc_A6EFB0                                         ; +0x48, 0xa6eef8\nLDR             W0, [X0,#0x40]; this                                   ; +0x4c, 0xa6eefc\nMOV             X1, #0; int                                            ; +0x50, 0xa6ef00\nBL              _ZN17RewardUnlockLayer6createEiP11RewardsPage; RewardUnlockLayer::create(int,RewardsPage *) ; +0x54, 0xa6ef04\nMOV             X23, X0                                                ; +0x58, 0xa6ef08\nLDR             X3, [X19]                                              ; +0x5c, 0xa6ef0c\nMOV             X0, X19                                                ; +0x60, 0xa6ef10\nMOV             X1, X23                                                ; +0x64, 0xa6ef14\nMOV             W2, #0x64 ; 'd'                                        ; +0x68, 0xa6ef18\nLDR             X3, [X3,#0x1D0]                                        ; +0x6c, 0xa6ef1c\nBLR             X3                                                     ; +0x70, 0xa6ef20\nMOV             X0, X23; this                                          ; +0x74, 0xa6ef24\nMOV             X1, X22; GJRewardItem *                                ; +0x78, 0xa6ef28\nBL              _ZN17RewardUnlockLayer17showCollectRewardEP12GJRewardItem; RewardUnlockLayer::showCollectReward(GJRewardItem *) ; +0x7c, 0xa6ef2c\nFMOV            S0, WZR; float                                         ; +0x80, 0xa6ef30\nMOV             X1, X24; DailyLevelNode *                              ; +0x84, 0xa6ef34\nMOV             X0, X19; this                                          ; +0x88, 0xa6ef38\nBL              _ZN14DailyLevelPage13exitDailyNodeEP14DailyLevelNodef; DailyLevelPage::exitDailyNode(DailyLevelNode *,float) ; +0x8c, 0xa6ef3c\nBL              _ZN16GameLevelManager11sharedStateEv; GameLevelManager::sharedState(void) ; +0x90, 0xa6ef40\nLDR             W1, [X19,#0x2DC]                                       ; +0x94, 0xa6ef44\nBL              _ZN16GameLevelManager10getDailyIDE16GJTimedLevelType; GameLevelManager::getDailyID(GJTimedLevelType) ; +0x98, 0xa6ef48\nLDR             W1, [X21,#0x398]                                       ; +0x9c, 0xa6ef4c\nLDR             W2, [X21,#0x39C]                                       ; +0xa0, 0xa6ef50\nSUB             W1, W1, W2                                             ; +0xa4, 0xa6ef54\nCMP             W0, W1                                                 ; +0xa8, 0xa6ef58\nMOV             X0, X19; this                                          ; +0xac, 0xa6ef5c\nB.GT            loc_A6EFA8                                             ; +0xb0, 0xa6ef60\nMOV             X1, #0; GJGameLevel *                                  ; +0xb4, 0xa6ef64\nMOV             W2, #0; bool                                           ; +0xb8, 0xa6ef68\nMOV             W3, #0; bool                                           ; +0xbc, 0xa6ef6c\nFMOV            S0, #0.5; float                                        ; +0xc0, 0xa6ef70\nBL              _ZN14DailyLevelPage15createDailyNodeEP11GJGameLevelbfb; DailyLevelPage::createDailyNode(GJGameLevel *,bool,float,bool) ; +0xc4, 0xa6ef74\nLDR             X20, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0xc8, 0xa6ef78\nLDR             X1, [X29,#0x60+var_8]                                  ; +0xcc, 0xa6ef7c\nLDR             X0, [X20]                                              ; +0xd0, 0xa6ef80\nCMP             X1, X0                                                 ; +0xd4, 0xa6ef84\nB.NE            loc_A6F02C                                             ; +0xd8, 0xa6ef88\nSUB             SP, X29, #0x10                                         ; +0xdc, 0xa6ef8c\nLDP             X19, X20, [SP,#0x70+var_50]                            ; +0xe0, 0xa6ef90\nLDP             X21, X22, [SP,#0x70+var_40]                            ; +0xe4, 0xa6ef94\nLDP             X23, X24, [SP,#0x70+var_30]                            ; +0xe8, 0xa6ef98\nLDP             X29, X30, [SP,#0x70+var_60]                            ; +0xec, 0xa6ef9c\nADD             SP, SP, #0x70 ; 'p'                                    ; +0xf0, 0xa6efa0\nRET                                                                    ; +0xf4, 0xa6efa4\nBL              _ZN14DailyLevelPage21downloadAndCreateNodeEv; DailyLevelPage::downloadAndCreateNode(void) ; +0xf8, 0xa6efa8\nB               loc_A6EF78                                             ; +0xfc, 0xa6efac\nBL              _ZN16GameStatsManager11sharedStateEv; GameStatsManager::sharedState(void) ; +0x100, 0xa6efb0\nADD             X22, X29, #0x60+var_10                                 ; +0x104, 0xa6efb4\nLDR             W2, [X21,#0x3B4]                                       ; +0x108, 0xa6efb8\nLDR             W1, [X21,#0x3B8]                                       ; +0x10c, 0xa6efbc\nSUB             W1, W2, W1; int                                        ; +0x110, 0xa6efc0\nBL              _ZN16GameStatsManager16getBonusDiamondsEi; GameStatsManager::getBonusDiamonds(int) ; +0x114, 0xa6efc4\nMOV             W3, W0                                                 ; +0x118, 0xa6efc8\nMOV             X1, X23; cocos2d::CCPoint *                            ; +0x11c, 0xa6efcc\nMOV             X0, X22; this                                          ; +0x120, 0xa6efd0\nSTR             X3, [X29,#0x60+var_18]                                 ; +0x124, 0xa6efd4\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x128, 0xa6efd8\nSTR             X22, [SP,#0x70+var_70]                                 ; +0x12c, 0xa6efdc\nFMOV            S0, WZR                                                ; +0x130, 0xa6efe0\nLDR             X3, [X29,#0x60+var_18]                                 ; +0x134, 0xa6efe4\nMOV             W1, #0                                                 ; +0x138, 0xa6efe8\nMOV             W2, #0                                                 ; +0x13c, 0xa6efec\nSTR             WZR, [SP,#0x70+var_68]                                 ; +0x140, 0xa6eff0\nMOV             W4, #0                                                 ; +0x144, 0xa6eff4\nMOV             W5, #0                                                 ; +0x148, 0xa6eff8\nMOV             W6, #0                                                 ; +0x14c, 0xa6effc\nMOV             W7, #0                                                 ; +0x150, 0xa6f000\nMOV             W0, #0                                                 ; +0x154, 0xa6f004\nFMOV            S1, #1.0                                               ; +0x158, 0xa6f008\nBL              _ZN19CurrencyRewardLayer6createEiiii18CurrencySpriteTypeiS0_iN7cocos2d7CCPointE18CurrencyRewardTypeff; CurrencyRewardLayer::create(int,int,int,int,CurrencySpriteType,int,CurrencySpriteType,int,cocos2d::CCPoint,CurrencyRewardType,float,float) ; +0x15c, 0xa6f00c\nMOV             X1, X0                                                 ; +0x160, 0xa6f010\nLDR             X3, [X19]                                              ; +0x164, 0xa6f014\nMOV             X0, X19                                                ; +0x168, 0xa6f018\nMOV             W2, #0xE                                               ; +0x16c, 0xa6f01c\nLDR             X3, [X3,#0x1D0]                                        ; +0x170, 0xa6f020\nBLR             X3                                                     ; +0x174, 0xa6f024\nB               loc_A6EF30                                             ; +0x178, 0xa6f028\nBL              .__stack_chk_fail                                      ; +0x17c, 0xa6f02c", "xrefs": ["DailyLevelNode::onClaimReward @ 0xa6f0d0", "<???> @ 0x67450"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}