{"type": "func", "start": 5371783312, "end": 5371783522, "name": "GameStatsManager::unlockSpecialChest", "pseudocode": "// \n// GameStatsManager::unlockSpecialChest from 0x1402ee890 to 0x1402ee962 (210 bytes)\n// \n// 11 xrefs:\n// > FollowRewardPage::onSpecialItem @ 0x14020e91e\n// > GameStatsManager::unlockOnlineChest @ 0x1402eeb69\n// > GauntletSelectLayer::onPlay @ 0x1402ffd1a\n// > GJPathRewardPopup::onClaim @ 0x1403982e9\n// > GJShopLayer::dialogClosed @ 0x1403b4c2f\n// > SecretRewardsLayer::onSpecialItem @ 0x14056c871\n// > SecretLayer3::onChest01 @ 0x140581204\n// > SecretLayer3::onChest02 @ 0x140581384\n// > SecretLayer4::onChest01 @ 0x140586557\n// > SupportLayer::onGetReward @ 0x14066b188\n// > <???> @ 0x14091e0f8\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:29:56 +0000\n// \n\n// Hidden C++ exception states: #wind=2\n__int64 __fastcall GameStatsManager::unlockSpecialChest(__int64 a1, __int64 a2)\n{\n  _QWORD *v4; // rax\n  __int64 v5; // rsi\n  __int64 v7; // [rsp+20h] [rbp-58h]\n  _BYTE v8[32]; // [rsp+28h] [rbp-50h] BYREF\n  __int64 v9; // [rsp+48h] [rbp-30h]\n\n  v9 = a2;\n  v4 = (_QWORD *)sub_14003F4F0((__int64)v8, a2);\n  if ( GameStatsManager::isSpecialChestUnlocked(a1, v4)\n    || (v7 = sub_14003F4F0((__int64)v8, a2),\n        v5 = cocos2d::CCDictionary::objectForKey(*(_QWORD *)(a1 + 368), v7),\n        sub_14003D310(v7),\n        !v5) )\n  {\n    sub_14003D310(a2);\n    return 0;\n  }\n  else\n  {\n    GameStatsManager::preProcessReward(a1, v5);\n    GameStatsManager::registerRewardsFromItem(a1, v5);\n    cocos2d::CCDictionary::setObject(*(_QWORD *)(a1 + 888), v5, a2);\n    sub_14003D310(a2);\n    return v5;\n  }\n}", "assembly": "; \n; GameStatsManager::unlockSpecialChest from 0x1402ee890 to 0x1402ee962 (210 bytes)\n; \n; 11 xrefs:\n; > FollowRewardPage::onSpecialItem @ 0x14020e91e\n; > GameStatsManager::unlockOnlineChest @ 0x1402eeb69\n; > GauntletSelectLayer::onPlay @ 0x1402ffd1a\n; > GJPathRewardPopup::onClaim @ 0x1403982e9\n; > GJShopLayer::dialogClosed @ 0x1403b4c2f\n; > SecretRewardsLayer::onSpecialItem @ 0x14056c871\n; > SecretLayer3::onChest01 @ 0x140581204\n; > SecretLayer3::onChest02 @ 0x140581384\n; > SecretLayer4::onChest01 @ 0x140586557\n; > SupportLayer::onGetReward @ 0x14066b188\n; > <???> @ 0x14091e0f8\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:29:56 +0000\n; \nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x1402ee890\npush    rbp                                                            ; +0x5, 0x1402ee895\npush    rsi                                                            ; +0x6, 0x1402ee896\npush    rdi                                                            ; +0x7, 0x1402ee897\nsub     rsp, 60h                                                       ; +0x8, 0x1402ee898\nmov     rax, cs:__security_cookie                                      ; +0xc, 0x1402ee89c\nxor     rax, rsp                                                       ; +0x13, 0x1402ee8a3\nmov     [rsp+78h+var_28], rax                                          ; +0x16, 0x1402ee8a6\nmov     rdi, rdx                                                       ; +0x1b, 0x1402ee8ab\nmov     rbp, rcx                                                       ; +0x1e, 0x1402ee8ae\nmov     [rsp+78h+var_30], rdx                                          ; +0x21, 0x1402ee8b1\nlea     rcx, [rsp+78h+var_50]                                          ; +0x26, 0x1402ee8b6\ncall    sub_14003F4F0                                                  ; +0x2b, 0x1402ee8bb\nmov     rdx, rax                                                       ; +0x30, 0x1402ee8c0\nmov     rcx, rbp                                                       ; +0x33, 0x1402ee8c3\ncall    GameStatsManager__isSpecialChestUnlocked                       ; +0x36, 0x1402ee8c6\ntest    al, al                                                         ; +0x3b, 0x1402ee8cb\njnz     short loc_1402EE93B                                            ; +0x3d, 0x1402ee8cd\nmov     rdx, rdi                                                       ; +0x3f, 0x1402ee8cf\nlea     rcx, [rsp+78h+var_50]                                          ; +0x42, 0x1402ee8d2\ncall    sub_14003F4F0                                                  ; +0x47, 0x1402ee8d7\nmov     rbx, rax                                                       ; +0x4c, 0x1402ee8dc\nmov     [rsp+78h+var_58], rax                                          ; +0x4f, 0x1402ee8df\nmov     rdx, rax                                                       ; +0x54, 0x1402ee8e4\nmov     rcx, [rbp+170h]                                                ; +0x57, 0x1402ee8e7\ncall    cs:?objectForKey@CCDictionary@cocos2d@@QEAAPEAVCCObject@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::objectForKey(std::string const &) ; +0x5e, 0x1402ee8ee\nmov     rsi, rax                                                       ; +0x64, 0x1402ee8f4\nmov     rcx, rbx                                                       ; +0x67, 0x1402ee8f7\ncall    sub_14003D310                                                  ; +0x6a, 0x1402ee8fa\ntest    rsi, rsi                                                       ; +0x6f, 0x1402ee8ff\njz      short loc_1402EE93B                                            ; +0x72, 0x1402ee902\nmov     rdx, rsi                                                       ; +0x74, 0x1402ee904\nmov     rcx, rbp                                                       ; +0x77, 0x1402ee907\ncall    GameStatsManager__preProcessReward                             ; +0x7a, 0x1402ee90a\nmov     rdx, rsi                                                       ; +0x7f, 0x1402ee90f\nmov     rcx, rbp                                                       ; +0x82, 0x1402ee912\ncall    GameStatsManager__registerRewardsFromItem                      ; +0x85, 0x1402ee915\nmov     r8, rdi                                                        ; +0x8a, 0x1402ee91a\nmov     rdx, rsi                                                       ; +0x8d, 0x1402ee91d\nmov     rcx, [rbp+378h]                                                ; +0x90, 0x1402ee920\ncall    cs:?setObject@CCDictionary@cocos2d@@QEAAXPEAVCCObject@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,std::string const &) ; +0x97, 0x1402ee927\nnop                                                                    ; +0x9d, 0x1402ee92d\nmov     rcx, rdi                                                       ; +0x9e, 0x1402ee92e\ncall    sub_14003D310                                                  ; +0xa1, 0x1402ee931\nmov     rax, rsi                                                       ; +0xa6, 0x1402ee936\njmp     short loc_1402EE945                                            ; +0xa9, 0x1402ee939\nmov     rcx, rdi                                                       ; +0xab, 0x1402ee93b\ncall    sub_14003D310                                                  ; +0xae, 0x1402ee93e\nxor     eax, eax                                                       ; +0xb3, 0x1402ee943\nmov     rcx, [rsp+78h+var_28]                                          ; +0xb5, 0x1402ee945\nxor     rcx, rsp; StackCookie                                          ; +0xba, 0x1402ee94a\ncall    __security_check_cookie                                        ; +0xbd, 0x1402ee94d\nmov     rbx, [rsp+78h+arg_10]                                          ; +0xc2, 0x1402ee952\nadd     rsp, 60h                                                       ; +0xca, 0x1402ee95a\npop     rdi                                                            ; +0xce, 0x1402ee95e\npop     rsi                                                            ; +0xcf, 0x1402ee95f\npop     rbp                                                            ; +0xd0, 0x1402ee960\nretn                                                                   ; +0xd1, 0x1402ee961", "xrefs": ["FollowRewardPage::onSpecialItem @ 0x14020e91e", "GameStatsManager::unlockOnlineChest @ 0x1402eeb69", "GauntletSelectLayer::onPlay @ 0x1402ffd1a", "GJPathRewardPopup::onClaim @ 0x1403982e9", "GJShopLayer::dialogClosed @ 0x1403b4c2f", "SecretRewardsLayer::onSpecialItem @ 0x14056c871", "SecretLayer3::onChest01 @ 0x140581204", "SecretLayer3::onChest02 @ 0x140581384", "SecretLayer4::onChest01 @ 0x140586557", "SupportLayer::onGetReward @ 0x14066b188", "<???> @ 0x14091e0f8"], "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"}