{"type": "func", "start": 5371823536, "end": 5371824037, "name": "GameStatsManager::postLoadGameStats", "pseudocode": "// \n// GameStatsManager::postLoadGameStats from 0x1402f85b0 to 0x1402f87a5 (501 bytes)\n// \n// 3 xrefs:\n// > GameStatsManager::dataLoaded @ 0x1402f81c3\n// > GJAccountManager::onSyncAccountCompleted @ 0x14030941c\n// > <???> @ 0x14091e1ac\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=2\n__int64 __fastcall GameStatsManager::postLoadGameStats(__int64 a1, __int64 a2, __int64 a3)\n{\n  char v4; // bp\n  __int64 v5; // rdx\n  __int64 v6; // rcx\n  __int64 v7; // r8\n  int i; // edi\n  cocos2d::CCString *v9; // rax\n  const char *CString; // rax\n  size_t v11; // r8\n  __int128 *v12; // rdx\n  size_t v13; // r8\n  __int128 *v14; // rbx\n  cocos2d::CCString *v15; // rax\n  unsigned int v16; // eax\n  __int64 v17; // rcx\n  __int64 v18; // r8\n  void *v19; // rcx\n  __int64 v20; // rdx\n  void *v21; // rcx\n  __int64 result; // rax\n  __int128 v23; // [rsp+30h] [rbp-58h] BYREF\n  __int128 v24; // [rsp+40h] [rbp-48h]\n  __int128 v25; // [rsp+50h] [rbp-38h] BYREF\n  __int128 v26; // [rsp+60h] [rbp-28h]\n\n  v4 = *(_BYTE *)(AchievementManager::sharedState(a1, a2, a3) + 360);\n  *(_BYTE *)(AchievementManager::sharedState(v6, v5, v7) + 360) = 1;\n  for ( i = 1; i <= 44; ++i )\n  {\n    v9 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, (unsigned int)i);\n    CString = cocos2d::CCString::getCString(v9);\n    v23 = 0;\n    v24 = 0;\n    v11 = -1;\n    do\n      ++v11;\n    while ( CString[v11] );\n    sub_14003D230(&v23, CString, v11);\n    v12 = &v23;\n    if ( *((_QWORD *)&v24 + 1) > 0xFu )\n      v12 = (__int128 *)v23;\n    v25 = 0;\n    v26 = 0;\n    v13 = -1;\n    do\n      ++v13;\n    while ( *((_BYTE *)v12 + v13) );\n    sub_14003D230(&v25, v12, v13);\n    v14 = &v23;\n    if ( *((_QWORD *)&v24 + 1) > 0xFu )\n      v14 = (__int128 *)v23;\n    v15 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(a1 + 576), &v25);\n    v16 = cocos2d::CCString::intValue(v15);\n    GameStatsManager::setStat(a1, v14, v16);\n    if ( *((_QWORD *)&v26 + 1) > 0xFu )\n    {\n      v19 = (void *)v25;\n      if ( (unsigned __int64)(*((_QWORD *)&v26 + 1) + 1LL) >= 0x1000 )\n      {\n        v19 = *(void **)(v25 - 8);\n        if ( (unsigned __int64)(v25 - (_QWORD)v19 - 8) > 0x1F )\n          invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n      }\n      j_j_free(v19);\n    }\n    v20 = *((_QWORD *)&v24 + 1);\n    if ( *((_QWORD *)&v24 + 1) > 0xFu )\n    {\n      v21 = (void *)v23;\n      if ( (unsigned __int64)(*((_QWORD *)&v24 + 1) + 1LL) >= 0x1000 )\n      {\n        v21 = *(void **)(v23 - 8);\n        if ( (unsigned __int64)(v23 - (_QWORD)v21 - 8) > 0x1F )\n          invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n      }\n      j_j_free(v21);\n    }\n  }\n  result = AchievementManager::sharedState(v17, v20, v18);\n  *(_BYTE *)(result + 360) = v4;\n  return result;\n}", "assembly": "; \n; GameStatsManager::postLoadGameStats from 0x1402f85b0 to 0x1402f87a5 (501 bytes)\n; \n; 3 xrefs:\n; > GameStatsManager::dataLoaded @ 0x1402f81c3\n; > GJAccountManager::onSyncAccountCompleted @ 0x14030941c\n; > <???> @ 0x14091e1ac\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, 0x1402f85b0\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x1402f85b5\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x1402f85ba\npush    rdi                                                            ; +0xf, 0x1402f85bf\nsub     rsp, 80h                                                       ; +0x10, 0x1402f85c0\nmov     rax, cs:__security_cookie                                      ; +0x17, 0x1402f85c7\nxor     rax, rsp                                                       ; +0x1e, 0x1402f85ce\nmov     [rsp+88h+var_18], rax                                          ; +0x21, 0x1402f85d1\nmov     rsi, rcx                                                       ; +0x26, 0x1402f85d6\ncall    AchievementManager__sharedState                                ; +0x29, 0x1402f85d9\nmovzx   ebp, byte ptr [rax+168h]                                       ; +0x2e, 0x1402f85de\ncall    AchievementManager__sharedState                                ; +0x35, 0x1402f85e5\nmov     byte ptr [rax+168h], 1                                         ; +0x3a, 0x1402f85ea\nmov     edi, 1                                                         ; +0x41, 0x1402f85f1\nnop     word ptr [rax+rax+00000000h]                                   ; +0x46, 0x1402f85f6\nmov     edx, edi                                                       ; +0x50, 0x1402f8600\nlea     rcx, word_1406ED6F8                                            ; +0x52, 0x1402f8602\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x59, 0x1402f8609\nmov     rcx, rax                                                       ; +0x5f, 0x1402f860f\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x62, 0x1402f8612\nxorps   xmm0, xmm0                                                     ; +0x68, 0x1402f8618\nmovups  [rsp+88h+var_58], xmm0                                         ; +0x6b, 0x1402f861b\nxorps   xmm1, xmm1                                                     ; +0x70, 0x1402f8620\nmovdqu  [rsp+88h+var_48], xmm1                                         ; +0x73, 0x1402f8623\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x79, 0x1402f8629\ninc     r8                                                             ; +0x80, 0x1402f8630\ncmp     byte ptr [rax+r8], 0                                           ; +0x83, 0x1402f8633\njnz     short loc_1402F8630                                            ; +0x88, 0x1402f8638\nmov     rdx, rax                                                       ; +0x8a, 0x1402f863a\nlea     rcx, [rsp+88h+var_58]                                          ; +0x8d, 0x1402f863d\ncall    sub_14003D230                                                  ; +0x92, 0x1402f8642\nnop                                                                    ; +0x97, 0x1402f8647\nlea     rdx, [rsp+88h+var_58]                                          ; +0x98, 0x1402f8648\ncmp     qword ptr [rsp+88h+var_48+8], 0Fh                              ; +0x9d, 0x1402f864d\ncmova   rdx, qword ptr [rsp+88h+var_58]                                ; +0xa3, 0x1402f8653\nxorps   xmm0, xmm0                                                     ; +0xa9, 0x1402f8659\nmovups  [rsp+88h+var_38], xmm0                                         ; +0xac, 0x1402f865c\nxorps   xmm1, xmm1                                                     ; +0xb1, 0x1402f8661\nmovdqu  [rsp+88h+var_28], xmm1                                         ; +0xb4, 0x1402f8664\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0xba, 0x1402f866a\ninc     r8                                                             ; +0xc1, 0x1402f8671\ncmp     byte ptr [rdx+r8], 0                                           ; +0xc4, 0x1402f8674\njnz     short loc_1402F8671                                            ; +0xc9, 0x1402f8679\nlea     rcx, [rsp+88h+var_38]                                          ; +0xcb, 0x1402f867b\ncall    sub_14003D230                                                  ; +0xd0, 0x1402f8680\nnop                                                                    ; +0xd5, 0x1402f8685\nlea     rbx, [rsp+88h+var_58]                                          ; +0xd6, 0x1402f8686\ncmp     qword ptr [rsp+88h+var_48+8], 0Fh                              ; +0xdb, 0x1402f868b\ncmova   rbx, qword ptr [rsp+88h+var_58]                                ; +0xe1, 0x1402f8691\nlea     rdx, [rsp+88h+var_38]                                          ; +0xe7, 0x1402f8697\nmov     rcx, [rsi+240h]                                                ; +0xec, 0x1402f869c\ncall    cs:?valueForKey@CCDictionary@cocos2d@@QEAAPEBVCCString@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::valueForKey(std::string const &) ; +0xf3, 0x1402f86a3\nmov     rcx, rax                                                       ; +0xf9, 0x1402f86a9\ncall    cs:?intValue@CCString@cocos2d@@QEBAHXZ; cocos2d::CCString::intValue(void) ; +0xfc, 0x1402f86ac\nmov     r8d, eax                                                       ; +0x102, 0x1402f86b2\nmov     rdx, rbx                                                       ; +0x105, 0x1402f86b5\nmov     rcx, rsi                                                       ; +0x108, 0x1402f86b8\ncall    GameStatsManager__setStat                                      ; +0x10b, 0x1402f86bb\nnop                                                                    ; +0x110, 0x1402f86c0\nmov     rdx, qword ptr [rsp+88h+var_28+8]                              ; +0x111, 0x1402f86c1\ncmp     rdx, 0Fh                                                       ; +0x116, 0x1402f86c6\njbe     short loc_1402F86FB                                            ; +0x11a, 0x1402f86ca\ninc     rdx                                                            ; +0x11c, 0x1402f86cc\nmov     rcx, qword ptr [rsp+88h+var_38]                                ; +0x11f, 0x1402f86cf\nmov     rax, rcx                                                       ; +0x124, 0x1402f86d4\ncmp     rdx, 1000h                                                     ; +0x127, 0x1402f86d7\njb      short loc_1402F86F5                                            ; +0x12e, 0x1402f86de\nadd     rdx, 27h ; '''                                                 ; +0x130, 0x1402f86e0\nmov     rcx, [rcx-8]; Block                                            ; +0x134, 0x1402f86e4\nsub     rax, rcx                                                       ; +0x138, 0x1402f86e8\nsub     rax, 8                                                         ; +0x13b, 0x1402f86eb\ncmp     rax, 1Fh                                                       ; +0x13f, 0x1402f86ef\nja      short loc_1402F8771                                            ; +0x143, 0x1402f86f3\ncall    j_j_free                                                       ; +0x145, 0x1402f86f5\nnop                                                                    ; +0x14a, 0x1402f86fa\nmov     rdx, qword ptr [rsp+88h+var_48+8]                              ; +0x14b, 0x1402f86fb\ncmp     rdx, 0Fh                                                       ; +0x150, 0x1402f8700\njbe     short loc_1402F8734                                            ; +0x154, 0x1402f8704\ninc     rdx                                                            ; +0x156, 0x1402f8706\nmov     rcx, qword ptr [rsp+88h+var_58]                                ; +0x159, 0x1402f8709\nmov     rax, rcx                                                       ; +0x15e, 0x1402f870e\ncmp     rdx, 1000h                                                     ; +0x161, 0x1402f8711\njb      short loc_1402F872F                                            ; +0x168, 0x1402f8718\nadd     rdx, 27h ; '''                                                 ; +0x16a, 0x1402f871a\nmov     rcx, [rcx-8]; Block                                            ; +0x16e, 0x1402f871e\nsub     rax, rcx                                                       ; +0x172, 0x1402f8722\nsub     rax, 8                                                         ; +0x175, 0x1402f8725\ncmp     rax, 1Fh                                                       ; +0x179, 0x1402f8729\nja      short loc_1402F878B                                            ; +0x17d, 0x1402f872d\ncall    j_j_free                                                       ; +0x17f, 0x1402f872f\ninc     edi                                                            ; +0x184, 0x1402f8734\ncmp     edi, 2Ch ; ','                                                 ; +0x186, 0x1402f8736\njle     loc_1402F8600                                                  ; +0x189, 0x1402f8739\ncall    AchievementManager__sharedState                                ; +0x18f, 0x1402f873f\nmov     [rax+168h], bpl                                                ; +0x194, 0x1402f8744\nmov     rcx, [rsp+88h+var_18]                                          ; +0x19b, 0x1402f874b\nxor     rcx, rsp; StackCookie                                          ; +0x1a0, 0x1402f8750\ncall    __security_check_cookie                                        ; +0x1a3, 0x1402f8753\nlea     r11, [rsp+88h+var_8]                                           ; +0x1a8, 0x1402f8758\nmov     rbx, [r11+18h]                                                 ; +0x1b0, 0x1402f8760\nmov     rbp, [r11+20h]                                                 ; +0x1b4, 0x1402f8764\nmov     rsi, [r11+28h]                                                 ; +0x1b8, 0x1402f8768\nmov     rsp, r11                                                       ; +0x1bc, 0x1402f876c\npop     rdi                                                            ; +0x1bf, 0x1402f876f\nretn                                                                   ; +0x1c0, 0x1402f8770\nmov     [rsp+88h+Reserved], 0; Reserved                                ; +0x1c1, 0x1402f8771\nxor     r9d, r9d; LineNo                                               ; +0x1ca, 0x1402f877a\nxor     r8d, r8d; FileName                                             ; +0x1cd, 0x1402f877d\nxor     edx, edx; FunctionName                                         ; +0x1d0, 0x1402f8780\nxor     ecx, ecx; Expression                                           ; +0x1d2, 0x1402f8782\ncall    cs:_invoke_watson                                              ; +0x1d4, 0x1402f8784\ndb 90h                                                                 ; +0x1da, 0x1402f878a\nmov     [rsp+88h+Reserved], 0; Reserved                                ; +0x1db, 0x1402f878b\nxor     r9d, r9d; LineNo                                               ; +0x1e4, 0x1402f8794\nxor     r8d, r8d; FileName                                             ; +0x1e7, 0x1402f8797\nxor     edx, edx; FunctionName                                         ; +0x1ea, 0x1402f879a\nxor     ecx, ecx; Expression                                           ; +0x1ec, 0x1402f879c\ncall    cs:_invoke_watson                                              ; +0x1ee, 0x1402f879e\ndb 0CCh                                                                ; +0x1f4, 0x1402f87a4", "xrefs": ["GameStatsManager::dataLoaded @ 0x1402f81c3", "GJAccountManager::onSyncAccountCompleted @ 0x14030941c", "<???> @ 0x14091e1ac"], "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"}