{"type": "func", "start": 4297157088, "end": 4297157471, "name": "DailyLevelPage::claimLevelReward", "pseudocode": "// \n// DailyLevelPage::claimLevelReward from 0x1002169e0 to 0x100216b5f (383 bytes)\n// \n// 1 xrefs:\n// > DailyLevelNode::onClaimReward @ 0x100217a15\n// \n// This function is hookable on this platform (idp: pc, 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 12:27:00 +0000\n// \n\n_QWORD *__fastcall DailyLevelPage::claimLevelReward(__int64 a1, __int64 a2, _DWORD *a3, __int64 a4, __m128 a5)\n{\n  __int64 v5; // rax\n  _QWORD *v8; // rax\n  __int64 v9; // rax\n  __int64 v10; // r12\n  char *v11; // r13\n  __int64 v12; // rax\n  int BonusDiamonds; // r13d\n  __int64 v14; // rax\n  __int64 v15; // rax\n  __int64 v16; // rax\n  int v17; // r14d\n  int v18; // eax\n  int v19; // ecx\n  int v20; // r8d\n  int v21; // r9d\n  __int64 v22; // rax\n  _QWORD v24[6]; // [rsp+0h] [rbp-30h] BYREF\n\n  v24[0] = v5;\n  v8 = (_QWORD *)GameStatsManager::sharedState();\n  v9 = GameStatsManager::completedDailyLevel(v8, a3, a5);\n  if ( v9 )\n  {\n    v10 = v9;\n    v11 = RewardUnlockLayer::create(*(_DWORD *)(v9 + 64), 0);\n    (*(void (__fastcall **)(__int64, char *, __int64))(*(_QWORD *)a1 + 464LL))(a1, v11, 100);\n    RewardUnlockLayer::showCollectReward((__int64)v11, v10);\n  }\n  else\n  {\n    v12 = GameStatsManager::sharedState();\n    BonusDiamonds = GameStatsManager::getBonusDiamonds(a5, v12, a3[237] - a3[238]);\n    sub_1002782D0(v24, a4);\n    v14 = CurrencyRewardLayer::create(0, 0, 0, BonusDiamonds, 0, 0, 0, 0, (__int64)v24, 0);\n    (*(void (__fastcall **)(__int64, __int64, __int64, double, float))(*(_QWORD *)a1 + 464LL))(a1, v14, 14, 0.0, 1.0);\n  }\n  DailyLevelPage::exitDailyNode(a1, a2, 0.0);\n  v15 = GameLevelManager::sharedState(0.0);\n  if ( (int)GameLevelManager::getDailyID(v15, *(unsigned int *)(a1 + 732)) <= a3[230] - a3[231] )\n    return DailyLevelPage::createDailyNode(a1, 0, 0, 0, 0.5);\n  *(_BYTE *)(a1 + 728) = 1;\n  v16 = GameLevelManager::sharedState(0.0);\n  GameLevelManager::downloadLevel(v16, *(unsigned int *)(a1 + 736), 0, 0);\n  v17 = cocos2d::CCDelayTime::create(0.5);\n  v18 = cocos2d::CCCallFunc::create(a1, DailyLevelPage::createNodeIfLoaded, 0);\n  v22 = sub_10039EB60(v17, v18, 0, v19, v20, v21);\n  return (_QWORD *)cocos2d::CCNode::runAction(a1, v22);\n}", "assembly": "; \n; DailyLevelPage::claimLevelReward from 0x1002169e0 to 0x100216b5f (383 bytes)\n; \n; 1 xrefs:\n; > DailyLevelNode::onClaimReward @ 0x100217a15\n; \n; This function is hookable on this platform (idp: pc, 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 12:27:00 +0000\n; \npush    rbp                                                            ; +0x0, 0x1002169e0\nmov     rbp, rsp                                                       ; +0x1, 0x1002169e1\npush    r15                                                            ; +0x4, 0x1002169e4\npush    r14                                                            ; +0x6, 0x1002169e6\npush    r13                                                            ; +0x8, 0x1002169e8\npush    r12                                                            ; +0xa, 0x1002169ea\npush    rbx                                                            ; +0xc, 0x1002169ec\npush    rax                                                            ; +0xd, 0x1002169ed\nmov     r12, rcx                                                       ; +0xe, 0x1002169ee\nmov     r14, rdx                                                       ; +0x11, 0x1002169f1\nmov     r15, rsi                                                       ; +0x14, 0x1002169f4\nmov     rbx, rdi                                                       ; +0x17, 0x1002169f7\ncall    GameStatsManager__sharedState                                  ; +0x1a, 0x1002169fa\nmov     rdi, rax                                                       ; +0x1f, 0x1002169ff\nmov     rsi, r14                                                       ; +0x22, 0x100216a02\ncall    GameStatsManager__completedDailyLevel                          ; +0x25, 0x100216a05\ntest    rax, rax                                                       ; +0x2a, 0x100216a0a\njz      short loc_100216A40                                            ; +0x2d, 0x100216a0d\nmov     edi, [rax+40h]                                                 ; +0x2f, 0x100216a0f\nxor     esi, esi                                                       ; +0x32, 0x100216a12\nmov     r12, rax                                                       ; +0x34, 0x100216a14\ncall    RewardUnlockLayer__create                                      ; +0x37, 0x100216a17\nmov     r13, rax                                                       ; +0x3c, 0x100216a1c\nmov     rax, [rbx]                                                     ; +0x3f, 0x100216a1f\nmov     rdi, rbx                                                       ; +0x42, 0x100216a22\nmov     rsi, r13                                                       ; +0x45, 0x100216a25\nmov     edx, 64h ; 'd'                                                 ; +0x48, 0x100216a28\ncall    qword ptr [rax+1D0h]                                           ; +0x4d, 0x100216a2d\nmov     rdi, r13                                                       ; +0x53, 0x100216a33\nmov     rsi, r12                                                       ; +0x56, 0x100216a36\ncall    RewardUnlockLayer__showCollectReward                           ; +0x59, 0x100216a39\njmp     short loc_100216AAC                                            ; +0x5e, 0x100216a3e\ncall    GameStatsManager__sharedState                                  ; +0x60, 0x100216a40\nmov     esi, [r14+3B4h]                                                ; +0x65, 0x100216a45\nsub     esi, [r14+3B8h]                                                ; +0x6c, 0x100216a4c\nmov     rdi, rax                                                       ; +0x73, 0x100216a53\ncall    GameStatsManager__getBonusDiamonds                             ; +0x76, 0x100216a56\nmov     r13d, eax                                                      ; +0x7b, 0x100216a5b\nlea     rdi, [rbp+var_30]                                              ; +0x7e, 0x100216a5e\nmov     rsi, r12                                                       ; +0x82, 0x100216a62\ncall    sub_1002782D0                                                  ; +0x85, 0x100216a65\nmovss   xmm1, cs:alpha                                                 ; +0x8a, 0x100216a6a\nxorps   xmm0, xmm0                                                     ; +0x92, 0x100216a72\nxor     edi, edi                                                       ; +0x95, 0x100216a75\nxor     esi, esi                                                       ; +0x97, 0x100216a77\nxor     edx, edx                                                       ; +0x99, 0x100216a79\nmov     ecx, r13d                                                      ; +0x9b, 0x100216a7b\nxor     r8d, r8d                                                       ; +0x9e, 0x100216a7e\nxor     r9d, r9d                                                       ; +0xa1, 0x100216a81\npush    0                                                              ; +0xa4, 0x100216a84\nlea     rax, [rbp+var_30]                                              ; +0xa6, 0x100216a86\npush    rax                                                            ; +0xaa, 0x100216a8a\npush    0                                                              ; +0xab, 0x100216a8b\npush    0                                                              ; +0xad, 0x100216a8d\ncall    CurrencyRewardLayer__create                                    ; +0xaf, 0x100216a8f\nadd     rsp, 20h                                                       ; +0xb4, 0x100216a94\nmov     rcx, [rbx]                                                     ; +0xb8, 0x100216a98\nmov     rdi, rbx                                                       ; +0xbb, 0x100216a9b\nmov     rsi, rax                                                       ; +0xbe, 0x100216a9e\nmov     edx, 0Eh                                                       ; +0xc1, 0x100216aa1\ncall    qword ptr [rcx+1D0h]                                           ; +0xc6, 0x100216aa6\nxorps   xmm0, xmm0                                                     ; +0xcc, 0x100216aac\nmov     rdi, rbx                                                       ; +0xcf, 0x100216aaf\nmov     rsi, r15                                                       ; +0xd2, 0x100216ab2\ncall    DailyLevelPage__exitDailyNode                                  ; +0xd5, 0x100216ab5\ncall    GameLevelManager__sharedState                                  ; +0xda, 0x100216aba\nmov     esi, [rbx+2DCh]                                                ; +0xdf, 0x100216abf\nmov     rdi, rax                                                       ; +0xe5, 0x100216ac5\ncall    GameLevelManager__getDailyID                                   ; +0xe8, 0x100216ac8\nmov     ecx, [r14+398h]                                                ; +0xed, 0x100216acd\nsub     ecx, [r14+39Ch]                                                ; +0xf4, 0x100216ad4\ncmp     eax, ecx                                                       ; +0xfb, 0x100216adb\njle     short loc_100216B3A                                            ; +0xfd, 0x100216add\nmov     byte ptr [rbx+2D8h], 1                                         ; +0xff, 0x100216adf\ncall    GameLevelManager__sharedState                                  ; +0x106, 0x100216ae6\nmov     esi, [rbx+2E0h]                                                ; +0x10b, 0x100216aeb\nmov     rdi, rax                                                       ; +0x111, 0x100216af1\nxor     edx, edx                                                       ; +0x114, 0x100216af4\nxor     ecx, ecx                                                       ; +0x116, 0x100216af6\ncall    GameLevelManager__downloadLevel                                ; +0x118, 0x100216af8\nmovss   xmm0, cs:dword_100A03578                                       ; +0x11d, 0x100216afd\ncall    cocos2d__CCDelayTime__create                                   ; +0x125, 0x100216b05\nmov     r14, rax                                                       ; +0x12a, 0x100216b0a\nlea     rsi, DailyLevelPage__createNodeIfLoaded                        ; +0x12d, 0x100216b0d\nmov     rdi, rbx                                                       ; +0x134, 0x100216b14\nxor     edx, edx                                                       ; +0x137, 0x100216b17\ncall    cocos2d__CCCallFunc__create                                    ; +0x139, 0x100216b19\nmov     rdi, r14                                                       ; +0x13e, 0x100216b1e\nmov     rsi, rax                                                       ; +0x141, 0x100216b21\nxor     edx, edx                                                       ; +0x144, 0x100216b24\nxor     eax, eax                                                       ; +0x146, 0x100216b26\ncall    sub_10039EB60                                                  ; +0x148, 0x100216b28\nmov     rdi, rbx                                                       ; +0x14d, 0x100216b2d\nmov     rsi, rax                                                       ; +0x150, 0x100216b30\ncall    cocos2d__CCNode__runAction                                     ; +0x153, 0x100216b33\njmp     short loc_100216B50                                            ; +0x158, 0x100216b38\nmovss   xmm0, cs:dword_100A03578                                       ; +0x15a, 0x100216b3a\nmov     rdi, rbx                                                       ; +0x162, 0x100216b42\nxor     esi, esi                                                       ; +0x165, 0x100216b45\nxor     edx, edx                                                       ; +0x167, 0x100216b47\nxor     ecx, ecx                                                       ; +0x169, 0x100216b49\ncall    DailyLevelPage__createDailyNode                                ; +0x16b, 0x100216b4b\nadd     rsp, 8                                                         ; +0x170, 0x100216b50\npop     rbx                                                            ; +0x174, 0x100216b54\npop     r12                                                            ; +0x175, 0x100216b55\npop     r13                                                            ; +0x177, 0x100216b57\npop     r14                                                            ; +0x179, 0x100216b59\npop     r15                                                            ; +0x17b, 0x100216b5b\npop     rbp                                                            ; +0x17d, 0x100216b5d\nretn                                                                   ; +0x17e, 0x100216b5e", "xrefs": ["DailyLevelNode::onClaimReward @ 0x100217a15"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}