{"type": "func", "start": 4295145872, "end": 4295146048, "name": "LevelInfoLayer::onUpdate", "pseudocode": "// \n// LevelInfoLayer::onUpdate from 0x10002b990 to 0x10002ba40 (176 bytes)\n// \n// 1 xrefs:\n// > LevelInfoLayer::init @ 0x1000286ac\n// \n// This function is hookable on this platform (idp: arm, 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 10:57:28 +0000\n// \n\n__int64 __fastcall LevelInfoLayer::onUpdate(__int64 result)\n{\n  __int64 v1; // x19\n  __int64 shouldDownloadLevel; // x0\n  __int64 v3; // x0\n  __int64 isUpdateValid; // x0\n  __int64 v5; // x0\n  __int64 v6; // x0\n  __int64 v7; // x0\n\n  if ( (*(_BYTE *)(result + 488) & 1) == 0 )\n  {\n    v1 = result;\n    shouldDownloadLevel = LevelInfoLayer::shouldDownloadLevel(result);\n    if ( (_DWORD)shouldDownloadLevel )\n    {\n      return LevelInfoLayer::downloadLevel(v1);\n    }\n    else\n    {\n      v3 = GameLevelManager::sharedState(shouldDownloadLevel);\n      isUpdateValid = GameLevelManager::isUpdateValid(\n                        v3,\n                        (unsigned int)(*(_DWORD *)(*(_QWORD *)(v1 + 504) + 328LL)\n                                     - *(_DWORD *)(*(_QWORD *)(v1 + 504) + 332LL)));\n      if ( (_DWORD)isUpdateValid )\n      {\n        return LevelInfoLayer::showUpdateAlert(isUpdateValid, 1);\n      }\n      else\n      {\n        (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(v1 + 496) + 344LL))(*(_QWORD *)(v1 + 496), 0);\n        v5 = (*(__int64 (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v1 + 648) + 344LL))(*(_QWORD *)(v1 + 648), 1);\n        v6 = GameLevelManager::sharedState(v5);\n        *(_QWORD *)(v6 + 1288) = v1 + 416;\n        v7 = GameLevelManager::sharedState(v6);\n        return GameLevelManager::updateLevel(v7, *(_QWORD *)(v1 + 504));\n      }\n    }\n  }\n  return result;\n}", "assembly": "; \n; LevelInfoLayer::onUpdate from 0x10002b990 to 0x10002ba40 (176 bytes)\n; \n; 1 xrefs:\n; > LevelInfoLayer::init @ 0x1000286ac\n; \n; This function is hookable on this platform (idp: arm, 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 10:57:28 +0000\n; \nSTP             X20, X19, [SP,#-0x10+var_10]!                          ; +0x0, 0x10002b990\nSTP             X29, X30, [SP,#0x10+var_s0]                            ; +0x4, 0x10002b994\nADD             X29, SP, #0x10                                         ; +0x8, 0x10002b998\nLDRB            W8, [X0,#0x1E8]                                        ; +0xc, 0x10002b99c\nTBZ             W8, #0, loc_10002B9B0                                  ; +0x10, 0x10002b9a0\nLDP             X29, X30, [SP,#0x10+var_s0]                            ; +0x14, 0x10002b9a4\nLDP             X20, X19, [SP+0x10+var_10],#0x20                       ; +0x18, 0x10002b9a8\nRET                                                                    ; +0x1c, 0x10002b9ac\nMOV             X19, X0                                                ; +0x20, 0x10002b9b0\nBL              LevelInfoLayer__shouldDownloadLevel                    ; +0x24, 0x10002b9b4\nCBZ             W0, loc_10002B9CC                                      ; +0x28, 0x10002b9b8\nMOV             X0, X19                                                ; +0x2c, 0x10002b9bc\nLDP             X29, X30, [SP,#0x10+var_s0]                            ; +0x30, 0x10002b9c0\nLDP             X20, X19, [SP+0x10+var_10],#0x20                       ; +0x34, 0x10002b9c4\nB               LevelInfoLayer__downloadLevel                          ; +0x38, 0x10002b9c8\nBL              GameLevelManager__sharedState                          ; +0x3c, 0x10002b9cc\nLDR             X8, [X19,#0x1F8]                                       ; +0x40, 0x10002b9d0\nLDR             W9, [X8,#0x148]                                        ; +0x44, 0x10002b9d4\nLDR             W8, [X8,#0x14C]                                        ; +0x48, 0x10002b9d8\nSUB             W1, W9, W8                                             ; +0x4c, 0x10002b9dc\nBL              GameLevelManager__isUpdateValid                        ; +0x50, 0x10002b9e0\nCBZ             W0, loc_10002B9F8                                      ; +0x54, 0x10002b9e4\nMOV             W1, #1                                                 ; +0x58, 0x10002b9e8\nLDP             X29, X30, [SP,#0x10+var_s0]                            ; +0x5c, 0x10002b9ec\nLDP             X20, X19, [SP+0x10+var_10],#0x20                       ; +0x60, 0x10002b9f0\nB               LevelInfoLayer__showUpdateAlert                        ; +0x64, 0x10002b9f4\nLDR             X0, [X19,#0x1F0]                                       ; +0x68, 0x10002b9f8\nLDR             X8, [X0]                                               ; +0x6c, 0x10002b9fc\nLDR             X8, [X8,#0x158]                                        ; +0x70, 0x10002ba00\nMOV             W1, #0                                                 ; +0x74, 0x10002ba04\nBLR             X8                                                     ; +0x78, 0x10002ba08\nLDR             X0, [X19,#0x288]                                       ; +0x7c, 0x10002ba0c\nLDR             X8, [X0]                                               ; +0x80, 0x10002ba10\nLDR             X8, [X8,#0x158]                                        ; +0x84, 0x10002ba14\nMOV             W1, #1                                                 ; +0x88, 0x10002ba18\nBLR             X8                                                     ; +0x8c, 0x10002ba1c\nBL              GameLevelManager__sharedState                          ; +0x90, 0x10002ba20\nADD             X8, X19, #0x1A0                                        ; +0x94, 0x10002ba24\nSTR             X8, [X0,#0x508]                                        ; +0x98, 0x10002ba28\nBL              GameLevelManager__sharedState                          ; +0x9c, 0x10002ba2c\nLDR             X1, [X19,#0x1F8]                                       ; +0xa0, 0x10002ba30\nLDP             X29, X30, [SP,#0x10+var_s0]                            ; +0xa4, 0x10002ba34\nLDP             X20, X19, [SP+0x10+var_10],#0x20                       ; +0xa8, 0x10002ba38\nB               GameLevelManager__updateLevel                          ; +0xac, 0x10002ba3c", "xrefs": ["LevelInfoLayer::init @ 0x1000286ac"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "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"}