{"type": "func", "start": 4295542904, "end": 4295543252, "name": "GameLevelManager::onRestoreItemsCompleted", "pseudocode": "// \n// GameLevelManager::onRestoreItemsCompleted from 0x10008c878 to 0x10008c9d4 (348 bytes)\n// \n// 1 xrefs:\n// > GameLevelManager::handleIt @ 0x100089124\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::onRestoreItemsCompleted(GameLevelManager *a1, __int64 a2)\n{\n  _BOOL4 v3; // w0\n  _BOOL4 v4; // w20\n  __int64 v5; // x19\n  __int64 v6; // x20\n  void *v7[2]; // [xsp+0h] [xbp-70h] BYREF\n  __int64 v8; // [xsp+10h] [xbp-60h]\n  void *v9[2]; // [xsp+18h] [xbp-58h] BYREF\n  char v10; // [xsp+2Fh] [xbp-41h]\n  void *__p[2]; // [xsp+30h] [xbp-40h] BYREF\n  char v12; // [xsp+47h] [xbp-29h]\n  void *v13[2]; // [xsp+48h] [xbp-28h] BYREF\n  char v14; // [xsp+5Fh] [xbp-11h]\n\n  GameLevelManager::removeDLFromActive(a1, \"restoreKey\");\n  sub_100009900(v13, \"-1\");\n  v3 = sub_1000045BC((_QWORD *)a2, v13);\n  v4 = v3;\n  if ( v14 < 0 )\n  {\n    operator delete(v13[0]);\n    if ( v4 )\n      goto LABEL_3;\n  }\n  else if ( v3 )\n  {\nLABEL_3:\n    sub_100009900(__p, \"No restore data found.\");\n    v5 = FLAlertLayer::create_1(0, \"Error\", __p, \"OK\", 0, 300.0);\n    if ( v12 < 0 )\n      operator delete(__p[0]);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)v5 + 1288LL))(v5);\n    return;\n  }\n  sub_100009900(v9, \"Your data has been restored.\");\n  v6 = FLAlertLayer::create_1(0, \"Data restored\", v9, \"OK\", 0, 300.0);\n  if ( v10 < 0 )\n    operator delete(v9[0]);\n  (*(void (__fastcall **)(__int64))(*(_QWORD *)v6 + 1288LL))(v6);\n  if ( *(char *)(a2 + 23) < 0 )\n  {\n    sub_1000097D0(v7, *(void **)a2, *(_QWORD *)(a2 + 8));\n  }\n  else\n  {\n    *(_OWORD *)v7 = *(_OWORD *)a2;\n    v8 = *(_QWORD *)(a2 + 16);\n  }\n  if ( SHIBYTE(v8) < 0 )\n    operator delete(v7[0]);\n}", "assembly": "; \n; GameLevelManager::onRestoreItemsCompleted from 0x10008c878 to 0x10008c9d4 (348 bytes)\n; \n; 1 xrefs:\n; > GameLevelManager::handleIt @ 0x100089124\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, 0x10008c878\nSTP             X20, X19, [SP,#0x70+var_10]                            ; +0x4, 0x10008c87c\nSTP             X29, X30, [SP,#0x70+var_s0]                            ; +0x8, 0x10008c880\nADD             X29, SP, #0x70                                         ; +0xc, 0x10008c884\nMOV             X19, X1                                                ; +0x10, 0x10008c888\nADRL            X1, aRestorekey; \"restoreKey\"                          ; +0x14, 0x10008c88c\nBL              GameLevelManager__removeDLFromActive                   ; +0x1c, 0x10008c894\nADRL            X1, a1_0; \"-1\"                                         ; +0x20, 0x10008c898\nSUB             X0, X29, #-var_28; int                                 ; +0x28, 0x10008c8a0\nBL              sub_100009900                                          ; +0x2c, 0x10008c8a4\nSUB             X1, X29, #-var_28                                      ; +0x30, 0x10008c8a8\nMOV             X0, X19                                                ; +0x34, 0x10008c8ac\nBL              sub_1000045BC                                          ; +0x38, 0x10008c8b0\nMOV             X20, X0                                                ; +0x3c, 0x10008c8b4\nLDURSB          W8, [X29,#var_11]                                      ; +0x40, 0x10008c8b8\nTBNZ            W8, #0x1F, loc_10008C924                               ; +0x44, 0x10008c8bc\nCBZ             W20, loc_10008C930                                     ; +0x48, 0x10008c8c0\nADRL            X1, aNoRestoreDataF; \"No restore data found.\"          ; +0x4c, 0x10008c8c4\nADD             X0, SP, #0x70+__p; int                                 ; +0x54, 0x10008c8cc\nBL              sub_100009900                                          ; +0x58, 0x10008c8d0\nADRL            X1, aError; \"Error\"                                    ; +0x5c, 0x10008c8d4\nADRL            X3, aOk; \"OK\"                                          ; +0x64, 0x10008c8dc\nMOV             W8, #0x43960000                                        ; +0x6c, 0x10008c8e4\nFMOV            S0, W8                                                 ; +0x70, 0x10008c8e8\nADD             X2, SP, #0x70+__p                                      ; +0x74, 0x10008c8ec\nMOV             X0, #0                                                 ; +0x78, 0x10008c8f0\nMOV             X4, #0                                                 ; +0x7c, 0x10008c8f4\nBL              FLAlertLayer__create_1                                 ; +0x80, 0x10008c8f8\nMOV             X19, X0                                                ; +0x84, 0x10008c8fc\nLDRSB           W8, [SP,#0x70+var_29]                                  ; +0x88, 0x10008c900\nTBZ             W8, #0x1F, loc_10008C910                               ; +0x8c, 0x10008c904\nLDR             X0, [SP,#0x70+__p]; __p                                ; +0x90, 0x10008c908\nBL              __ZdlPv; operator delete(void *)                       ; +0x94, 0x10008c90c\nLDR             X8, [X19]                                              ; +0x98, 0x10008c910\nLDR             X8, [X8,#0x508]                                        ; +0x9c, 0x10008c914\nMOV             X0, X19                                                ; +0xa0, 0x10008c918\nBLR             X8                                                     ; +0xa4, 0x10008c91c\nB               loc_10008C9C4                                          ; +0xa8, 0x10008c920\nLDUR            X0, [X29,#var_28]; __p                                 ; +0xac, 0x10008c924\nBL              __ZdlPv; operator delete(void *)                       ; +0xb0, 0x10008c928\nCBNZ            W20, loc_10008C8C4                                     ; +0xb4, 0x10008c92c\nADRL            X1, aYourDataHasBee; \"Your data has been restored.\"    ; +0xb8, 0x10008c930\nADD             X0, SP, #0x70+var_58; int                              ; +0xc0, 0x10008c938\nBL              sub_100009900                                          ; +0xc4, 0x10008c93c\nADRL            X1, aDataRestored; \"Data restored\"                     ; +0xc8, 0x10008c940\nADRL            X3, aOk; \"OK\"                                          ; +0xd0, 0x10008c948\nMOV             W8, #0x43960000                                        ; +0xd8, 0x10008c950\nFMOV            S0, W8                                                 ; +0xdc, 0x10008c954\nADD             X2, SP, #0x70+var_58                                   ; +0xe0, 0x10008c958\nMOV             X0, #0                                                 ; +0xe4, 0x10008c95c\nMOV             X4, #0                                                 ; +0xe8, 0x10008c960\nBL              FLAlertLayer__create_1                                 ; +0xec, 0x10008c964\nMOV             X20, X0                                                ; +0xf0, 0x10008c968\nLDRSB           W8, [SP,#0x70+var_41]                                  ; +0xf4, 0x10008c96c\nTBZ             W8, #0x1F, loc_10008C97C                               ; +0xf8, 0x10008c970\nLDR             X0, [SP,#0x70+var_58]; __p                             ; +0xfc, 0x10008c974\nBL              __ZdlPv; operator delete(void *)                       ; +0x100, 0x10008c978\nLDR             X8, [X20]                                              ; +0x104, 0x10008c97c\nLDR             X8, [X8,#0x508]                                        ; +0x108, 0x10008c980\nMOV             X0, X20                                                ; +0x10c, 0x10008c984\nBLR             X8                                                     ; +0x110, 0x10008c988\nLDRSB           W8, [X19,#0x17]                                        ; +0x114, 0x10008c98c\nTBNZ            W8, #0x1F, loc_10008C9A8                               ; +0x118, 0x10008c990\nLDR             Q0, [X19]                                              ; +0x11c, 0x10008c994\nSTR             Q0, [SP,#0x70+var_70]                                  ; +0x120, 0x10008c998\nLDR             X8, [X19,#0x10]                                        ; +0x124, 0x10008c99c\nSTR             X8, [SP,#0x70+var_60]                                  ; +0x128, 0x10008c9a0\nB               loc_10008C9B4                                          ; +0x12c, 0x10008c9a4\nLDP             X1, X2, [X19]; __src                                   ; +0x130, 0x10008c9a8\nMOV             X0, SP; __dst                                          ; +0x134, 0x10008c9ac\nBL              sub_1000097D0                                          ; +0x138, 0x10008c9b0\nLDRSB           W8, [SP,#0x70+var_60+7]                                ; +0x13c, 0x10008c9b4\nTBZ             W8, #0x1F, loc_10008C9C4                               ; +0x140, 0x10008c9b8\nLDR             X0, [SP,#0x70+var_70]; __p                             ; +0x144, 0x10008c9bc\nBL              __ZdlPv; operator delete(void *)                       ; +0x148, 0x10008c9c0\nLDP             X29, X30, [SP,#0x70+var_s0]                            ; +0x14c, 0x10008c9c4\nLDP             X20, X19, [SP,#0x70+var_10]                            ; +0x150, 0x10008c9c8\nADD             SP, SP, #0x80                                          ; +0x154, 0x10008c9cc\nRET                                                                    ; +0x158, 0x10008c9d0", "xrefs": ["GameLevelManager::handleIt @ 0x100089124"], "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"}