{"type": "func", "start": 5369279136, "end": 5369279633, "name": "GameManager::syncPlatformAchievements", "pseudocode": "// \n// GameManager::syncPlatformAchievements from 0x14008b2a0 to 0x14008b491 (497 bytes)\n// \n// 3 xrefs:\n// > GameManager::update @ 0x140286a6c\n// > <???> @ 0x140912818\n// > <???> @ 0x140912824\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:25:59 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nvoid __fastcall GameManager::syncPlatformAchievements(__int64 a1)\n{\n  cocos2d::CCArray *v1; // rbp\n  int v2; // esi\n  unsigned int v3; // ebx\n  __m128i si128; // xmm6\n  __m128i v5; // xmm7\n  struct cocos2d::CCObject *v6; // rax\n  cocos2d::CCString *v7; // rax\n  const char *CString; // rdi\n  void *v9; // rcx\n  __int64 v10; // rax\n  _QWORD *v11; // rax\n  _QWORD *v12; // rax\n  _QWORD *v13; // rax\n  _BYTE v14[8]; // [rsp+30h] [rbp-58h] BYREF\n  _QWORD v15[2]; // [rsp+38h] [rbp-50h] BYREF\n  __m128i v16; // [rsp+48h] [rbp-40h]\n\n  if ( *(_BYTE *)(a1 + 384) )\n  {\n    if ( !*(_BYTE *)(a1 + 386) )\n    {\n      *(_BYTE *)(a1 + 386) = 1;\n      v1 = *(cocos2d::CCArray **)(AchievementManager::sharedState() + 320);\n      v2 = 0;\n      v3 = 0;\n      if ( cocos2d::CCArray::count(v1) )\n      {\n        si128 = _mm_load_si128((const __m128i *)&Size);\n        v5 = _mm_load_si128((const __m128i *)&xmmword_1408365B0);\n        do\n        {\n          v6 = cocos2d::CCArray::objectAtIndex(v1, v3);\n          v15[1] = 29285;\n          v16 = v5;\n          v15[0] = 0x696669746E656469LL;\n          v7 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(v6, v15);\n          CString = cocos2d::CCString::getCString(v7);\n          if ( v16.m128i_i64[1] > 0xFuLL )\n          {\n            v9 = (void *)v15[0];\n            if ( (unsigned __int64)(v16.m128i_i64[1] + 1) >= 0x1000 )\n            {\n              v9 = *(void **)(v15[0] - 8LL);\n              if ( (unsigned __int64)(v15[0] - (_QWORD)v9 - 8LL) > 0x1F )\n                invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n            }\n            j_j_free(v9);\n          }\n          v16 = si128;\n          LOBYTE(v15[0]) = 0;\n          v10 = AchievementManager::sharedState();\n          if ( (int)AchievementManager::percentForAchievement(v10, (__int64)CString) >= 100 )\n          {\n            v14[0] = 0;\n            v11 = (_QWORD *)SteamInternal_ContextInit(&off_1408FE060);\n            if ( (*(unsigned __int8 (__fastcall **)(_QWORD, const char *, _BYTE *))(*(_QWORD *)*v11 + 40LL))(\n                   *v11,\n                   CString,\n                   v14) )\n            {\n              if ( !v14[0] )\n              {\n                v12 = (_QWORD *)SteamInternal_ContextInit(&off_1408FE060);\n                (*(void (__fastcall **)(_QWORD, const char *))(*(_QWORD *)*v12 + 48LL))(*v12, CString);\n                ++v2;\n              }\n            }\n          }\n          ++v3;\n        }\n        while ( v3 < cocos2d::CCArray::count(v1) );\n        if ( v2 > 0 )\n        {\n          v13 = (_QWORD *)SteamInternal_ContextInit(&off_1408FE060);\n          (*(void (__fastcall **)(_QWORD))(*(_QWORD *)*v13 + 72LL))(*v13);\n        }\n      }\n    }\n  }\n}", "assembly": "; \n; GameManager::syncPlatformAchievements from 0x14008b2a0 to 0x14008b491 (497 bytes)\n; \n; 3 xrefs:\n; > GameManager::update @ 0x140286a6c\n; > <???> @ 0x140912818\n; > <???> @ 0x140912824\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:25:59 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x14008b2a0\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x14008b2a5\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x14008b2aa\npush    rdi                                                            ; +0xf, 0x14008b2af\nsub     rsp, 80h                                                       ; +0x10, 0x14008b2b0\nmovaps  [rsp+88h+var_18], xmm6                                         ; +0x17, 0x14008b2b7\nmovaps  [rsp+88h+var_28], xmm7                                         ; +0x1c, 0x14008b2bc\nmov     rax, cs:__security_cookie                                      ; +0x21, 0x14008b2c1\nxor     rax, rsp                                                       ; +0x28, 0x14008b2c8\nmov     [rsp+88h+var_30], rax                                          ; +0x2b, 0x14008b2cb\ncmp     byte ptr [rcx+180h], 0                                         ; +0x30, 0x14008b2d0\njz      loc_14008B447                                                  ; +0x37, 0x14008b2d7\ncmp     byte ptr [rcx+182h], 0                                         ; +0x3d, 0x14008b2dd\njnz     loc_14008B447                                                  ; +0x44, 0x14008b2e4\nmov     byte ptr [rcx+182h], 1                                         ; +0x4a, 0x14008b2ea\ncall    AchievementManager__sharedState                                ; +0x51, 0x14008b2f1\nmov     rbp, [rax+140h]                                                ; +0x56, 0x14008b2f6\nxor     esi, esi                                                       ; +0x5d, 0x14008b2fd\nxor     ebx, ebx                                                       ; +0x5f, 0x14008b2ff\nmov     rcx, rbp                                                       ; +0x61, 0x14008b301\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x64, 0x14008b304\ntest    eax, eax                                                       ; +0x6a, 0x14008b30a\njz      loc_14008B447                                                  ; +0x6c, 0x14008b30c\nmovdqa  xmm6, cs:Size                                                  ; +0x72, 0x14008b312\nmovdqa  xmm7, cs:xmmword_1408365B0                                     ; +0x7a, 0x14008b31a\nmov     edx, ebx                                                       ; +0x82, 0x14008b322\nmov     rcx, rbp                                                       ; +0x84, 0x14008b324\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x87, 0x14008b327\nxorps   xmm0, xmm0                                                     ; +0x8d, 0x14008b32d\nmovups  [rsp+88h+var_50], xmm0                                         ; +0x90, 0x14008b330\nmovdqu  [rsp+88h+var_40], xmm7                                         ; +0x95, 0x14008b335\nmovsd   xmm0, cs:qword_1406EE0F8                                       ; +0x9b, 0x14008b33b\nmovsd   qword ptr [rsp+88h+var_50], xmm0                               ; +0xa3, 0x14008b343\nmovzx   ecx, cs:word_1406EE100                                         ; +0xa9, 0x14008b349\nmov     word ptr [rsp+88h+var_50+8], cx                                ; +0xb0, 0x14008b350\nmov     byte ptr [rsp+88h+var_50+0Ah], 0                               ; +0xb5, 0x14008b355\nlea     rdx, [rsp+88h+var_50]                                          ; +0xba, 0x14008b35a\nmov     rcx, rax                                                       ; +0xbf, 0x14008b35f\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 &) ; +0xc2, 0x14008b362\nmov     rcx, rax                                                       ; +0xc8, 0x14008b368\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0xcb, 0x14008b36b\nmov     rdi, rax                                                       ; +0xd1, 0x14008b371\nmov     rdx, qword ptr [rsp+88h+var_40+8]                              ; +0xd4, 0x14008b374\ncmp     rdx, 0Fh                                                       ; +0xd9, 0x14008b379\njbe     short loc_14008B3B1                                            ; +0xdd, 0x14008b37d\ninc     rdx                                                            ; +0xdf, 0x14008b37f\nmov     rcx, qword ptr [rsp+88h+var_50]                                ; +0xe2, 0x14008b382\nmov     r8, rcx                                                        ; +0xe7, 0x14008b387\ncmp     rdx, 1000h                                                     ; +0xea, 0x14008b38a\njb      short loc_14008B3AC                                            ; +0xf1, 0x14008b391\nadd     rdx, 27h ; '''                                                 ; +0xf3, 0x14008b393\nmov     rcx, [rcx-8]; Block                                            ; +0xf7, 0x14008b397\nsub     r8, rcx                                                        ; +0xfb, 0x14008b39b\nsub     r8, 8                                                          ; +0xfe, 0x14008b39e\ncmp     r8, 1Fh                                                        ; +0x102, 0x14008b3a2\nja      loc_14008B477                                                  ; +0x106, 0x14008b3a6\ncall    j_j_free                                                       ; +0x10c, 0x14008b3ac\nmovdqu  [rsp+88h+var_40], xmm6                                         ; +0x111, 0x14008b3b1\nmov     byte ptr [rsp+88h+var_50], 0                                   ; +0x117, 0x14008b3b7\ncall    AchievementManager__sharedState                                ; +0x11c, 0x14008b3bc\nmov     rcx, rax                                                       ; +0x121, 0x14008b3c1\nmov     rdx, rdi                                                       ; +0x124, 0x14008b3c4\ncall    AchievementManager__percentForAchievement                      ; +0x127, 0x14008b3c7\ncmp     eax, 64h ; 'd'                                                 ; +0x12c, 0x14008b3cc\njl      short loc_14008B41A                                            ; +0x12f, 0x14008b3cf\nmov     [rsp+88h+var_58], 0                                            ; +0x131, 0x14008b3d1\nlea     rcx, off_1408FE060                                             ; +0x136, 0x14008b3d6\ncall    cs:SteamInternal_ContextInit                                   ; +0x13d, 0x14008b3dd\nmov     rcx, [rax]                                                     ; +0x143, 0x14008b3e3\nmov     rax, [rcx]                                                     ; +0x146, 0x14008b3e6\nlea     r8, [rsp+88h+var_58]                                           ; +0x149, 0x14008b3e9\nmov     rdx, rdi                                                       ; +0x14e, 0x14008b3ee\ncall    qword ptr [rax+28h]                                            ; +0x151, 0x14008b3f1\ntest    al, al                                                         ; +0x154, 0x14008b3f4\njz      short loc_14008B41A                                            ; +0x156, 0x14008b3f6\ncmp     [rsp+88h+var_58], 0                                            ; +0x158, 0x14008b3f8\njnz     short loc_14008B41A                                            ; +0x15d, 0x14008b3fd\nlea     rcx, off_1408FE060                                             ; +0x15f, 0x14008b3ff\ncall    cs:SteamInternal_ContextInit                                   ; +0x166, 0x14008b406\nmov     rcx, [rax]                                                     ; +0x16c, 0x14008b40c\nmov     rax, [rcx]                                                     ; +0x16f, 0x14008b40f\nmov     rdx, rdi                                                       ; +0x172, 0x14008b412\ncall    qword ptr [rax+30h]                                            ; +0x175, 0x14008b415\ninc     esi                                                            ; +0x178, 0x14008b418\ninc     ebx                                                            ; +0x17a, 0x14008b41a\nmov     rcx, rbp                                                       ; +0x17c, 0x14008b41c\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x17f, 0x14008b41f\ncmp     ebx, eax                                                       ; +0x185, 0x14008b425\njb      loc_14008B322                                                  ; +0x187, 0x14008b427\ntest    esi, esi                                                       ; +0x18d, 0x14008b42d\njle     short loc_14008B447                                            ; +0x18f, 0x14008b42f\nlea     rcx, off_1408FE060                                             ; +0x191, 0x14008b431\ncall    cs:SteamInternal_ContextInit                                   ; +0x198, 0x14008b438\nmov     rcx, [rax]                                                     ; +0x19e, 0x14008b43e\nmov     rax, [rcx]                                                     ; +0x1a1, 0x14008b441\ncall    qword ptr [rax+48h]                                            ; +0x1a4, 0x14008b444\nmov     rcx, [rsp+88h+var_30]                                          ; +0x1a7, 0x14008b447\nxor     rcx, rsp; StackCookie                                          ; +0x1ac, 0x14008b44c\ncall    __security_check_cookie                                        ; +0x1af, 0x14008b44f\nlea     r11, [rsp+88h+var_8]                                           ; +0x1b4, 0x14008b454\nmov     rbx, [r11+18h]                                                 ; +0x1bc, 0x14008b45c\nmov     rbp, [r11+20h]                                                 ; +0x1c0, 0x14008b460\nmov     rsi, [r11+28h]                                                 ; +0x1c4, 0x14008b464\nmovaps  xmm6, [rsp+88h+var_18]                                         ; +0x1c8, 0x14008b468\nmovaps  xmm7, [rsp+88h+var_28]                                         ; +0x1cd, 0x14008b46d\nmov     rsp, r11                                                       ; +0x1d2, 0x14008b472\npop     rdi                                                            ; +0x1d5, 0x14008b475\nretn                                                                   ; +0x1d6, 0x14008b476\nmov     [rsp+88h+Reserved], 0; Reserved                                ; +0x1d7, 0x14008b477\nxor     r9d, r9d; LineNo                                               ; +0x1e0, 0x14008b480\nxor     r8d, r8d; FileName                                             ; +0x1e3, 0x14008b483\nxor     edx, edx; FunctionName                                         ; +0x1e6, 0x14008b486\nxor     ecx, ecx; Expression                                           ; +0x1e8, 0x14008b488\ncall    cs:_invoke_watson                                              ; +0x1ea, 0x14008b48a\ndb 0CCh                                                                ; +0x1f0, 0x14008b490", "xrefs": ["GameManager::update @ 0x140286a6c", "<???> @ 0x140912818", "<???> @ 0x140912824"], "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"}