{"type": "func", "start": 6323200, "end": 6323432, "name": "DailyLevelPage::claimLevelReward", "pseudocode": "// \n// DailyLevelPage::claimLevelReward from 0x607c00 to 0x607ce8 (232 bytes)\n// \n// 1 xrefs:\n// > DailyLevelNode::onClaimReward @ 0x608cc2\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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 11:54:45 +0000\n// \n\nint *__fastcall DailyLevelPage::claimLevelReward(\n        int *a1,\n        DailyLevelNode *a2,\n        GJGameLevel *a3,\n        const cocos2d::CCPoint *a4)\n{\n  GameStatsManager *v8; // r0\n  cocos2d::CCObject *v9; // r0\n  RewardsPage *v10; // r2\n  GJRewardItem *v11; // r4\n  RewardUnlockLayer *v12; // r8\n  int v13; // r3\n  GameStatsManager *v14; // r0\n  int BonusDiamonds; // r11\n  int v16; // r0\n  GameLevelManager *v17; // r0\n  _DWORD *v18; // r0\n  _BYTE v20[8]; // [sp+24h] [bp-10h] BYREF\n\n  v8 = (GameStatsManager *)GameStatsManager::sharedState((GameStatsManager *)a1);\n  v9 = GameStatsManager::completedDailyLevel(v8, a3);\n  v11 = v9;\n  if ( v9 )\n  {\n    v12 = (RewardUnlockLayer *)RewardUnlockLayer::create(*((RewardUnlockLayer **)v9 + 15), 0, v10);\n    (*(void (__fastcall **)(int *, RewardUnlockLayer *, int))(*a1 + 232))(a1, v12, 100);\n    RewardUnlockLayer::showCollectReward(v12, v11);\n  }\n  else\n  {\n    v14 = (GameStatsManager *)GameStatsManager::sharedState(nullptr);\n    BonusDiamonds = GameStatsManager::getBonusDiamonds(v14, *((_DWORD *)a3 + 193) - *((_DWORD *)a3 + 194));\n    cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v20, a4);\n    v16 = CurrencyRewardLayer::create(0, 0, 0, BonusDiamonds, 0, 0, 0, 0, (const cocos2d::CCPoint *)v20, 0, 0.0, 1.0);\n    (*(void (__fastcall **)(int *, int, int))(*a1 + 232))(a1, v16, 14);\n  }\n  v17 = (GameLevelManager *)DailyLevelPage::exitDailyNode((int)a1, a2, nullptr, v13);\n  v18 = (_DWORD *)GameLevelManager::sharedState(v17);\n  if ( GameLevelManager::getDailyID(v18, a1[139]) <= *((_DWORD *)a3 + 186) - *((_DWORD *)a3 + 187) )\n    return DailyLevelPage::createDailyNode(\n             (DailyLevelPage *)a1,\n             nullptr,\n             0,\n             (cocos2d::CCDelayTime *)0x3F000000,\n             nullptr);\n  else\n    return (int *)DailyLevelPage::downloadAndCreateNode((DailyLevelPage *)a1);\n}", "assembly": "; \n; DailyLevelPage::claimLevelReward from 0x607c00 to 0x607ce8 (232 bytes)\n; \n; 1 xrefs:\n; > DailyLevelNode::onClaimReward @ 0x608cc2\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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 11:54:45 +0000\n; \nPUSH.W          {R4-R11,LR}                                            ; +0x0, 0x607c00\nMOV             R10, R3                                                ; +0x4, 0x607c04\nLDR             R7, =(__stack_chk_guard_ptr - 0x607C12)                ; +0x6, 0x607c06\nSUB             SP, SP, #0x34                                          ; +0x8, 0x607c08\nMOV             R6, R2                                                 ; +0xa, 0x607c0a\nMOV             R9, R1                                                 ; +0xc, 0x607c0c\nADD             R7, PC; __stack_chk_guard_ptr                          ; +0xe, 0x607c0e\nLDR             R7, [R7]; __stack_chk_guard                            ; +0x10, 0x607c10\nMOV             R5, R0                                                 ; +0x12, 0x607c12\nLDR             R3, [R7]                                               ; +0x14, 0x607c14\nSTR             R3, [SP,#0x34+var_8]                                   ; +0x16, 0x607c16\nBL              _ZN16GameStatsManager11sharedStateEv; GameStatsManager::sharedState(void) ; +0x18, 0x607c18\nMOV             R1, R6; GJGameLevel *                                  ; +0x1c, 0x607c1c\nBL              _ZN16GameStatsManager19completedDailyLevelEP11GJGameLevel; GameStatsManager::completedDailyLevel(GJGameLevel *) ; +0x1e, 0x607c1e\nMOV             R4, R0                                                 ; +0x22, 0x607c22\nCBZ             R0, loc_607C48                                         ; +0x24, 0x607c24\nMOVS            R1, #0; int                                            ; +0x26, 0x607c26\nLDR             R0, [R0,#0x3C]; this                                   ; +0x28, 0x607c28\nBL              _ZN17RewardUnlockLayer6createEiP11RewardsPage; RewardUnlockLayer::create(int,RewardsPage *) ; +0x2a, 0x607c2a\nLDR             R3, [R5]                                               ; +0x2e, 0x607c2e\nMOVS            R2, #0x64 ; 'd'                                        ; +0x30, 0x607c30\nLDR.W           R3, [R3,#0xE8]                                         ; +0x32, 0x607c32\nMOV             R8, R0                                                 ; +0x36, 0x607c36\nMOV             R0, R5                                                 ; +0x38, 0x607c38\nMOV             R1, R8                                                 ; +0x3a, 0x607c3a\nBLX             R3                                                     ; +0x3c, 0x607c3c\nMOV             R0, R8; this                                           ; +0x3e, 0x607c3e\nMOV             R1, R4; GJRewardItem *                                 ; +0x40, 0x607c40\nBL              _ZN17RewardUnlockLayer17showCollectRewardEP12GJRewardItem; RewardUnlockLayer::showCollectReward(GJRewardItem *) ; +0x42, 0x607c42\nB               loc_607C9A                                             ; +0x46, 0x607c46\nBL              _ZN16GameStatsManager11sharedStateEv; GameStatsManager::sharedState(void) ; +0x48, 0x607c48\nLDR.W           R3, [R6,#0x308]                                        ; +0x4c, 0x607c4c\nLDR.W           R1, [R6,#0x304]                                        ; +0x50, 0x607c50\nADD.W           R8, SP, #0x34+var_10                                   ; +0x54, 0x607c54\nSUBS            R1, R1, R3; int                                        ; +0x58, 0x607c58\nBL              _ZN16GameStatsManager16getBonusDiamondsEi; GameStatsManager::getBonusDiamonds(int) ; +0x5a, 0x607c5a\nMOV             R1, R10; cocos2d::CCPoint *                            ; +0x5e, 0x607c5e\nMOV             R11, R0                                                ; +0x60, 0x607c60\nMOV             R0, R8; this                                           ; +0x62, 0x607c62\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x64, 0x607c64\nMOVS            R3, #0                                                 ; +0x68, 0x607c68\nMOV             R1, R4; int                                            ; +0x6a, 0x607c6a\nSTR             R3, [SP,#0x34+var_1C]; float                           ; +0x6c, 0x607c6c\nMOV             R2, R4; int                                            ; +0x6e, 0x607c6e\nMOV.W           R3, #0x3F800000                                        ; +0x70, 0x607c70\nSTR             R4, [SP,#0x34+var_34]; int                             ; +0x74, 0x607c74\nMOV             R0, R4; int                                            ; +0x76, 0x607c76\nSTR             R3, [SP,#0x34+var_18]; float                           ; +0x78, 0x607c78\nMOV             R3, R11; int                                           ; +0x7a, 0x607c7a\nSTR             R4, [SP,#0x34+var_30]; int                             ; +0x7c, 0x607c7c\nSTR             R4, [SP,#0x34+var_2C]; int                             ; +0x7e, 0x607c7e\nSTR             R4, [SP,#0x34+var_28]; int                             ; +0x80, 0x607c80\nSTR.W           R8, [SP,#0x34+var_24]; int                             ; +0x82, 0x607c82\nSTR             R4, [SP,#0x34+var_20]; int                             ; +0x86, 0x607c86\nBL              _ZN19CurrencyRewardLayer6createEiiii18CurrencySpriteTypeiS0_iN7cocos2d7CCPointE18CurrencyRewardTypeff; CurrencyRewardLayer::create(int,int,int,int,CurrencySpriteType,int,CurrencySpriteType,int,cocos2d::CCPoint,CurrencyRewardType,float,float) ; +0x88, 0x607c88\nLDR             R3, [R5]                                               ; +0x8c, 0x607c8c\nMOVS            R2, #0xE                                               ; +0x8e, 0x607c8e\nLDR.W           R3, [R3,#0xE8]                                         ; +0x90, 0x607c90\nMOV             R1, R0                                                 ; +0x94, 0x607c94\nMOV             R0, R5                                                 ; +0x96, 0x607c96\nBLX             R3                                                     ; +0x98, 0x607c98\nMOVS            R2, #0; cocos2d::CCDelayTime *                         ; +0x9a, 0x607c9a\nMOV             R1, R9; DailyLevelNode *                               ; +0x9c, 0x607c9c\nMOV             R0, R5; this                                           ; +0x9e, 0x607c9e\nBL              _ZN14DailyLevelPage13exitDailyNodeEP14DailyLevelNodef; DailyLevelPage::exitDailyNode(DailyLevelNode *,float) ; +0xa0, 0x607ca0\nBL              _ZN16GameLevelManager11sharedStateEv; GameLevelManager::sharedState(void) ; +0xa4, 0x607ca4\nLDR.W           R1, [R5,#0x22C]                                        ; +0xa8, 0x607ca8\nBL              _ZN16GameLevelManager10getDailyIDE16GJTimedLevelType; GameLevelManager::getDailyID(GJTimedLevelType) ; +0xac, 0x607cac\nLDR.W           R3, [R6,#0x2E8]                                        ; +0xb0, 0x607cb0\nLDR.W           R2, [R6,#0x2EC]                                        ; +0xb4, 0x607cb4\nSUBS            R3, R3, R2                                             ; +0xb8, 0x607cb8\nCMP             R0, R3                                                 ; +0xba, 0x607cba\nBLE             loc_607CC6                                             ; +0xbc, 0x607cbc\nMOV             R0, R5; this                                           ; +0xbe, 0x607cbe\nBL              _ZN14DailyLevelPage21downloadAndCreateNodeEv; DailyLevelPage::downloadAndCreateNode(void) ; +0xc0, 0x607cc0\nB               loc_607CD6                                             ; +0xc4, 0x607cc4\nMOVS            R1, #0; GJGameLevel *                                  ; +0xc6, 0x607cc6\nMOV             R0, R5; this                                           ; +0xc8, 0x607cc8\nSTR             R1, [SP,#0x34+var_34]; DailyLevelPage *                ; +0xca, 0x607cca\nMOV             R2, R1; bool                                           ; +0xcc, 0x607ccc\nMOV.W           R3, #0x3F000000; float                                 ; +0xce, 0x607cce\nBL              _ZN14DailyLevelPage15createDailyNodeEP11GJGameLevelbfb; DailyLevelPage::createDailyNode(GJGameLevel *,bool,float,bool) ; +0xd2, 0x607cd2\nLDR             R2, [SP,#0x34+var_8]                                   ; +0xd6, 0x607cd6\nLDR             R3, [R7]                                               ; +0xd8, 0x607cd8\nCMP             R2, R3                                                 ; +0xda, 0x607cda\nBEQ             loc_607CE2                                             ; +0xdc, 0x607cdc\nBLX             __stack_chk_fail                                       ; +0xde, 0x607cde\nADD             SP, SP, #0x34 ; '4'                                    ; +0xe2, 0x607ce2\nPOP.W           {R4-R11,PC}                                            ; +0xe4, 0x607ce4", "xrefs": ["DailyLevelNode::onClaimReward @ 0x608cc2"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "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"}