{"type": "func", "start": 5371783984, "end": 5371784165, "name": "GameStatsManager::unlockOnlineChest", "pseudocode": "// \n// GameStatsManager::unlockOnlineChest from 0x1402eeb30 to 0x1402eebe5 (181 bytes)\n// \n// 4 xrefs:\n// > GameStatsManager::completedDailyLevel @ 0x1402e7008\n// > NotificationsPage::notificationRewardFinished @ 0x140478d83\n// > SecretLayer5::claimOnlineReward @ 0x14058c150\n// > <???> @ 0x14091e11c\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=1\n__int64 __fastcall GameStatsManager::unlockOnlineChest(__int64 a1, __int64 a2)\n{\n  __int64 v4; // rax\n  __int64 v5; // rsi\n  __int64 v6; // rbx\n  struct cocos2d::CCString *v7; // rax\n  void **v8; // rax\n  _BYTE v10[32]; // [rsp+28h] [rbp-70h] BYREF\n  _BYTE v11[32]; // [rsp+48h] [rbp-50h] BYREF\n  __int64 v12; // [rsp+68h] [rbp-30h]\n\n  v12 = a2;\n  v4 = sub_14003F4F0((__int64)v10, a2);\n  v5 = GameStatsManager::unlockSpecialChest(a1, v4);\n  if ( v5 )\n  {\n    v6 = *(_QWORD *)(a1 + 904);\n    v7 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, 1);\n    cocos2d::CCDictionary::setObject(v6, v7, a2);\n    v8 = (void **)sub_14003F4F0((__int64)v11, a2);\n    GameStatsManager::linkSpecialChestUnlocks(a1, v5, v8);\n  }\n  sub_14003D310(a2);\n  return v5;\n}", "assembly": "; \n; GameStatsManager::unlockOnlineChest from 0x1402eeb30 to 0x1402eebe5 (181 bytes)\n; \n; 4 xrefs:\n; > GameStatsManager::completedDailyLevel @ 0x1402e7008\n; > NotificationsPage::notificationRewardFinished @ 0x140478d83\n; > SecretLayer5::claimOnlineReward @ 0x14058c150\n; > <???> @ 0x14091e11c\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, 0x1402eeb30\npush    rbp                                                            ; +0x5, 0x1402eeb35\npush    rsi                                                            ; +0x6, 0x1402eeb36\npush    rdi                                                            ; +0x7, 0x1402eeb37\nsub     rsp, 80h                                                       ; +0x8, 0x1402eeb38\nmov     rax, cs:__security_cookie                                      ; +0xf, 0x1402eeb3f\nxor     rax, rsp                                                       ; +0x16, 0x1402eeb46\nmov     [rsp+98h+var_28], rax                                          ; +0x19, 0x1402eeb49\nmov     rdi, rdx                                                       ; +0x1e, 0x1402eeb4e\nmov     rbp, rcx                                                       ; +0x21, 0x1402eeb51\nmov     [rsp+98h+var_30], rdx                                          ; +0x24, 0x1402eeb54\nlea     rcx, [rsp+98h+var_70]                                          ; +0x29, 0x1402eeb59\ncall    sub_14003F4F0                                                  ; +0x2e, 0x1402eeb5e\nmov     rdx, rax                                                       ; +0x33, 0x1402eeb63\nmov     rcx, rbp                                                       ; +0x36, 0x1402eeb66\ncall    GameStatsManager__unlockSpecialChest                           ; +0x39, 0x1402eeb69\nmov     rsi, rax                                                       ; +0x3e, 0x1402eeb6e\ntest    rax, rax                                                       ; +0x41, 0x1402eeb71\njz      short loc_1402EEBBA                                            ; +0x44, 0x1402eeb74\nmov     rbx, [rbp+388h]                                                ; +0x46, 0x1402eeb76\nmov     edx, 1                                                         ; +0x4d, 0x1402eeb7d\nlea     rcx, word_1406ED6F8                                            ; +0x52, 0x1402eeb82\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x59, 0x1402eeb89\nmov     rdx, rax                                                       ; +0x5f, 0x1402eeb8f\nmov     r8, rdi                                                        ; +0x62, 0x1402eeb92\nmov     rcx, rbx                                                       ; +0x65, 0x1402eeb95\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 &) ; +0x68, 0x1402eeb98\nmov     rdx, rdi                                                       ; +0x6e, 0x1402eeb9e\nlea     rcx, [rsp+98h+var_50]                                          ; +0x71, 0x1402eeba1\ncall    sub_14003F4F0                                                  ; +0x76, 0x1402eeba6\nmov     r8, rax                                                        ; +0x7b, 0x1402eebab\nmov     rdx, rsi                                                       ; +0x7e, 0x1402eebae\nmov     rcx, rbp                                                       ; +0x81, 0x1402eebb1\ncall    GameStatsManager__linkSpecialChestUnlocks                      ; +0x84, 0x1402eebb4\nnop                                                                    ; +0x89, 0x1402eebb9\nmov     rcx, rdi                                                       ; +0x8a, 0x1402eebba\ncall    sub_14003D310                                                  ; +0x8d, 0x1402eebbd\nmov     rax, rsi                                                       ; +0x92, 0x1402eebc2\nmov     rcx, [rsp+98h+var_28]                                          ; +0x95, 0x1402eebc5\nxor     rcx, rsp; StackCookie                                          ; +0x9a, 0x1402eebca\ncall    __security_check_cookie                                        ; +0x9d, 0x1402eebcd\nmov     rbx, [rsp+98h+arg_10]                                          ; +0xa2, 0x1402eebd2\nadd     rsp, 80h                                                       ; +0xaa, 0x1402eebda\npop     rdi                                                            ; +0xb1, 0x1402eebe1\npop     rsi                                                            ; +0xb2, 0x1402eebe2\npop     rbp                                                            ; +0xb3, 0x1402eebe3\nretn                                                                   ; +0xb4, 0x1402eebe4", "xrefs": ["GameStatsManager::completedDailyLevel @ 0x1402e7008", "NotificationsPage::notificationRewardFinished @ 0x140478d83", "SecretLayer5::claimOnlineReward @ 0x14058c150", "<???> @ 0x14091e11c"], "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"}