{"type": "func", "start": 4295587360, "end": 4295587664, "name": "GameLevelManager::updateLevelOrders", "pseudocode": "// \n// GameLevelManager::updateLevelOrders from 0x100097620 to 0x100097750 (304 bytes)\n// \n// 2 xrefs:\n// > GameLevelManager::encodeDataTo @ 0x10009ae10\n// > GameLevelManager::encodeDataTo @ 0x10009ae18\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\nvoid __fastcall GameLevelManager::updateLevelOrders(GameLevelManager *a1)\n{\n  __int64 v2; // x19\n  cocos2d::CCArray *v3; // x21\n  unsigned int v4; // w23\n  int v5; // w24\n  int v6; // w0\n  cocos2d::CCString *v7; // x0\n  char *CString; // x0\n  cocos2d::CCDictionary *m_onlineLevels; // x22\n  __int64 v10; // x22\n  int v11; // w0\n  int v12; // w20\n  __int64 v13; // x21\n  void *__p[2]; // [xsp+8h] [xbp-48h] BYREF\n  char v15; // [xsp+1Fh] [xbp-31h]\n\n  v2 = sub_10024A15C(a1);\n  v3 = cocos2d::CCDictionary::allKeys(a1->m_onlineLevels);\n  if ( (unsigned int)sub_10024A36C(v3) )\n  {\n    v4 = 0;\n    v5 = -1;\n    do\n    {\n      v6 = sub_10024A36C(v3);\n      v7 = (cocos2d::CCString *)sub_10024A388(v3, (unsigned int)(v6 + v5));\n      CString = (char *)cocos2d::CCString::getCString(v7);\n      m_onlineLevels = a1->m_onlineLevels;\n      sub_100009900(__p, CString);\n      v10 = cocos2d::CCDictionary::objectForKey_1(m_onlineLevels, __p);\n      if ( v15 < 0 )\n        operator delete(__p[0]);\n      if ( (*(_BYTE *)(v10 + 993) & 1) != 0 )\n        *(_DWORD *)(v10 + 624) = 0;\n      else\n        sub_10024A2D0(v2, v10);\n      ++v4;\n      --v5;\n    }\n    while ( v4 < (unsigned int)sub_10024A36C(v3) );\n  }\n  if ( (unsigned int)sub_10024A36C(v2) )\n    qsort(\n      *(void **)(*(_QWORD *)(v2 + 56) + 16LL),\n      **(unsigned int **)(v2 + 56),\n      8u,\n      (int (__cdecl *)(const void *, const void *))sub_100087A3C);\n  v11 = sub_10024A36C(v2);\n  if ( v11 >= 1 )\n  {\n    v12 = v11;\n    v13 = 0;\n    do\n    {\n      *(_DWORD *)(sub_10024A388(v2, v13) + 624) = v12;\n      v13 = (unsigned int)(v13 + 1);\n      --v12;\n    }\n    while ( v12 );\n  }\n}", "assembly": "; \n; GameLevelManager::updateLevelOrders from 0x100097620 to 0x100097750 (304 bytes)\n; \n; 2 xrefs:\n; > GameLevelManager::encodeDataTo @ 0x10009ae10\n; > GameLevelManager::encodeDataTo @ 0x10009ae18\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, #0x60                                          ; +0x0, 0x100097620\nSTP             X24, X23, [SP,#0x50+var_30]                            ; +0x4, 0x100097624\nSTP             X22, X21, [SP,#0x50+var_20]                            ; +0x8, 0x100097628\nSTP             X20, X19, [SP,#0x50+var_10]                            ; +0xc, 0x10009762c\nSTP             X29, X30, [SP,#0x50+var_s0]                            ; +0x10, 0x100097630\nADD             X29, SP, #0x50                                         ; +0x14, 0x100097634\nMOV             X20, X0                                                ; +0x18, 0x100097638\nBL              sub_10024A15C                                          ; +0x1c, 0x10009763c\nMOV             X19, X0                                                ; +0x20, 0x100097640\nLDR             X0, [X20,#0x168]                                       ; +0x24, 0x100097644\nBL              cocos2d__CCDictionary__allKeys                         ; +0x28, 0x100097648\nMOV             X21, X0                                                ; +0x2c, 0x10009764c\nBL              sub_10024A36C                                          ; +0x30, 0x100097650\nCBZ             W0, loc_1000976DC                                      ; +0x34, 0x100097654\nMOV             W23, #0                                                ; +0x38, 0x100097658\nMOV             W24, #0xFFFFFFFF                                       ; +0x3c, 0x10009765c\nMOV             X0, X21                                                ; +0x40, 0x100097660\nBL              sub_10024A36C                                          ; +0x44, 0x100097664\nADD             W1, W0, W24                                            ; +0x48, 0x100097668\nMOV             X0, X21                                                ; +0x4c, 0x10009766c\nBL              sub_10024A388                                          ; +0x50, 0x100097670\nBL              cocos2d__CCString__getCString                          ; +0x54, 0x100097674\nMOV             X1, X0; __s                                            ; +0x58, 0x100097678\nLDR             X22, [X20,#0x168]                                      ; +0x5c, 0x10009767c\nADD             X0, SP, #0x50+__p; int                                 ; +0x60, 0x100097680\nBL              sub_100009900                                          ; +0x64, 0x100097684\nADD             X1, SP, #0x50+__p                                      ; +0x68, 0x100097688\nMOV             X0, X22                                                ; +0x6c, 0x10009768c\nBL              cocos2d__CCDictionary__objectForKey_1                  ; +0x70, 0x100097690\nMOV             X22, X0                                                ; +0x74, 0x100097694\nLDRSB           W8, [SP,#0x50+var_31]                                  ; +0x78, 0x100097698\nTBZ             W8, #0x1F, loc_1000976A8                               ; +0x7c, 0x10009769c\nLDR             X0, [SP,#0x50+__p]; __p                                ; +0x80, 0x1000976a0\nBL              __ZdlPv; operator delete(void *)                       ; +0x84, 0x1000976a4\nLDRB            W8, [X22,#0x3E1]                                       ; +0x88, 0x1000976a8\nTBZ             W8, #0, loc_1000976B8                                  ; +0x8c, 0x1000976ac\nSTR             WZR, [X22,#0x270]                                      ; +0x90, 0x1000976b0\nB               loc_1000976C4                                          ; +0x94, 0x1000976b4\nMOV             X0, X19                                                ; +0x98, 0x1000976b8\nMOV             X1, X22                                                ; +0x9c, 0x1000976bc\nBL              sub_10024A2D0                                          ; +0xa0, 0x1000976c0\nADD             W23, W23, #1                                           ; +0xa4, 0x1000976c4\nMOV             X0, X21                                                ; +0xa8, 0x1000976c8\nBL              sub_10024A36C                                          ; +0xac, 0x1000976cc\nSUB             W24, W24, #1                                           ; +0xb0, 0x1000976d0\nCMP             W23, W0                                                ; +0xb4, 0x1000976d4\nB.CC            loc_100097660                                          ; +0xb8, 0x1000976d8\nMOV             X0, X19                                                ; +0xbc, 0x1000976dc\nBL              sub_10024A36C                                          ; +0xc0, 0x1000976e0\nCBZ             W0, loc_100097704                                      ; +0xc4, 0x1000976e4\nLDR             X8, [X19,#0x38]                                        ; +0xc8, 0x1000976e8\nLDR             X0, [X8,#0x10]; __base                                 ; +0xcc, 0x1000976ec\nLDR             W1, [X8]; __nel                                        ; +0xd0, 0x1000976f0\nADRL            X3, sub_100087A3C; __compar                            ; +0xd4, 0x1000976f4\nMOV             W2, #8; __width                                        ; +0xdc, 0x1000976fc\nBL              _qsort                                                 ; +0xe0, 0x100097700\nMOV             X0, X19                                                ; +0xe4, 0x100097704\nBL              sub_10024A36C                                          ; +0xe8, 0x100097708\nCMP             W0, #1                                                 ; +0xec, 0x10009770c\nB.LT            loc_100097738                                          ; +0xf0, 0x100097710\nMOV             X20, X0                                                ; +0xf4, 0x100097714\nMOV             W21, #0                                                ; +0xf8, 0x100097718\nMOV             X0, X19                                                ; +0xfc, 0x10009771c\nMOV             X1, X21                                                ; +0x100, 0x100097720\nBL              sub_10024A388                                          ; +0x104, 0x100097724\nSTR             W20, [X0,#0x270]                                       ; +0x108, 0x100097728\nADD             W21, W21, #1                                           ; +0x10c, 0x10009772c\nSUBS            W20, W20, #1                                           ; +0x110, 0x100097730\nB.NE            loc_10009771C                                          ; +0x114, 0x100097734\nLDP             X29, X30, [SP,#0x50+var_s0]                            ; +0x118, 0x100097738\nLDP             X20, X19, [SP,#0x50+var_10]                            ; +0x11c, 0x10009773c\nLDP             X22, X21, [SP,#0x50+var_20]                            ; +0x120, 0x100097740\nLDP             X24, X23, [SP,#0x50+var_30]                            ; +0x124, 0x100097744\nADD             SP, SP, #0x60 ; '`'                                    ; +0x128, 0x100097748\nRET                                                                    ; +0x12c, 0x10009774c", "xrefs": ["GameLevelManager::encodeDataTo @ 0x10009ae10", "GameLevelManager::encodeDataTo @ 0x10009ae18"], "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"}