{"type": "func", "start": 5370934192, "end": 5370934614, "name": "GameLevelManager::getCompletedLevels", "pseudocode": "// \n// GameLevelManager::getCompletedLevels from 0x14021f3b0 to 0x14021f556 (422 bytes)\n// \n// 3 xrefs:\n// > GameLevelManager::getOnlineLevels @ 0x14022aec4\n// > GameLevelManager::submitUserInfo @ 0x140260bb6\n// > <???> @ 0x14091bb30\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:28:24 +0000\n// \n\n// Hidden C++ exception states: #wind=1\ncocos2d::CCArray *__fastcall GameLevelManager::getCompletedLevels(__int64 a1, char a2)\n{\n  cocos2d::CCArray *v4; // rbp\n  cocos2d::CCArray *v5; // rsi\n  int v6; // edi\n  __m128i si128; // xmm6\n  unsigned int v8; // eax\n  cocos2d::CCString *v9; // rax\n  const char *CString; // rax\n  size_t v11; // r8\n  struct cocos2d::CCObject *v12; // rbx\n  void *v13; // rcx\n  __int128 v15; // [rsp+30h] [rbp-58h] BYREF\n  __m128i v16; // [rsp+40h] [rbp-48h]\n\n  v4 = (cocos2d::CCArray *)cocos2d::CCArray::create(a1);\n  v5 = cocos2d::CCDictionary::allKeys(*(cocos2d::CCDictionary **)(a1 + 856));\n  v6 = 0;\n  if ( cocos2d::CCArray::count(v5) )\n  {\n    si128 = _mm_load_si128((const __m128i *)&Size);\n    while ( 1 )\n    {\n      v8 = cocos2d::CCArray::count(v5);\n      v9 = cocos2d::CCArray::objectAtIndex(v5, v8 + ~v6);\n      CString = cocos2d::CCString::getCString(v9);\n      v15 = 0;\n      v16 = 0;\n      v11 = -1;\n      do\n        ++v11;\n      while ( CString[v11] );\n      sub_14003D230(&v15, CString, v11);\n      v12 = (struct cocos2d::CCObject *)cocos2d::CCDictionary::objectForKey(*(_QWORD *)(a1 + 856), &v15);\n      if ( v16.m128i_i64[1] > 0xFuLL )\n      {\n        v13 = (void *)v15;\n        if ( (unsigned __int64)(v16.m128i_i64[1] + 1) >= 0x1000 )\n        {\n          v13 = *(void **)(v15 - 8);\n          if ( (unsigned __int64)(v15 - (_QWORD)v13 - 8) > 0x1F )\n            invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n        }\n        j_j_free(v13);\n      }\n      v16 = si128;\n      LOBYTE(v15) = 0;\n      if ( a2 )\n        break;\n      if ( *((_DWORD *)v12 + 233) - *((_DWORD *)v12 + 232) >= 100 )\n        goto LABEL_13;\nLABEL_14:\n      if ( ++v6 >= cocos2d::CCArray::count(v5) )\n        return v4;\n    }\n    if ( *((_DWORD *)v12 + 234) - *((_DWORD *)v12 + 235) < 100 )\n      goto LABEL_14;\nLABEL_13:\n    cocos2d::CCArray::addObject(v4, v12);\n    goto LABEL_14;\n  }\n  return v4;\n}", "assembly": "; \n; GameLevelManager::getCompletedLevels from 0x14021f3b0 to 0x14021f556 (422 bytes)\n; \n; 3 xrefs:\n; > GameLevelManager::getOnlineLevels @ 0x14022aec4\n; > GameLevelManager::submitUserInfo @ 0x140260bb6\n; > <???> @ 0x14091bb30\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:28:24 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x14021f3b0\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x14021f3b5\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x14021f3ba\npush    rdi                                                            ; +0xf, 0x14021f3bf\npush    r14                                                            ; +0x10, 0x14021f3c0\npush    r15                                                            ; +0x12, 0x14021f3c2\nsub     rsp, 70h                                                       ; +0x14, 0x14021f3c4\nmovaps  [rsp+88h+var_28], xmm6                                         ; +0x18, 0x14021f3c8\nmov     rax, cs:__security_cookie                                      ; +0x1d, 0x14021f3cd\nxor     rax, rsp                                                       ; +0x24, 0x14021f3d4\nmov     [rsp+88h+var_38], rax                                          ; +0x27, 0x14021f3d7\nmovzx   r14d, dl                                                       ; +0x2c, 0x14021f3dc\nmov     r15, rcx                                                       ; +0x30, 0x14021f3e0\ncall    cs:?create@CCArray@cocos2d@@SAPEAV12@XZ; cocos2d::CCArray::create(void) ; +0x33, 0x14021f3e3\nmov     rbp, rax                                                       ; +0x39, 0x14021f3e9\nmov     rcx, [r15+358h]                                                ; +0x3c, 0x14021f3ec\ncall    cs:?allKeys@CCDictionary@cocos2d@@QEAAPEAVCCArray@2@XZ; cocos2d::CCDictionary::allKeys(void) ; +0x43, 0x14021f3f3\nmov     rsi, rax                                                       ; +0x49, 0x14021f3f9\nxor     edi, edi                                                       ; +0x4c, 0x14021f3fc\nmov     rcx, rax                                                       ; +0x4e, 0x14021f3fe\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x51, 0x14021f401\ntest    eax, eax                                                       ; +0x57, 0x14021f407\njz      loc_14021F50D                                                  ; +0x59, 0x14021f409\nmovdqa  xmm6, cs:Size                                                  ; +0x5f, 0x14021f40f\nmov     rcx, rsi                                                       ; +0x67, 0x14021f417\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x6a, 0x14021f41a\nmov     edx, edi                                                       ; +0x70, 0x14021f420\nnot     edx                                                            ; +0x72, 0x14021f422\nadd     edx, eax                                                       ; +0x74, 0x14021f424\nmov     rcx, rsi                                                       ; +0x76, 0x14021f426\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x79, 0x14021f429\nmov     rcx, rax                                                       ; +0x7f, 0x14021f42f\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x82, 0x14021f432\nxorps   xmm0, xmm0                                                     ; +0x88, 0x14021f438\nmovups  [rsp+88h+var_58], xmm0                                         ; +0x8b, 0x14021f43b\nxorps   xmm1, xmm1                                                     ; +0x90, 0x14021f440\nmovdqu  [rsp+88h+var_48], xmm1                                         ; +0x93, 0x14021f443\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x99, 0x14021f449\ninc     r8                                                             ; +0xa0, 0x14021f450\ncmp     byte ptr [rax+r8], 0                                           ; +0xa3, 0x14021f453\njnz     short loc_14021F450                                            ; +0xa8, 0x14021f458\nmov     rdx, rax                                                       ; +0xaa, 0x14021f45a\nlea     rcx, [rsp+88h+var_58]                                          ; +0xad, 0x14021f45d\ncall    sub_14003D230                                                  ; +0xb2, 0x14021f462\nnop                                                                    ; +0xb7, 0x14021f467\nlea     rdx, [rsp+88h+var_58]                                          ; +0xb8, 0x14021f468\nmov     rcx, [r15+358h]                                                ; +0xbd, 0x14021f46d\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 &) ; +0xc4, 0x14021f474\nmov     rbx, rax                                                       ; +0xca, 0x14021f47a\nmov     rdx, qword ptr [rsp+88h+var_48+8]                              ; +0xcd, 0x14021f47d\ncmp     rdx, 0Fh                                                       ; +0xd2, 0x14021f482\njbe     short loc_14021F4BA                                            ; +0xd6, 0x14021f486\ninc     rdx                                                            ; +0xd8, 0x14021f488\nmov     rcx, qword ptr [rsp+88h+var_58]                                ; +0xdb, 0x14021f48b\nmov     r8, rcx                                                        ; +0xe0, 0x14021f490\ncmp     rdx, 1000h                                                     ; +0xe3, 0x14021f493\njb      short loc_14021F4B5                                            ; +0xea, 0x14021f49a\nadd     rdx, 27h ; '''                                                 ; +0xec, 0x14021f49c\nmov     rcx, [rcx-8]; Block                                            ; +0xf0, 0x14021f4a0\nsub     r8, rcx                                                        ; +0xf4, 0x14021f4a4\nsub     r8, 8                                                          ; +0xf7, 0x14021f4a7\ncmp     r8, 1Fh                                                        ; +0xfb, 0x14021f4ab\nja      loc_14021F53C                                                  ; +0xff, 0x14021f4af\ncall    j_j_free                                                       ; +0x105, 0x14021f4b5\nmovdqu  [rsp+88h+var_48], xmm6                                         ; +0x10a, 0x14021f4ba\nmov     byte ptr [rsp+88h+var_58], 0                                   ; +0x110, 0x14021f4c0\ntest    r14b, r14b                                                     ; +0x115, 0x14021f4c5\njz      short loc_14021F4DD                                            ; +0x118, 0x14021f4c8\nmov     eax, [rbx+3A8h]                                                ; +0x11a, 0x14021f4ca\nsub     eax, [rbx+3ACh]                                                ; +0x120, 0x14021f4d0\ncmp     eax, 64h ; 'd'                                                 ; +0x126, 0x14021f4d6\njge     short loc_14021F4EE                                            ; +0x129, 0x14021f4d9\njmp     short loc_14021F4FA                                            ; +0x12b, 0x14021f4db\nmov     eax, [rbx+3A4h]                                                ; +0x12d, 0x14021f4dd\nsub     eax, [rbx+3A0h]                                                ; +0x133, 0x14021f4e3\ncmp     eax, 64h ; 'd'                                                 ; +0x139, 0x14021f4e9\njl      short loc_14021F4FA                                            ; +0x13c, 0x14021f4ec\nmov     rdx, rbx                                                       ; +0x13e, 0x14021f4ee\nmov     rcx, rbp                                                       ; +0x141, 0x14021f4f1\ncall    cs:?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x144, 0x14021f4f4\ninc     edi                                                            ; +0x14a, 0x14021f4fa\nmov     rcx, rsi                                                       ; +0x14c, 0x14021f4fc\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x14f, 0x14021f4ff\ncmp     edi, eax                                                       ; +0x155, 0x14021f505\njb      loc_14021F417                                                  ; +0x157, 0x14021f507\nmov     rax, rbp                                                       ; +0x15d, 0x14021f50d\nmov     rcx, [rsp+88h+var_38]                                          ; +0x160, 0x14021f510\nxor     rcx, rsp; StackCookie                                          ; +0x165, 0x14021f515\ncall    __security_check_cookie                                        ; +0x168, 0x14021f518\nlea     r11, [rsp+88h+var_18]                                          ; +0x16d, 0x14021f51d\nmov     rbx, [r11+28h]                                                 ; +0x172, 0x14021f522\nmov     rbp, [r11+30h]                                                 ; +0x176, 0x14021f526\nmov     rsi, [r11+38h]                                                 ; +0x17a, 0x14021f52a\nmovaps  xmm6, [rsp+88h+var_28]                                         ; +0x17e, 0x14021f52e\nmov     rsp, r11                                                       ; +0x183, 0x14021f533\npop     r15                                                            ; +0x186, 0x14021f536\npop     r14                                                            ; +0x188, 0x14021f538\npop     rdi                                                            ; +0x18a, 0x14021f53a\nretn                                                                   ; +0x18b, 0x14021f53b\nmov     [rsp+88h+Reserved], 0; Reserved                                ; +0x18c, 0x14021f53c\nxor     r9d, r9d; LineNo                                               ; +0x195, 0x14021f545\nxor     r8d, r8d; FileName                                             ; +0x198, 0x14021f548\nxor     edx, edx; FunctionName                                         ; +0x19b, 0x14021f54b\nxor     ecx, ecx; Expression                                           ; +0x19d, 0x14021f54d\ncall    cs:_invoke_watson                                              ; +0x19f, 0x14021f54f\ndb 0CCh                                                                ; +0x1a5, 0x14021f555", "xrefs": ["GameLevelManager::getOnlineLevels @ 0x14022aec4", "GameLevelManager::submitUserInfo @ 0x140260bb6", "<???> @ 0x14091bb30"], "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"}