{"type": "func", "start": 4295591468, "end": 4295591800, "name": "GameLevelManager::getCompletedDailyLevels", "pseudocode": "// \n// GameLevelManager::getCompletedDailyLevels from 0x10009862c to 0x100098778 (332 bytes)\n// \n// 1 xrefs:\n// > GameLevelManager::updateUserScore @ 0x1000a21cc\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\nint __fastcall GameLevelManager::getCompletedDailyLevels(GameLevelManager *a1)\n{\n  cocos2d::CCArray *v2; // x0\n  cocos2d::ccArray *data; // x9\n  __int64 num; // x8\n  int v5; // w20\n  cocos2d::CCString **arr; // x25\n  unsigned __int64 v7; // x26\n  cocos2d::CCString *v8; // x23\n  cocos2d::CCDictionary *m_dailyLevels; // x24\n  char *CString; // x0\n  const void *v11; // x0\n  GJGameLevel *v12; // x23\n  GameStatsManager *v13; // x0\n  void *__p[2]; // [xsp+8h] [xbp-68h] BYREF\n  char v16; // [xsp+1Fh] [xbp-51h]\n\n  v2 = cocos2d::CCDictionary::allKeys(a1->m_dailyLevels);\n  if ( v2 )\n  {\n    data = v2->data;\n    num = data->num;\n    if ( (_DWORD)num )\n    {\n      v5 = 0;\n      arr = (cocos2d::CCString **)data->arr;\n      v7 = (unsigned __int64)&arr[num - 1];\n      while ( 1 )\n      {\n        v8 = *arr;\n        if ( !*arr )\n          return v5;\n        if ( cocos2d::CCString::intValue(*arr) <= 100000 )\n        {\n          m_dailyLevels = a1->m_dailyLevels;\n          CString = (char *)cocos2d::CCString::getCString(v8);\n          sub_100009900(__p, CString);\n          v11 = (const void *)cocos2d::CCDictionary::objectForKey_1(m_dailyLevels, __p);\n          if ( v11 )\n            v12 = (GJGameLevel *)__dynamic_cast(\n                                   v11,\n                                   (const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,\n                                   (const struct __class_type_info *)&`typeinfo for'GJGameLevel,\n                                   0);\n          else\n            v12 = nullptr;\n          if ( v16 < 0 )\n          {\n            operator delete(__p[0]);\n            if ( v12 )\n            {\nLABEL_13:\n              if ( v12->m_stars.random - v12->m_stars.seed <= 9\n                && v12->m_normalPercent.random - v12->m_normalPercent.seed == 100 )\n              {\n                v13 = GameStatsManager::sharedState();\n                v5 += GameStatsManager::hasCompletedLevel(v13, v12);\n              }\n            }\n          }\n          else if ( v12 )\n          {\n            goto LABEL_13;\n          }\n        }\n        if ( (unsigned __int64)++arr > v7 )\n          return v5;\n      }\n    }\n  }\n  return 0;\n}", "assembly": "; \n; GameLevelManager::getCompletedDailyLevels from 0x10009862c to 0x100098778 (332 bytes)\n; \n; 1 xrefs:\n; > GameLevelManager::updateUserScore @ 0x1000a21cc\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, #0x80                                          ; +0x0, 0x10009862c\nSTP             X28, X27, [SP,#0x70+var_50]                            ; +0x4, 0x100098630\nSTP             X26, X25, [SP,#0x70+var_40]                            ; +0x8, 0x100098634\nSTP             X24, X23, [SP,#0x70+var_30]                            ; +0xc, 0x100098638\nSTP             X22, X21, [SP,#0x70+var_20]                            ; +0x10, 0x10009863c\nSTP             X20, X19, [SP,#0x70+var_10]                            ; +0x14, 0x100098640\nSTP             X29, X30, [SP,#0x70+var_s0]                            ; +0x18, 0x100098644\nADD             X29, SP, #0x70                                         ; +0x1c, 0x100098648\nMOV             X19, X0                                                ; +0x20, 0x10009864c\nLDR             X0, [X0,#0x1C0]                                        ; +0x24, 0x100098650\nBL              cocos2d__CCDictionary__allKeys                         ; +0x28, 0x100098654\nCBZ             X0, loc_100098750                                      ; +0x2c, 0x100098658\nLDR             X9, [X0,#0x38]                                         ; +0x30, 0x10009865c\nLDR             W8, [X9]                                               ; +0x34, 0x100098660\nCBZ             W8, loc_100098750                                      ; +0x38, 0x100098664\nMOV             W20, #0                                                ; +0x3c, 0x100098668\nLDR             X25, [X9,#0x10]                                        ; +0x40, 0x10009866c\nADD             X8, X25, X8,LSL#3                                      ; +0x44, 0x100098670\nSUB             X26, X8, #8                                            ; +0x48, 0x100098674\nMOV             W27, #0x186A0                                          ; +0x4c, 0x100098678\nADRL            X21, _ZTIN7cocos2d8CCObjectE; `typeinfo for'cocos2d::CCObject ; +0x54, 0x100098680\nADRL            X22, _ZTI11GJGameLevel; `typeinfo for'GJGameLevel      ; +0x5c, 0x100098688\nLDR             X23, [X25]                                             ; +0x64, 0x100098690\nCBZ             X23, loc_100098754                                     ; +0x68, 0x100098694\nMOV             X0, X23                                                ; +0x6c, 0x100098698\nBL              cocos2d__CCString__intValue                            ; +0x70, 0x10009869c\nCMP             W0, W27                                                ; +0x74, 0x1000986a0\nB.GT            loc_100098740                                          ; +0x78, 0x1000986a4\nLDR             X24, [X19,#0x1C0]                                      ; +0x7c, 0x1000986a8\nMOV             X0, X23                                                ; +0x80, 0x1000986ac\nBL              cocos2d__CCString__getCString                          ; +0x84, 0x1000986b0\nMOV             X1, X0; __s                                            ; +0x88, 0x1000986b4\nADD             X0, SP, #0x70+__p; int                                 ; +0x8c, 0x1000986b8\nBL              sub_100009900                                          ; +0x90, 0x1000986bc\nADD             X1, SP, #0x70+__p                                      ; +0x94, 0x1000986c0\nMOV             X0, X24                                                ; +0x98, 0x1000986c4\nBL              cocos2d__CCDictionary__objectForKey_1                  ; +0x9c, 0x1000986c8\nCBZ             X0, loc_1000986E8                                      ; +0xa0, 0x1000986cc\nMOV             X1, X21; lpstype                                       ; +0xa4, 0x1000986d0\nMOV             X2, X22; lpdtype                                       ; +0xa8, 0x1000986d4\nMOV             X3, #0; s2d                                            ; +0xac, 0x1000986d8\nBL              ___dynamic_cast                                        ; +0xb0, 0x1000986dc\nMOV             X23, X0                                                ; +0xb4, 0x1000986e0\nB               loc_1000986EC                                          ; +0xb8, 0x1000986e4\nMOV             X23, #0                                                ; +0xbc, 0x1000986e8\nLDRSB           W8, [SP,#0x70+var_51]                                  ; +0xc0, 0x1000986ec\nTBNZ            W8, #0x1F, loc_1000986FC                               ; +0xc4, 0x1000986f0\nCBNZ            X23, loc_100098708                                     ; +0xc8, 0x1000986f4\nB               loc_100098740                                          ; +0xcc, 0x1000986f8\nLDR             X0, [SP,#0x70+__p]; __p                                ; +0xd0, 0x1000986fc\nBL              __ZdlPv; operator delete(void *)                       ; +0xd4, 0x100098700\nCBZ             X23, loc_100098740                                     ; +0xd8, 0x100098704\nLDR             W8, [X23,#0x340]                                       ; +0xdc, 0x100098708\nLDR             W9, [X23,#0x344]                                       ; +0xe0, 0x10009870c\nSUB             W8, W8, W9                                             ; +0xe4, 0x100098710\nCMP             W8, #9                                                 ; +0xe8, 0x100098714\nB.GT            loc_100098740                                          ; +0xec, 0x100098718\nLDR             W8, [X23,#0x2E8]                                       ; +0xf0, 0x10009871c\nLDR             W9, [X23,#0x2E4]                                       ; +0xf4, 0x100098720\nSUB             W8, W8, W9                                             ; +0xf8, 0x100098724\nCMP             W8, #0x64 ; 'd'                                        ; +0xfc, 0x100098728\nB.NE            loc_100098740                                          ; +0x100, 0x10009872c\nBL              GameStatsManager__sharedState                          ; +0x104, 0x100098730\nMOV             X1, X23                                                ; +0x108, 0x100098734\nBL              GameStatsManager__hasCompletedLevel                    ; +0x10c, 0x100098738\nADD             W20, W20, W0                                           ; +0x110, 0x10009873c\nADD             X25, X25, #8                                           ; +0x114, 0x100098740\nCMP             X25, X26                                               ; +0x118, 0x100098744\nB.LS            loc_100098690                                          ; +0x11c, 0x100098748\nB               loc_100098754                                          ; +0x120, 0x10009874c\nMOV             W20, #0                                                ; +0x124, 0x100098750\nMOV             X0, X20                                                ; +0x128, 0x100098754\nLDP             X29, X30, [SP,#0x70+var_s0]                            ; +0x12c, 0x100098758\nLDP             X20, X19, [SP,#0x70+var_10]                            ; +0x130, 0x10009875c\nLDP             X22, X21, [SP,#0x70+var_20]                            ; +0x134, 0x100098760\nLDP             X24, X23, [SP,#0x70+var_30]                            ; +0x138, 0x100098764\nLDP             X26, X25, [SP,#0x70+var_40]                            ; +0x13c, 0x100098768\nLDP             X28, X27, [SP,#0x70+var_50]                            ; +0x140, 0x10009876c\nADD             SP, SP, #0x80                                          ; +0x144, 0x100098770\nRET                                                                    ; +0x148, 0x100098774", "xrefs": ["GameLevelManager::updateUserScore @ 0x1000a21cc"], "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"}