{"type": "func", "start": 4295594340, "end": 4295594648, "name": "GameLevelManager::gotoLevelPage", "pseudocode": "// \n// GameLevelManager::gotoLevelPage from 0x100099164 to 0x100099298 (308 bytes)\n// \n// 2 xrefs:\n// > LevelCell::onClick @ 0x10010f11c\n// > GauntletLayer::onLevel @ 0x100233ae0\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::gotoLevelPage(GameLevelManager *a1, GJGameLevel *a2)\n{\n  GJLevelType m_levelType; // w8\n  cocos2d::CCDirector *v5; // x20\n  cocos2d::CCScene *v6; // x0\n  cocos2d::CCTransitionFade *v7; // x1\n  cocos2d::CCScene *v8; // x0\n  GJGameLevel *SavedLevel_1; // x0\n  _BOOL4 m_gauntletLevel; // w21\n  cocos2d::CCScene *v11; // x0\n\n  GameManager::sharedState()->m_searchObjectBool = 1;\n  if ( !a2 )\n    return;\n  m_levelType = a2->m_levelType;\n  switch ( m_levelType )\n  {\n    case SearchResult:\n      SavedLevel_1 = GameLevelManager::getSavedLevel_1(a1, a2);\n      if ( SavedLevel_1 )\n      {\n        if ( SavedLevel_1->m_levelNotDownloaded )\n        {\n          GameLevelManager::saveLevel(a1, a2);\n        }\n        else if ( SavedLevel_1->m_levelVersion >= a2->m_levelVersion )\n        {\n          SavedLevel_1->m_songID = a2->m_songID;\n          a2 = SavedLevel_1;\n        }\n      }\n      m_gauntletLevel = a2->m_gauntletLevel;\n      v5 = cocos2d::CCDirector::sharedDirector();\n      v11 = LevelInfoLayer::scene(a2, 0);\n      v7 = cocos2d::CCTransitionFade::create_1(0.5, v11);\n      if ( m_gauntletLevel )\n        goto LABEL_14;\n      goto LABEL_15;\n    case Saved:\n      v5 = cocos2d::CCDirector::sharedDirector();\n      v8 = LevelInfoLayer::scene(a2, 0);\n      v7 = cocos2d::CCTransitionFade::create_1(0.5, v8);\nLABEL_15:\n      cocos2d::CCDirector::pushScene(v5, v7);\n      return;\n    case Editor:\n      v5 = cocos2d::CCDirector::sharedDirector();\n      v6 = EditLevelLayer::scene(a2);\n      v7 = cocos2d::CCTransitionFade::create_1(0.5, v6);\nLABEL_14:\n      cocos2d::CCDirector::replaceScene(v5, v7);\n      break;\n  }\n}", "assembly": "; \n; GameLevelManager::gotoLevelPage from 0x100099164 to 0x100099298 (308 bytes)\n; \n; 2 xrefs:\n; > LevelCell::onClick @ 0x10010f11c\n; > GauntletLayer::onLevel @ 0x100233ae0\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\nSTP             X22, X21, [SP,#-0x10+var_20]!                          ; +0x0, 0x100099164\nSTP             X20, X19, [SP,#0x20+var_10]                            ; +0x4, 0x100099168\nSTP             X29, X30, [SP,#0x20+var_s0]                            ; +0x8, 0x10009916c\nADD             X29, SP, #0x20                                         ; +0xc, 0x100099170\nMOV             X19, X1                                                ; +0x10, 0x100099174\nMOV             X20, X0                                                ; +0x14, 0x100099178\nBL              GameManager__sharedState                               ; +0x18, 0x10009917c\nMOV             W8, #1                                                 ; +0x1c, 0x100099180\nSTRB            W8, [X0,#0x2A0]                                        ; +0x20, 0x100099184\nCBZ             X19, loc_1000991C8                                     ; +0x24, 0x100099188\nLDR             W8, [X19,#0x404]                                       ; +0x28, 0x10009918c\nCMP             W8, #4                                                 ; +0x2c, 0x100099190\nB.EQ            loc_1000991FC                                          ; +0x30, 0x100099194\nCMP             W8, #3                                                 ; +0x34, 0x100099198\nB.EQ            loc_1000991D8                                          ; +0x38, 0x10009919c\nCMP             W8, #2                                                 ; +0x3c, 0x1000991a0\nB.NE            loc_1000991C8                                          ; +0x40, 0x1000991a4\nBL              cocos2d__CCDirector__sharedDirector                    ; +0x44, 0x1000991a8\nMOV             X20, X0                                                ; +0x48, 0x1000991ac\nMOV             X0, X19                                                ; +0x4c, 0x1000991b0\nBL              EditLevelLayer__scene                                  ; +0x50, 0x1000991b4\nFMOV            S0, #0.5                                               ; +0x54, 0x1000991b8\nBL              cocos2d__CCTransitionFade__create_1                    ; +0x58, 0x1000991bc\nMOV             X1, X0                                                 ; +0x5c, 0x1000991c0\nB               loc_100099270                                          ; +0x60, 0x1000991c4\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0x64, 0x1000991c8\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0x68, 0x1000991cc\nLDP             X22, X21, [SP+0x20+var_20],#0x30                       ; +0x6c, 0x1000991d0\nRET                                                                    ; +0x70, 0x1000991d4\nBL              cocos2d__CCDirector__sharedDirector                    ; +0x74, 0x1000991d8\nMOV             X20, X0                                                ; +0x78, 0x1000991dc\nMOV             X0, X19                                                ; +0x7c, 0x1000991e0\nMOV             W1, #0                                                 ; +0x80, 0x1000991e4\nBL              LevelInfoLayer__scene                                  ; +0x84, 0x1000991e8\nFMOV            S0, #0.5                                               ; +0x88, 0x1000991ec\nBL              cocos2d__CCTransitionFade__create_1                    ; +0x8c, 0x1000991f0\nMOV             X1, X0                                                 ; +0x90, 0x1000991f4\nB               loc_100099284                                          ; +0x94, 0x1000991f8\nMOV             X0, X20                                                ; +0x98, 0x1000991fc\nMOV             X1, X19                                                ; +0x9c, 0x100099200\nBL              GameLevelManager__getSavedLevel_1                      ; +0xa0, 0x100099204\nCBZ             X0, loc_100099244                                      ; +0xa4, 0x100099208\nLDRB            W8, [X0,#0x3E1]                                        ; +0xa8, 0x10009920c\nCMP             W8, #1                                                 ; +0xac, 0x100099210\nB.NE            loc_100099228                                          ; +0xb0, 0x100099214\nMOV             X0, X20                                                ; +0xb4, 0x100099218\nMOV             X1, X19                                                ; +0xb8, 0x10009921c\nBL              GameLevelManager__saveLevel                            ; +0xbc, 0x100099220\nB               loc_100099244                                          ; +0xc0, 0x100099224\nLDR             W8, [X0,#0x2A0]                                        ; +0xc4, 0x100099228\nLDR             W9, [X19,#0x2A0]                                       ; +0xc8, 0x10009922c\nCMP             W8, W9                                                 ; +0xcc, 0x100099230\nB.LT            loc_100099244                                          ; +0xd0, 0x100099234\nLDR             W8, [X19,#0x258]                                       ; +0xd4, 0x100099238\nSTR             W8, [X0,#0x258]                                        ; +0xd8, 0x10009923c\nMOV             X19, X0                                                ; +0xdc, 0x100099240\nLDRB            W21, [X19,#0x281]                                      ; +0xe0, 0x100099244\nBL              cocos2d__CCDirector__sharedDirector                    ; +0xe4, 0x100099248\nMOV             X20, X0                                                ; +0xe8, 0x10009924c\nMOV             X0, X19                                                ; +0xec, 0x100099250\nMOV             W1, #0                                                 ; +0xf0, 0x100099254\nBL              LevelInfoLayer__scene                                  ; +0xf4, 0x100099258\nFMOV            S0, #0.5                                               ; +0xf8, 0x10009925c\nBL              cocos2d__CCTransitionFade__create_1                    ; +0xfc, 0x100099260\nMOV             X1, X0; lpsrc                                          ; +0x100, 0x100099264\nCMP             W21, #1                                                ; +0x104, 0x100099268\nB.NE            loc_100099284                                          ; +0x108, 0x10009926c\nMOV             X0, X20; int                                           ; +0x10c, 0x100099270\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0x110, 0x100099274\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0x114, 0x100099278\nLDP             X22, X21, [SP+0x20+var_20],#0x30                       ; +0x118, 0x10009927c\nB               cocos2d__CCDirector__replaceScene                      ; +0x11c, 0x100099280\nMOV             X0, X20                                                ; +0x120, 0x100099284\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0x124, 0x100099288\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0x128, 0x10009928c\nLDP             X22, X21, [SP+0x20+var_20],#0x30                       ; +0x12c, 0x100099290\nB               cocos2d__CCDirector__pushScene                         ; +0x130, 0x100099294", "xrefs": ["LevelCell::onClick @ 0x10010f11c", "GauntletLayer::onLevel @ 0x100233ae0"], "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"}