{"type": "func", "start": 5373398064, "end": 5373398666, "name": "NotificationsPage::notificationRewardFinished", "pseudocode": "// \n// NotificationsPage::notificationRewardFinished from 0x140478c30 to 0x140478e8a (602 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1407b5428\n// > <???> @ 0x140928538\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 11:32:41 +0000\n// \n\n// Hidden C++ exception states: #wind=6\nvoid __fastcall NotificationsPage::notificationRewardFinished(__int64 a1, unsigned int a2)\n{\n  _QWORD *v4; // rbx\n  __int64 v5; // rcx\n  __int64 v6; // rcx\n  __int64 v7; // rcx\n  __int64 v8; // rbx\n  __int64 v9; // rcx\n  __int64 v10; // rbx\n  __int64 v11; // rcx\n  __int64 v12; // rcx\n  __int64 v13; // rdi\n  cocos2d::CCObject *v14; // rcx\n  void *v15; // [rsp+20h] [rbp-68h]\n  void *v16; // [rsp+20h] [rbp-68h]\n  void *v17; // [rsp+28h] [rbp-60h]\n  _BYTE v18[32]; // [rsp+30h] [rbp-58h] BYREF\n  _QWORD v19[4]; // [rsp+50h] [rbp-38h] BYREF\n\n  if ( !qword_14090BFE0 )\n  {\n    v15 = operator new(0x3E8u);\n    qword_14090BFE0 = sub_1402D6480((__int64)v15);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);\n  }\n  GameStatsManager::getNotificationRewardKey(a1, v19, a2);\n  v4 = (_QWORD *)sub_14003F4F0((__int64)v18, (__int64)v19);\n  v5 = qword_14090BFE0;\n  if ( !qword_14090BFE0 )\n  {\n    v17 = operator new(0x3E8u);\n    qword_14090BFE0 = sub_1402D6480((__int64)v17);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);\n    v5 = qword_14090BFE0;\n  }\n  if ( GameStatsManager::isSpecialChestUnlocked(v5, v4) )\n  {\n    v6 = *(_QWORD *)(a1 + 24);\n    if ( v6 )\n    {\n      v7 = *(_QWORD *)(v6 + 544);\n      if ( v7 )\n        CustomListView::reloadAll(v7);\n    }\n  }\n  else\n  {\n    v8 = sub_14003F4F0((__int64)v18, (__int64)v19);\n    v9 = qword_14090BFE0;\n    if ( !qword_14090BFE0 )\n    {\n      v16 = operator new(0x3E8u);\n      qword_14090BFE0 = sub_1402D6480((__int64)v16);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);\n      v9 = qword_14090BFE0;\n    }\n    v10 = GameStatsManager::unlockOnlineChest(v9, v8);\n    if ( v10 )\n    {\n      v11 = *(_QWORD *)(a1 + 24);\n      if ( v11 )\n      {\n        v12 = *(_QWORD *)(v11 + 544);\n        if ( v12 )\n          CustomListView::reloadAll(v12);\n      }\n      v13 = RewardUnlockLayer::create(*(unsigned int *)(v10 + 64), 0);\n      (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)(a1 - 664) + 456LL))(a1 - 664, v13, 100);\n      v14 = *(cocos2d::CCObject **)(v13 + 704);\n      if ( v14 )\n        cocos2d::CCObject::release(v14);\n      *(_QWORD *)(v13 + 704) = v10;\n      cocos2d::CCObject::retain((cocos2d::CCObject *)v10);\n      if ( !*(_BYTE *)(v10 + 80) || *(_DWORD *)(v10 + 64) == *(_DWORD *)(v13 + 696) )\n      {\n        (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(v13 + 720) + 336LL))(*(_QWORD *)(v13 + 720), 0);\n        (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(v13 + 720) + 936LL))(*(_QWORD *)(v13 + 720), 0);\n        (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(v13 + 712) + 336LL))(*(_QWORD *)(v13 + 712), 0);\n        *(_BYTE *)(v13 + 700) = 1;\n        if ( *(_BYTE *)(v13 + 701) )\n          RewardUnlockLayer::playRewardEffect(v13);\n      }\n    }\n  }\n  sub_14003D310((__int64)v19);\n}", "assembly": "; \n; NotificationsPage::notificationRewardFinished from 0x140478c30 to 0x140478e8a (602 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1407b5428\n; > <???> @ 0x140928538\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 11:32:41 +0000\n; \nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x140478c30\nmov     [rsp+arg_18], rsi                                              ; +0x5, 0x140478c35\npush    rdi                                                            ; +0xa, 0x140478c3a\nsub     rsp, 80h                                                       ; +0xb, 0x140478c3b\nmov     rax, cs:__security_cookie                                      ; +0x12, 0x140478c42\nxor     rax, rsp                                                       ; +0x19, 0x140478c49\nmov     [rsp+88h+var_18], rax                                          ; +0x1c, 0x140478c4c\nmov     ebx, edx                                                       ; +0x21, 0x140478c51\nmov     rsi, rcx                                                       ; +0x23, 0x140478c53\ncmp     cs:qword_14090BFE0, 0                                          ; +0x26, 0x140478c56\njnz     short loc_140478C8B                                            ; +0x2e, 0x140478c5e\nmov     ecx, 3E8h; Size                                                ; +0x30, 0x140478c60\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x35, 0x140478c65\nmov     [rsp+88h+var_68], rax                                          ; +0x3a, 0x140478c6a\nmov     rcx, rax                                                       ; +0x3f, 0x140478c6f\ncall    sub_1402D6480                                                  ; +0x42, 0x140478c72\nnop                                                                    ; +0x47, 0x140478c77\nmov     cs:qword_14090BFE0, rax                                        ; +0x48, 0x140478c78\nmov     rcx, [rax]                                                     ; +0x4f, 0x140478c7f\nmov     rdx, [rcx+48h]                                                 ; +0x52, 0x140478c82\nmov     rcx, rax                                                       ; +0x56, 0x140478c86\ncall    rdx                                                            ; +0x59, 0x140478c89\nmov     r8d, ebx                                                       ; +0x5b, 0x140478c8b\nlea     rdx, [rsp+88h+var_38]                                          ; +0x5e, 0x140478c8e\ncall    GameStatsManager__getNotificationRewardKey                     ; +0x63, 0x140478c93\nnop                                                                    ; +0x68, 0x140478c98\nlea     rax, [rsp+88h+var_58]                                          ; +0x69, 0x140478c99\nmov     [rsp+88h+var_68], rax                                          ; +0x6e, 0x140478c9e\nlea     rdx, [rsp+88h+var_38]                                          ; +0x73, 0x140478ca3\nlea     rcx, [rsp+88h+var_58]                                          ; +0x78, 0x140478ca8\ncall    sub_14003F4F0                                                  ; +0x7d, 0x140478cad\nmov     rbx, rax                                                       ; +0x82, 0x140478cb2\nmov     rcx, cs:qword_14090BFE0                                        ; +0x85, 0x140478cb5\ntest    rcx, rcx                                                       ; +0x8c, 0x140478cbc\njnz     short loc_140478CF3                                            ; +0x8f, 0x140478cbf\nmov     ecx, 3E8h; Size                                                ; +0x91, 0x140478cc1\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x96, 0x140478cc6\nmov     [rsp+88h+var_60], rax                                          ; +0x9b, 0x140478ccb\nmov     rcx, rax                                                       ; +0xa0, 0x140478cd0\ncall    sub_1402D6480                                                  ; +0xa3, 0x140478cd3\nnop                                                                    ; +0xa8, 0x140478cd8\nmov     cs:qword_14090BFE0, rax                                        ; +0xa9, 0x140478cd9\nmov     rcx, [rax]                                                     ; +0xb0, 0x140478ce0\nmov     rdx, [rcx+48h]                                                 ; +0xb3, 0x140478ce3\nmov     rcx, rax                                                       ; +0xb7, 0x140478ce7\ncall    rdx                                                            ; +0xba, 0x140478cea\nmov     rcx, cs:qword_14090BFE0                                        ; +0xbc, 0x140478cec\nmov     rdx, rbx                                                       ; +0xc3, 0x140478cf3\ncall    GameStatsManager__isSpecialChestUnlocked                       ; +0xc6, 0x140478cf6\ntest    al, al                                                         ; +0xcb, 0x140478cfb\njz      short loc_140478D26                                            ; +0xcd, 0x140478cfd\nmov     rcx, [rsi+18h]                                                 ; +0xcf, 0x140478cff\ntest    rcx, rcx                                                       ; +0xd3, 0x140478d03\njz      loc_140478E5E                                                  ; +0xd6, 0x140478d06\nmov     rcx, [rcx+220h]                                                ; +0xdc, 0x140478d0c\ntest    rcx, rcx                                                       ; +0xe3, 0x140478d13\njz      loc_140478E5E                                                  ; +0xe6, 0x140478d16\ncall    CustomListView__reloadAll                                      ; +0xec, 0x140478d1c\njmp     loc_140478E5E                                                  ; +0xf1, 0x140478d21\nlea     rax, [rsp+88h+var_58]                                          ; +0xf6, 0x140478d26\nmov     [rsp+88h+var_60], rax                                          ; +0xfb, 0x140478d2b\nlea     rdx, [rsp+88h+var_38]                                          ; +0x100, 0x140478d30\nlea     rcx, [rsp+88h+var_58]                                          ; +0x105, 0x140478d35\ncall    sub_14003F4F0                                                  ; +0x10a, 0x140478d3a\nmov     rbx, rax                                                       ; +0x10f, 0x140478d3f\nmov     rcx, cs:qword_14090BFE0                                        ; +0x112, 0x140478d42\ntest    rcx, rcx                                                       ; +0x119, 0x140478d49\njnz     short loc_140478D80                                            ; +0x11c, 0x140478d4c\nmov     ecx, 3E8h; Size                                                ; +0x11e, 0x140478d4e\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x123, 0x140478d53\nmov     [rsp+88h+var_68], rax                                          ; +0x128, 0x140478d58\nmov     rcx, rax                                                       ; +0x12d, 0x140478d5d\ncall    sub_1402D6480                                                  ; +0x130, 0x140478d60\nnop                                                                    ; +0x135, 0x140478d65\nmov     cs:qword_14090BFE0, rax                                        ; +0x136, 0x140478d66\nmov     rcx, [rax]                                                     ; +0x13d, 0x140478d6d\nmov     rdx, [rcx+48h]                                                 ; +0x140, 0x140478d70\nmov     rcx, rax                                                       ; +0x144, 0x140478d74\ncall    rdx                                                            ; +0x147, 0x140478d77\nmov     rcx, cs:qword_14090BFE0                                        ; +0x149, 0x140478d79\nmov     rdx, rbx                                                       ; +0x150, 0x140478d80\ncall    GameStatsManager__unlockOnlineChest                            ; +0x153, 0x140478d83\nmov     rbx, rax                                                       ; +0x158, 0x140478d88\ntest    rax, rax                                                       ; +0x15b, 0x140478d8b\njz      loc_140478E5E                                                  ; +0x15e, 0x140478d8e\nmov     rcx, [rsi+18h]                                                 ; +0x164, 0x140478d94\ntest    rcx, rcx                                                       ; +0x168, 0x140478d98\njz      short loc_140478DAE                                            ; +0x16b, 0x140478d9b\nmov     rcx, [rcx+220h]                                                ; +0x16d, 0x140478d9d\ntest    rcx, rcx                                                       ; +0x174, 0x140478da4\njz      short loc_140478DAE                                            ; +0x177, 0x140478da7\ncall    CustomListView__reloadAll                                      ; +0x179, 0x140478da9\nxor     edx, edx                                                       ; +0x17e, 0x140478dae\nmov     ecx, [rbx+40h]                                                 ; +0x180, 0x140478db0\ncall    RewardUnlockLayer__create                                      ; +0x183, 0x140478db3\nmov     rdi, rax                                                       ; +0x188, 0x140478db8\nmov     rdx, [rsi-298h]                                                ; +0x18b, 0x140478dbb\nmov     r9, [rdx+1C8h]                                                 ; +0x192, 0x140478dc2\nmov     r8d, 64h ; 'd'                                                 ; +0x199, 0x140478dc9\nmov     rdx, rax                                                       ; +0x19f, 0x140478dcf\nlea     rcx, [rsi-298h]                                                ; +0x1a2, 0x140478dd2\ncall    r9                                                             ; +0x1a9, 0x140478dd9\nmov     rcx, [rdi+2C0h]                                                ; +0x1ac, 0x140478ddc\ntest    rcx, rcx                                                       ; +0x1b3, 0x140478de3\njz      short loc_140478DEE                                            ; +0x1b6, 0x140478de6\ncall    cs:?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0x1b8, 0x140478de8\nmov     [rdi+2C0h], rbx                                                ; +0x1be, 0x140478dee\nmov     rcx, rbx                                                       ; +0x1c5, 0x140478df5\ncall    cs:?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0x1c8, 0x140478df8\ncmp     byte ptr [rbx+50h], 0                                          ; +0x1ce, 0x140478dfe\njz      short loc_140478E0F                                            ; +0x1d2, 0x140478e02\nmov     eax, [rdi+2B8h]                                                ; +0x1d4, 0x140478e04\ncmp     [rbx+40h], eax                                                 ; +0x1da, 0x140478e0a\njnz     short loc_140478E5E                                            ; +0x1dd, 0x140478e0d\nmov     rcx, [rdi+2D0h]                                                ; +0x1df, 0x140478e0f\nmov     rax, [rcx]                                                     ; +0x1e6, 0x140478e16\nxor     edx, edx                                                       ; +0x1e9, 0x140478e19\ncall    qword ptr [rax+150h]                                           ; +0x1eb, 0x140478e1b\nmov     rcx, [rdi+2D0h]                                                ; +0x1f1, 0x140478e21\nmov     rax, [rcx]                                                     ; +0x1f8, 0x140478e28\nxor     edx, edx                                                       ; +0x1fb, 0x140478e2b\ncall    qword ptr [rax+3A8h]                                           ; +0x1fd, 0x140478e2d\nmov     rcx, [rdi+2C8h]                                                ; +0x203, 0x140478e33\nmov     rax, [rcx]                                                     ; +0x20a, 0x140478e3a\nxor     edx, edx                                                       ; +0x20d, 0x140478e3d\ncall    qword ptr [rax+150h]                                           ; +0x20f, 0x140478e3f\nmov     byte ptr [rdi+2BCh], 1                                         ; +0x215, 0x140478e45\ncmp     byte ptr [rdi+2BDh], 0                                         ; +0x21c, 0x140478e4c\njz      short loc_140478E5E                                            ; +0x223, 0x140478e53\nmov     rcx, rdi                                                       ; +0x225, 0x140478e55\ncall    RewardUnlockLayer__playRewardEffect                            ; +0x228, 0x140478e58\nnop                                                                    ; +0x22d, 0x140478e5d\nlea     rcx, [rsp+88h+var_38]                                          ; +0x22e, 0x140478e5e\ncall    sub_14003D310                                                  ; +0x233, 0x140478e63\nmov     rcx, [rsp+88h+var_18]                                          ; +0x238, 0x140478e68\nxor     rcx, rsp; StackCookie                                          ; +0x23d, 0x140478e6d\ncall    __security_check_cookie                                        ; +0x240, 0x140478e70\nlea     r11, [rsp+88h+var_8]                                           ; +0x245, 0x140478e75\nmov     rbx, [r11+20h]                                                 ; +0x24d, 0x140478e7d\nmov     rsi, [r11+28h]                                                 ; +0x251, 0x140478e81\nmov     rsp, r11                                                       ; +0x255, 0x140478e85\npop     rdi                                                            ; +0x258, 0x140478e88\nretn                                                                   ; +0x259, 0x140478e89", "xrefs": ["<???> @ 0x1407b5428", "<???> @ 0x140928538"], "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"}