{"type": "func", "start": 5371781664, "end": 5371781931, "name": "GameStatsManager::linkSpecialChestUnlocks", "pseudocode": "// \n// GameStatsManager::linkSpecialChestUnlocks from 0x1402ee220 to 0x1402ee32b (267 bytes)\n// \n// 4 xrefs:\n// > GameStatsManager::createSpecialChestItems @ 0x1402ee1ab\n// > GameStatsManager::unlockOnlineChest @ 0x1402eebb4\n// > GameStatsManager::processOnlineChests @ 0x1402f83a7\n// > <???> @ 0x14091e0b0\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:55 +0000\n// \n\n// Hidden C++ exception states: #wind=2\nvoid __fastcall GameStatsManager::linkSpecialChestUnlocks(__int64 a1, __int64 a2, void **a3)\n{\n  cocos2d::CCArray *v5; // rbp\n  unsigned int v6; // ebx\n  struct cocos2d::CCObject *v7; // rax\n  __int64 v8; // rcx\n  __int64 v9; // rdi\n  __int64 v10; // rax\n  void **v11; // rcx\n  void *v12; // rdx\n  _BYTE v13[16]; // [rsp+20h] [rbp-68h] BYREF\n  void **v14; // [rsp+30h] [rbp-58h]\n  _QWORD v15[4]; // [rsp+38h] [rbp-50h] BYREF\n\n  v14 = a3;\n  if ( a2 )\n  {\n    v5 = *(cocos2d::CCArray **)(a2 + 72);\n    if ( v5 )\n    {\n      v6 = 0;\n      if ( cocos2d::CCArray::count(*(cocos2d::CCArray **)(a2 + 72)) )\n      {\n        do\n        {\n          v7 = cocos2d::CCArray::objectAtIndex(v5, v6);\n          if ( *((_DWORD *)v7 + 14) == 9 )\n          {\n            GameStatsManager::getItemKey(v8, v15, *((_DWORD *)v7 + 16), *((_DWORD *)v7 + 15));\n            v9 = *(_QWORD *)(a1 + 376);\n            v10 = cocos2d::CCString::create(a3);\n            cocos2d::CCDictionary::setObject(v9, v10, v15);\n            v11 = (void **)(*(_QWORD *)sub_1402F9FD0(a1 + 448, v13, v15) + 48LL);\n            if ( v11 != a3 )\n            {\n              v12 = a3;\n              if ( (unsigned __int64)a3[3] > 0xF )\n                v12 = *a3;\n              sub_1400405A0(v11, v12, (size_t)a3[2]);\n            }\n            sub_14003D310((__int64)v15);\n          }\n          ++v6;\n        }\n        while ( v6 < cocos2d::CCArray::count(v5) );\n      }\n    }\n  }\n  sub_14003D310((__int64)a3);\n}", "assembly": "; \n; GameStatsManager::linkSpecialChestUnlocks from 0x1402ee220 to 0x1402ee32b (267 bytes)\n; \n; 4 xrefs:\n; > GameStatsManager::createSpecialChestItems @ 0x1402ee1ab\n; > GameStatsManager::unlockOnlineChest @ 0x1402eebb4\n; > GameStatsManager::processOnlineChests @ 0x1402f83a7\n; > <???> @ 0x14091e0b0\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:55 +0000\n; \npush    rbx                                                            ; +0x0, 0x1402ee220\npush    rbp                                                            ; +0x2, 0x1402ee222\npush    rsi                                                            ; +0x3, 0x1402ee223\npush    rdi                                                            ; +0x4, 0x1402ee224\npush    r14                                                            ; +0x5, 0x1402ee225\nsub     rsp, 60h                                                       ; +0x7, 0x1402ee227\nmov     rax, cs:__security_cookie                                      ; +0xb, 0x1402ee22b\nxor     rax, rsp                                                       ; +0x12, 0x1402ee232\nmov     [rsp+88h+var_30], rax                                          ; +0x15, 0x1402ee235\nmov     rsi, r8                                                        ; +0x1a, 0x1402ee23a\nmov     r14, rcx                                                       ; +0x1d, 0x1402ee23d\nmov     [rsp+88h+var_58], r8                                           ; +0x20, 0x1402ee240\ntest    rdx, rdx                                                       ; +0x25, 0x1402ee245\njz      loc_1402EE30B                                                  ; +0x28, 0x1402ee248\nmov     rbp, [rdx+48h]                                                 ; +0x2e, 0x1402ee24e\ntest    rbp, rbp                                                       ; +0x32, 0x1402ee252\njz      loc_1402EE30B                                                  ; +0x35, 0x1402ee255\nxor     ebx, ebx                                                       ; +0x3b, 0x1402ee25b\nmov     rcx, rbp                                                       ; +0x3d, 0x1402ee25d\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x40, 0x1402ee260\ntest    eax, eax                                                       ; +0x46, 0x1402ee266\njz      loc_1402EE30B                                                  ; +0x48, 0x1402ee268\nxchg    ax, ax                                                         ; +0x4e, 0x1402ee26e\nmov     edx, ebx                                                       ; +0x50, 0x1402ee270\nmov     rcx, rbp                                                       ; +0x52, 0x1402ee272\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x55, 0x1402ee275\ncmp     dword ptr [rax+38h], 9                                         ; +0x5b, 0x1402ee27b\njnz     short loc_1402EE2F8                                            ; +0x5f, 0x1402ee27f\nmov     r9d, [rax+3Ch]                                                 ; +0x61, 0x1402ee281\nmov     r8d, [rax+40h]                                                 ; +0x65, 0x1402ee285\nlea     rdx, [rsp+88h+var_50]                                          ; +0x69, 0x1402ee289\ncall    GameStatsManager__getItemKey                                   ; +0x6e, 0x1402ee28e\nnop                                                                    ; +0x73, 0x1402ee293\nmov     rdi, [r14+178h]                                                ; +0x74, 0x1402ee294\nmov     rcx, rsi                                                       ; +0x7b, 0x1402ee29b\ncall    cs:?create@CCString@cocos2d@@SAPEAV12@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCString::create(std::string const &) ; +0x7e, 0x1402ee29e\nmov     rdx, rax                                                       ; +0x84, 0x1402ee2a4\nlea     r8, [rsp+88h+var_50]                                           ; +0x87, 0x1402ee2a7\nmov     rcx, rdi                                                       ; +0x8c, 0x1402ee2ac\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 &) ; +0x8f, 0x1402ee2af\nlea     rcx, [r14+1C0h]                                                ; +0x95, 0x1402ee2b5\nlea     r8, [rsp+88h+var_50]                                           ; +0x9c, 0x1402ee2bc\nlea     rdx, [rsp+88h+var_68]                                          ; +0xa1, 0x1402ee2c1\ncall    sub_1402F9FD0                                                  ; +0xa6, 0x1402ee2c6\nmov     rcx, [rax]                                                     ; +0xab, 0x1402ee2cb\nadd     rcx, 30h ; '0'; void *                                         ; +0xae, 0x1402ee2ce\ncmp     rcx, rsi                                                       ; +0xb2, 0x1402ee2d2\njz      short loc_1402EE2EE                                            ; +0xb5, 0x1402ee2d5\nmov     rdx, rsi                                                       ; +0xb7, 0x1402ee2d7\ncmp     qword ptr [rsi+18h], 0Fh                                       ; +0xba, 0x1402ee2da\njbe     short loc_1402EE2E4                                            ; +0xbf, 0x1402ee2df\nmov     rdx, [rsi]; Src                                                ; +0xc1, 0x1402ee2e1\nmov     r8, [rsi+10h]; Size                                            ; +0xc4, 0x1402ee2e4\ncall    sub_1400405A0                                                  ; +0xc8, 0x1402ee2e8\nnop                                                                    ; +0xcd, 0x1402ee2ed\nlea     rcx, [rsp+88h+var_50]                                          ; +0xce, 0x1402ee2ee\ncall    sub_14003D310                                                  ; +0xd3, 0x1402ee2f3\ninc     ebx                                                            ; +0xd8, 0x1402ee2f8\nmov     rcx, rbp                                                       ; +0xda, 0x1402ee2fa\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xdd, 0x1402ee2fd\ncmp     ebx, eax                                                       ; +0xe3, 0x1402ee303\njb      loc_1402EE270                                                  ; +0xe5, 0x1402ee305\nmov     rcx, rsi                                                       ; +0xeb, 0x1402ee30b\ncall    sub_14003D310                                                  ; +0xee, 0x1402ee30e\nmov     rcx, [rsp+88h+var_30]                                          ; +0xf3, 0x1402ee313\nxor     rcx, rsp; StackCookie                                          ; +0xf8, 0x1402ee318\ncall    __security_check_cookie                                        ; +0xfb, 0x1402ee31b\nadd     rsp, 60h                                                       ; +0x100, 0x1402ee320\npop     r14                                                            ; +0x104, 0x1402ee324\npop     rdi                                                            ; +0x106, 0x1402ee326\npop     rsi                                                            ; +0x107, 0x1402ee327\npop     rbp                                                            ; +0x108, 0x1402ee328\npop     rbx                                                            ; +0x109, 0x1402ee329\nretn                                                                   ; +0x10a, 0x1402ee32a", "xrefs": ["GameStatsManager::createSpecialChestItems @ 0x1402ee1ab", "GameStatsManager::unlockOnlineChest @ 0x1402eebb4", "GameStatsManager::processOnlineChests @ 0x1402f83a7", "<???> @ 0x14091e0b0"], "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"}