{"type": "func", "start": 4295587692, "end": 4295587956, "name": "GameLevelManager::getCompletedLevels", "pseudocode": "// \n// GameLevelManager::getCompletedLevels from 0x10009776c to 0x100097874 (264 bytes)\n// \n// 2 xrefs:\n// > GameLevelManager::getOnlineLevels @ 0x10009d5ec\n// > GameLevelManager::submitUserInfo @ 0x1000a2b58\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\ncocos2d::CCArray *__fastcall GameLevelManager::getCompletedLevels(GameLevelManager *a1, bool a2)\n{\n  _BOOL4 v2; // w19\n  cocos2d::CCArray *v4; // x21\n  cocos2d::CCArray *v5; // x22\n  unsigned int v6; // w24\n  int v7; // w25\n  int v8; // w0\n  cocos2d::CCString *v9; // x0\n  char *CString; // x0\n  cocos2d::CCDictionary *m_onlineLevels; // x23\n  _DWORD *v12; // x23\n  void *__p[2]; // [xsp+8h] [xbp-58h] BYREF\n  char v15; // [xsp+1Fh] [xbp-41h]\n\n  v2 = a2;\n  v4 = (cocos2d::CCArray *)sub_10024A15C(a1);\n  v5 = cocos2d::CCDictionary::allKeys(a1->m_onlineLevels);\n  if ( (unsigned int)sub_10024A36C(v5) )\n  {\n    v6 = 0;\n    v7 = -1;\n    do\n    {\n      v8 = sub_10024A36C(v5);\n      v9 = (cocos2d::CCString *)sub_10024A388(v5, (unsigned int)(v8 + v7));\n      CString = (char *)cocos2d::CCString::getCString(v9);\n      m_onlineLevels = a1->m_onlineLevels;\n      sub_100009900(__p, CString);\n      v12 = (_DWORD *)cocos2d::CCDictionary::objectForKey_1(m_onlineLevels, __p);\n      if ( v15 < 0 )\n      {\n        operator delete(__p[0]);\n        if ( v2 )\n        {\nLABEL_5:\n          if ( v12[187] - v12[188] <= 99 )\n            goto LABEL_10;\nLABEL_9:\n          sub_10024A2D0(v4, v12);\n          goto LABEL_10;\n        }\n      }\n      else if ( v2 )\n      {\n        goto LABEL_5;\n      }\n      if ( v12[186] - v12[185] >= 100 )\n        goto LABEL_9;\nLABEL_10:\n      ++v6;\n      --v7;\n    }\n    while ( v6 < (unsigned int)sub_10024A36C(v5) );\n  }\n  return v4;\n}", "assembly": "; \n; GameLevelManager::getCompletedLevels from 0x10009776c to 0x100097874 (264 bytes)\n; \n; 2 xrefs:\n; > GameLevelManager::getOnlineLevels @ 0x10009d5ec\n; > GameLevelManager::submitUserInfo @ 0x1000a2b58\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nSUB             SP, SP, #0x70                                          ; +0x0, 0x10009776c\nSTP             X26, X25, [SP,#0x60+var_40]                            ; +0x4, 0x100097770\nSTP             X24, X23, [SP,#0x60+var_30]                            ; +0x8, 0x100097774\nSTP             X22, X21, [SP,#0x60+var_20]                            ; +0xc, 0x100097778\nSTP             X20, X19, [SP,#0x60+var_10]                            ; +0x10, 0x10009777c\nSTP             X29, X30, [SP,#0x60+var_s0]                            ; +0x14, 0x100097780\nADD             X29, SP, #0x60                                         ; +0x18, 0x100097784\nMOV             X19, X1                                                ; +0x1c, 0x100097788\nMOV             X20, X0                                                ; +0x20, 0x10009778c\nBL              sub_10024A15C                                          ; +0x24, 0x100097790\nMOV             X21, X0                                                ; +0x28, 0x100097794\nLDR             X0, [X20,#0x168]                                       ; +0x2c, 0x100097798\nBL              cocos2d__CCDictionary__allKeys                         ; +0x30, 0x10009779c\nMOV             X22, X0                                                ; +0x34, 0x1000977a0\nBL              sub_10024A36C                                          ; +0x38, 0x1000977a4\nCBZ             W0, loc_100097854                                      ; +0x3c, 0x1000977a8\nMOV             W24, #0                                                ; +0x40, 0x1000977ac\nMOV             W25, #0xFFFFFFFF                                       ; +0x44, 0x1000977b0\nMOV             X0, X22                                                ; +0x48, 0x1000977b4\nBL              sub_10024A36C                                          ; +0x4c, 0x1000977b8\nADD             W1, W0, W25                                            ; +0x50, 0x1000977bc\nMOV             X0, X22                                                ; +0x54, 0x1000977c0\nBL              sub_10024A388                                          ; +0x58, 0x1000977c4\nBL              cocos2d__CCString__getCString                          ; +0x5c, 0x1000977c8\nMOV             X1, X0; __s                                            ; +0x60, 0x1000977cc\nLDR             X23, [X20,#0x168]                                      ; +0x64, 0x1000977d0\nADD             X0, SP, #0x60+__p; int                                 ; +0x68, 0x1000977d4\nBL              sub_100009900                                          ; +0x6c, 0x1000977d8\nADD             X1, SP, #0x60+__p                                      ; +0x70, 0x1000977dc\nMOV             X0, X23                                                ; +0x74, 0x1000977e0\nBL              cocos2d__CCDictionary__objectForKey_1                  ; +0x78, 0x1000977e4\nMOV             X23, X0                                                ; +0x7c, 0x1000977e8\nLDRSB           W8, [SP,#0x60+var_41]                                  ; +0x80, 0x1000977ec\nTBNZ            W8, #0x1F, loc_100097810                               ; +0x84, 0x1000977f0\nCBZ             W19, loc_10009781C                                     ; +0x88, 0x1000977f4\nLDR             W8, [X23,#0x2EC]                                       ; +0x8c, 0x1000977f8\nLDR             W9, [X23,#0x2F0]                                       ; +0x90, 0x1000977fc\nSUB             W8, W8, W9                                             ; +0x94, 0x100097800\nCMP             W8, #0x63 ; 'c'                                        ; +0x98, 0x100097804\nB.GT            loc_100097830                                          ; +0x9c, 0x100097808\nB               loc_10009783C                                          ; +0xa0, 0x10009780c\nLDR             X0, [SP,#0x60+__p]; __p                                ; +0xa4, 0x100097810\nBL              __ZdlPv; operator delete(void *)                       ; +0xa8, 0x100097814\nCBNZ            W19, loc_1000977F8                                     ; +0xac, 0x100097818\nLDR             W8, [X23,#0x2E8]                                       ; +0xb0, 0x10009781c\nLDR             W9, [X23,#0x2E4]                                       ; +0xb4, 0x100097820\nSUB             W8, W8, W9                                             ; +0xb8, 0x100097824\nCMP             W8, #0x64 ; 'd'                                        ; +0xbc, 0x100097828\nB.LT            loc_10009783C                                          ; +0xc0, 0x10009782c\nMOV             X0, X21                                                ; +0xc4, 0x100097830\nMOV             X1, X23                                                ; +0xc8, 0x100097834\nBL              sub_10024A2D0                                          ; +0xcc, 0x100097838\nADD             W24, W24, #1                                           ; +0xd0, 0x10009783c\nMOV             X0, X22                                                ; +0xd4, 0x100097840\nBL              sub_10024A36C                                          ; +0xd8, 0x100097844\nSUB             W25, W25, #1                                           ; +0xdc, 0x100097848\nCMP             W24, W0                                                ; +0xe0, 0x10009784c\nB.CC            loc_1000977B4                                          ; +0xe4, 0x100097850\nMOV             X0, X21                                                ; +0xe8, 0x100097854\nLDP             X29, X30, [SP,#0x60+var_s0]                            ; +0xec, 0x100097858\nLDP             X20, X19, [SP,#0x60+var_10]                            ; +0xf0, 0x10009785c\nLDP             X22, X21, [SP,#0x60+var_20]                            ; +0xf4, 0x100097860\nLDP             X24, X23, [SP,#0x60+var_30]                            ; +0xf8, 0x100097864\nLDP             X26, X25, [SP,#0x60+var_40]                            ; +0xfc, 0x100097868\nADD             SP, SP, #0x70 ; 'p'                                    ; +0x100, 0x10009786c\nRET                                                                    ; +0x104, 0x100097870", "xrefs": ["GameLevelManager::getOnlineLevels @ 0x10009d5ec", "GameLevelManager::submitUserInfo @ 0x1000a2b58"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}