{"type": "func", "start": 5371823184, "end": 5371823535, "name": "GameStatsManager::removeErrorFromSpecialChests", "pseudocode": "// \n// GameStatsManager::removeErrorFromSpecialChests from 0x1402f8450 to 0x1402f85af (351 bytes)\n// \n// 3 xrefs:\n// > GameStatsManager::recountSpecialStats @ 0x1402e8058\n// > GameStatsManager::dataLoaded @ 0x1402f8147\n// > <???> @ 0x14091e1a0\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:30:05 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nunsigned int __fastcall GameStatsManager::removeErrorFromSpecialChests(__int64 a1)\n{\n  cocos2d::CCArray *v2; // rsi\n  unsigned int v3; // ebx\n  unsigned int result; // eax\n  cocos2d::CCString *v5; // rax\n  const char *CString; // rax\n  size_t v7; // r8\n  void *v8; // rcx\n  __int128 v9; // [rsp+30h] [rbp-38h] BYREF\n  __int128 v10; // [rsp+40h] [rbp-28h]\n\n  GameStatsManager::processOnlineChests(a1);\n  v2 = cocos2d::CCDictionary::allKeys(*(cocos2d::CCDictionary **)(a1 + 888));\n  v3 = 0;\n  result = cocos2d::CCArray::count(v2);\n  if ( result )\n  {\n    do\n    {\n      v5 = cocos2d::CCArray::stringAtIndex(v2, v3);\n      CString = cocos2d::CCString::getCString(v5);\n      v9 = 0;\n      v10 = 0;\n      v7 = -1;\n      do\n        ++v7;\n      while ( CString[v7] );\n      sub_14003D230(&v9, CString, v7);\n      if ( !cocos2d::CCDictionary::objectForKey(*(_QWORD *)(a1 + 368), &v9)\n        && !cocos2d::CCDictionary::objectForKey(*(_QWORD *)(a1 + 904), &v9) )\n      {\n        cocos2d::CCDictionary::removeObjectForKey(*(_QWORD *)(a1 + 888), &v9);\n      }\n      if ( *((_QWORD *)&v10 + 1) > 0xFu )\n      {\n        v8 = (void *)v9;\n        if ( (unsigned __int64)(*((_QWORD *)&v10 + 1) + 1LL) >= 0x1000 )\n        {\n          v8 = *(void **)(v9 - 8);\n          if ( (unsigned __int64)(v9 - (_QWORD)v8 - 8) > 0x1F )\n            invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n        }\n        j_j_free(v8);\n      }\n      ++v3;\n      result = cocos2d::CCArray::count(v2);\n    }\n    while ( v3 < result );\n  }\n  return result;\n}", "assembly": "; \n; GameStatsManager::removeErrorFromSpecialChests from 0x1402f8450 to 0x1402f85af (351 bytes)\n; \n; 3 xrefs:\n; > GameStatsManager::recountSpecialStats @ 0x1402e8058\n; > GameStatsManager::dataLoaded @ 0x1402f8147\n; > <???> @ 0x14091e1a0\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:30:05 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1402f8450\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x1402f8455\npush    rdi                                                            ; +0xa, 0x1402f845a\nsub     rsp, 60h                                                       ; +0xb, 0x1402f845b\nmov     rax, cs:__security_cookie                                      ; +0xf, 0x1402f845f\nxor     rax, rsp                                                       ; +0x16, 0x1402f8466\nmov     [rsp+68h+var_18], rax                                          ; +0x19, 0x1402f8469\nmov     rdi, rcx                                                       ; +0x1e, 0x1402f846e\ncall    GameStatsManager__processOnlineChests                          ; +0x21, 0x1402f8471\nmov     rcx, [rdi+378h]                                                ; +0x26, 0x1402f8476\ncall    cs:?allKeys@CCDictionary@cocos2d@@QEAAPEAVCCArray@2@XZ; cocos2d::CCDictionary::allKeys(void) ; +0x2d, 0x1402f847d\nmov     rsi, rax                                                       ; +0x33, 0x1402f8483\nxor     ebx, ebx                                                       ; +0x36, 0x1402f8486\nmov     rcx, rax                                                       ; +0x38, 0x1402f8488\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x3b, 0x1402f848b\ntest    eax, eax                                                       ; +0x41, 0x1402f8491\njz      loc_1402F8575                                                  ; +0x43, 0x1402f8493\nnop     dword ptr [rax+00000000h]                                      ; +0x49, 0x1402f8499\nmov     edx, ebx                                                       ; +0x50, 0x1402f84a0\nmov     rcx, rsi                                                       ; +0x52, 0x1402f84a2\ncall    cs:?stringAtIndex@CCArray@cocos2d@@QEAAPEAVCCString@2@I@Z; cocos2d::CCArray::stringAtIndex(uint) ; +0x55, 0x1402f84a5\nmov     rcx, rax                                                       ; +0x5b, 0x1402f84ab\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x5e, 0x1402f84ae\nxorps   xmm0, xmm0                                                     ; +0x64, 0x1402f84b4\nmovups  [rsp+68h+var_38], xmm0                                         ; +0x67, 0x1402f84b7\nxorps   xmm1, xmm1                                                     ; +0x6c, 0x1402f84bc\nmovdqu  [rsp+68h+var_28], xmm1                                         ; +0x6f, 0x1402f84bf\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x75, 0x1402f84c5\nnop     dword ptr [rax+00h]                                            ; +0x7c, 0x1402f84cc\ninc     r8                                                             ; +0x80, 0x1402f84d0\ncmp     byte ptr [rax+r8], 0                                           ; +0x83, 0x1402f84d3\njnz     short loc_1402F84D0                                            ; +0x88, 0x1402f84d8\nmov     rdx, rax                                                       ; +0x8a, 0x1402f84da\nlea     rcx, [rsp+68h+var_38]                                          ; +0x8d, 0x1402f84dd\ncall    sub_14003D230                                                  ; +0x92, 0x1402f84e2\nnop                                                                    ; +0x97, 0x1402f84e7\nlea     rdx, [rsp+68h+var_38]                                          ; +0x98, 0x1402f84e8\nmov     rcx, [rdi+170h]                                                ; +0x9d, 0x1402f84ed\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 &) ; +0xa4, 0x1402f84f4\ntest    rax, rax                                                       ; +0xaa, 0x1402f84fa\njnz     short loc_1402F8529                                            ; +0xad, 0x1402f84fd\nlea     rdx, [rsp+68h+var_38]                                          ; +0xaf, 0x1402f84ff\nmov     rcx, [rdi+388h]                                                ; +0xb4, 0x1402f8504\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 &) ; +0xbb, 0x1402f850b\ntest    rax, rax                                                       ; +0xc1, 0x1402f8511\njnz     short loc_1402F8529                                            ; +0xc4, 0x1402f8514\nlea     rdx, [rsp+68h+var_38]                                          ; +0xc6, 0x1402f8516\nmov     rcx, [rdi+378h]                                                ; +0xcb, 0x1402f851b\ncall    cs:?removeObjectForKey@CCDictionary@cocos2d@@QEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::removeObjectForKey(std::string const &) ; +0xd2, 0x1402f8522\nnop                                                                    ; +0xd8, 0x1402f8528\nmov     rdx, qword ptr [rsp+68h+var_28+8]                              ; +0xd9, 0x1402f8529\ncmp     rdx, 0Fh                                                       ; +0xde, 0x1402f852e\njbe     short loc_1402F8562                                            ; +0xe2, 0x1402f8532\ninc     rdx                                                            ; +0xe4, 0x1402f8534\nmov     rcx, qword ptr [rsp+68h+var_38]                                ; +0xe7, 0x1402f8537\nmov     rax, rcx                                                       ; +0xec, 0x1402f853c\ncmp     rdx, 1000h                                                     ; +0xef, 0x1402f853f\njb      short loc_1402F855D                                            ; +0xf6, 0x1402f8546\nadd     rdx, 27h ; '''                                                 ; +0xf8, 0x1402f8548\nmov     rcx, [rcx-8]; Block                                            ; +0xfc, 0x1402f854c\nsub     rax, rcx                                                       ; +0x100, 0x1402f8550\nsub     rax, 8                                                         ; +0x103, 0x1402f8553\ncmp     rax, 1Fh                                                       ; +0x107, 0x1402f8557\nja      short loc_1402F8595                                            ; +0x10b, 0x1402f855b\ncall    j_j_free                                                       ; +0x10d, 0x1402f855d\ninc     ebx                                                            ; +0x112, 0x1402f8562\nmov     rcx, rsi                                                       ; +0x114, 0x1402f8564\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x117, 0x1402f8567\ncmp     ebx, eax                                                       ; +0x11d, 0x1402f856d\njb      loc_1402F84A0                                                  ; +0x11f, 0x1402f856f\nmov     rcx, [rsp+68h+var_18]                                          ; +0x125, 0x1402f8575\nxor     rcx, rsp; StackCookie                                          ; +0x12a, 0x1402f857a\ncall    __security_check_cookie                                        ; +0x12d, 0x1402f857d\nmov     rbx, [rsp+68h+arg_8]                                           ; +0x132, 0x1402f8582\nmov     rsi, [rsp+68h+arg_10]                                          ; +0x137, 0x1402f8587\nadd     rsp, 60h                                                       ; +0x13f, 0x1402f858f\npop     rdi                                                            ; +0x143, 0x1402f8593\nretn                                                                   ; +0x144, 0x1402f8594\nmov     [rsp+68h+Reserved], 0; Reserved                                ; +0x145, 0x1402f8595\nxor     r9d, r9d; LineNo                                               ; +0x14e, 0x1402f859e\nxor     r8d, r8d; FileName                                             ; +0x151, 0x1402f85a1\nxor     edx, edx; FunctionName                                         ; +0x154, 0x1402f85a4\nxor     ecx, ecx; Expression                                           ; +0x156, 0x1402f85a6\ncall    cs:_invoke_watson                                              ; +0x158, 0x1402f85a8\ndb 0CCh                                                                ; +0x15e, 0x1402f85ae", "xrefs": ["GameStatsManager::recountSpecialStats @ 0x1402e8058", "GameStatsManager::dataLoaded @ 0x1402f8147", "<???> @ 0x14091e1a0"], "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"}