{"type": "func", "start": 5370135856, "end": 5370136273, "name": "GJNotificationCell::refreshChest", "pseudocode": "// \n// GJNotificationCell::refreshChest from 0x14015c530 to 0x14015c6d1 (417 bytes)\n// \n// 2 xrefs:\n// > CustomListView::reloadAll @ 0x140146c5c\n// > <???> @ 0x140917b40\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:27:23 +0000\n// \n\n// Hidden C++ exception states: #wind=3\nvoid __fastcall GJNotificationCell::refreshChest(__int64 a1)\n{\n  __int64 v2; // rcx\n  __int64 v3; // rcx\n  _BYTE *v4; // rbx\n  __int64 v5; // rdi\n  __int64 v6; // rcx\n  unsigned __int8 isSpecialChestUnlocked; // si\n  __int64 v8; // r8\n  __int64 v9; // rax\n  __int64 v10; // rdx\n  unsigned int *v11; // rdi\n  __int64 v12; // rax\n  __int64 *v13; // rdi\n  __int64 *i; // r14\n  __int64 v15; // rbx\n  _BYTE v16[56]; // [rsp+20h] [rbp-38h] BYREF\n  void *v17; // [rsp+68h] [rbp+10h] BYREF\n\n  v2 = *(_QWORD *)(a1 + 576);\n  if ( v2 && *(_QWORD *)(a1 + 568) )\n  {\n    v4 = (_BYTE *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v2 + 952LL))(v2);\n    v5 = *(_QWORD *)(a1 + 568);\n    if ( !qword_14090BFE0 )\n    {\n      v17 = operator new(0x3E8u);\n      qword_14090BFE0 = sub_1402D6480(v17);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);\n    }\n    GameStatsManager::getNotificationRewardKey(v3, v16, *(unsigned int *)(v5 + 56));\n    v6 = qword_14090BFE0;\n    if ( !qword_14090BFE0 )\n    {\n      v17 = operator new(0x3E8u);\n      qword_14090BFE0 = sub_1402D6480(v17);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);\n      v6 = qword_14090BFE0;\n    }\n    isSpecialChestUnlocked = GameStatsManager::isSpecialChestUnlocked(v6, v16);\n    if ( isSpecialChestUnlocked )\n    {\n      v4[608] = 0;\n      LOBYTE(v8) = 1;\n      GJChestSprite::switchToState(v4, 4, v8);\n      v9 = (*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)v4 + 480LL))(v4);\n      if ( v9 )\n      {\n        v11 = *(unsigned int **)(v9 + 56);\n        v12 = *v11;\n        if ( (_DWORD)v12 )\n        {\n          v13 = *((__int64 **)v11 + 2);\n          for ( i = &v13[v12 - 1]; v13 <= i; ++v13 )\n          {\n            v15 = *v13;\n            if ( !*v13 )\n              break;\n            LOBYTE(v10) = -106;\n            (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)(v15 + 320) + 40LL))(v15 + 320, v10);\n            LOWORD(v17) = -26986;\n            BYTE2(v17) = -106;\n            (**(void (__fastcall ***)(__int64, void **))(v15 + 320))(v15 + 320, &v17);\n          }\n        }\n      }\n    }\n    (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 576) + 936LL))(\n      *(_QWORD *)(a1 + 576),\n      isSpecialChestUnlocked ^ 1u);\n  }\n}", "assembly": "; \n; GJNotificationCell::refreshChest from 0x14015c530 to 0x14015c6d1 (417 bytes)\n; \n; 2 xrefs:\n; > CustomListView::reloadAll @ 0x140146c5c\n; > <???> @ 0x140917b40\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:27:23 +0000\n; \nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x14015c530\nmov     [rsp+arg_18], rbp                                              ; +0x5, 0x14015c535\npush    rsi                                                            ; +0xa, 0x14015c53a\npush    rdi                                                            ; +0xb, 0x14015c53b\npush    r14                                                            ; +0xc, 0x14015c53c\nsub     rsp, 40h                                                       ; +0xe, 0x14015c53e\nmov     rbp, rcx                                                       ; +0x12, 0x14015c542\nmov     rcx, [rcx+240h]                                                ; +0x15, 0x14015c545\ntest    rcx, rcx                                                       ; +0x1c, 0x14015c54c\njz      loc_14015C6BE                                                  ; +0x1f, 0x14015c54f\ncmp     qword ptr [rbp+238h], 0                                        ; +0x25, 0x14015c555\njz      loc_14015C6BE                                                  ; +0x2d, 0x14015c55d\nmov     rax, [rcx]                                                     ; +0x33, 0x14015c563\ncall    qword ptr [rax+3B8h]                                           ; +0x36, 0x14015c566\nmov     rbx, rax                                                       ; +0x3c, 0x14015c56c\nlea     rax, [rsp+58h+var_38]                                          ; +0x3f, 0x14015c56f\nmov     [rsp+58h+arg_0], rax                                           ; +0x44, 0x14015c574\nmov     rdi, [rbp+238h]                                                ; +0x49, 0x14015c579\ncmp     cs:qword_14090BFE0, 0                                          ; +0x50, 0x14015c580\njnz     short loc_14015C5B2                                            ; +0x58, 0x14015c588\nmov     ecx, 3E8h; Size                                                ; +0x5a, 0x14015c58a\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x5f, 0x14015c58f\nmov     [rsp+58h+arg_8], rax                                           ; +0x64, 0x14015c594\nmov     rcx, rax                                                       ; +0x69, 0x14015c599\ncall    sub_1402D6480                                                  ; +0x6c, 0x14015c59c\nnop                                                                    ; +0x71, 0x14015c5a1\nmov     cs:qword_14090BFE0, rax                                        ; +0x72, 0x14015c5a2\nmov     rdx, [rax]                                                     ; +0x79, 0x14015c5a9\nmov     rcx, rax                                                       ; +0x7c, 0x14015c5ac\ncall    qword ptr [rdx+48h]                                            ; +0x7f, 0x14015c5af\nmov     r8d, [rdi+38h]                                                 ; +0x82, 0x14015c5b2\nlea     rdx, [rsp+58h+var_38]                                          ; +0x86, 0x14015c5b6\ncall    GameStatsManager__getNotificationRewardKey                     ; +0x8b, 0x14015c5bb\nnop                                                                    ; +0x90, 0x14015c5c0\nmov     rcx, cs:qword_14090BFE0                                        ; +0x91, 0x14015c5c1\ntest    rcx, rcx                                                       ; +0x98, 0x14015c5c8\njnz     short loc_14015C5FF                                            ; +0x9b, 0x14015c5cb\nmov     ecx, 3E8h; Size                                                ; +0x9d, 0x14015c5cd\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xa2, 0x14015c5d2\nmov     [rsp+58h+arg_8], rax                                           ; +0xa7, 0x14015c5d7\nmov     rcx, rax                                                       ; +0xac, 0x14015c5dc\ncall    sub_1402D6480                                                  ; +0xaf, 0x14015c5df\nnop                                                                    ; +0xb4, 0x14015c5e4\nmov     cs:qword_14090BFE0, rax                                        ; +0xb5, 0x14015c5e5\nmov     rcx, [rax]                                                     ; +0xbc, 0x14015c5ec\nmov     rdx, [rcx+48h]                                                 ; +0xbf, 0x14015c5ef\nmov     rcx, rax                                                       ; +0xc3, 0x14015c5f3\ncall    rdx                                                            ; +0xc6, 0x14015c5f6\nmov     rcx, cs:qword_14090BFE0                                        ; +0xc8, 0x14015c5f8\nlea     rdx, [rsp+58h+var_38]                                          ; +0xcf, 0x14015c5ff\ncall    GameStatsManager__isSpecialChestUnlocked                       ; +0xd4, 0x14015c604\nmovzx   esi, al                                                        ; +0xd9, 0x14015c609\ntest    al, al                                                         ; +0xdc, 0x14015c60c\njz      loc_14015C6A6                                                  ; +0xde, 0x14015c60e\nmov     byte ptr [rbx+260h], 0                                         ; +0xe4, 0x14015c614\nmov     r8b, 1                                                         ; +0xeb, 0x14015c61b\nmov     edx, 4                                                         ; +0xee, 0x14015c61e\nmov     rcx, rbx                                                       ; +0xf3, 0x14015c623\ncall    GJChestSprite__switchToState                                   ; +0xf6, 0x14015c626\nmov     rax, [rbx]                                                     ; +0xfb, 0x14015c62b\nmov     rcx, rbx                                                       ; +0xfe, 0x14015c62e\ncall    qword ptr [rax+1E0h]                                           ; +0x101, 0x14015c631\ntest    rax, rax                                                       ; +0x107, 0x14015c637\njz      short loc_14015C6A6                                            ; +0x10a, 0x14015c63a\nmov     rdi, [rax+38h]                                                 ; +0x10c, 0x14015c63c\nmov     eax, [rdi]                                                     ; +0x110, 0x14015c640\ntest    eax, eax                                                       ; +0x112, 0x14015c642\njz      short loc_14015C6A6                                            ; +0x114, 0x14015c644\nmov     rdi, [rdi+10h]                                                 ; +0x116, 0x14015c646\nlea     r14, [rax-1]                                                   ; +0x11a, 0x14015c64a\nlea     r14, [rdi+r14*8]                                               ; +0x11e, 0x14015c64e\ncmp     rdi, r14                                                       ; +0x122, 0x14015c652\nja      short loc_14015C6A6                                            ; +0x125, 0x14015c655\nmov     rbx, [rdi]                                                     ; +0x127, 0x14015c657\ntest    rbx, rbx                                                       ; +0x12a, 0x14015c65a\njz      short loc_14015C6A6                                            ; +0x12d, 0x14015c65d\nmov     rax, [rbx+140h]                                                ; +0x12f, 0x14015c65f\nmov     dl, 96h                                                        ; +0x136, 0x14015c666\nlea     rcx, [rbx+140h]                                                ; +0x138, 0x14015c668\ncall    qword ptr [rax+28h]                                            ; +0x13f, 0x14015c66f\nmov     word ptr [rsp+58h+arg_0], 9696h                                ; +0x142, 0x14015c672\nmovzx   eax, word ptr [rsp+58h+arg_0]                                  ; +0x149, 0x14015c679\nmov     word ptr [rsp+58h+arg_8], ax                                   ; +0x14e, 0x14015c67e\nmov     byte ptr [rsp+58h+arg_8+2], 96h                                ; +0x153, 0x14015c683\nmov     rax, [rbx+140h]                                                ; +0x158, 0x14015c688\nlea     rdx, [rsp+58h+arg_8]                                           ; +0x15f, 0x14015c68f\nlea     rcx, [rbx+140h]                                                ; +0x164, 0x14015c694\ncall    qword ptr [rax]                                                ; +0x16b, 0x14015c69b\nadd     rdi, 8                                                         ; +0x16d, 0x14015c69d\ncmp     rdi, r14                                                       ; +0x171, 0x14015c6a1\njbe     short loc_14015C657                                            ; +0x174, 0x14015c6a4\nmov     rcx, [rbp+240h]                                                ; +0x176, 0x14015c6a6\nxor     sil, 1                                                         ; +0x17d, 0x14015c6ad\nmov     rax, [rcx]                                                     ; +0x181, 0x14015c6b1\nmovzx   edx, sil                                                       ; +0x184, 0x14015c6b4\ncall    qword ptr [rax+3A8h]                                           ; +0x188, 0x14015c6b8\nmov     rbx, [rsp+58h+arg_10]                                          ; +0x18e, 0x14015c6be\nmov     rbp, [rsp+58h+arg_18]                                          ; +0x193, 0x14015c6c3\nadd     rsp, 40h                                                       ; +0x198, 0x14015c6c8\npop     r14                                                            ; +0x19c, 0x14015c6cc\npop     rdi                                                            ; +0x19e, 0x14015c6ce\npop     rsi                                                            ; +0x19f, 0x14015c6cf\nretn                                                                   ; +0x1a0, 0x14015c6d0", "xrefs": ["CustomListView::reloadAll @ 0x140146c5c", "<???> @ 0x140917b40"], "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"}