{"type": "func", "start": 4299160636, "end": 4299160952, "name": "LevelEditorLayer::checkAutoSave", "pseudocode": "// \n// LevelEditorLayer::checkAutoSave from 0x1003ffc3c to 0x1003ffd78 (316 bytes)\n// \n// 1 xrefs:\n// > LevelEditorLayer::updateEditor @ 0x1003f8218\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 11:04:38 +0000\n// \n\n__int64 __fastcall LevelEditorLayer::checkAutoSave(__int64 a1, float a2)\n{\n  __int64 v4; // x0\n  __int64 v5; // x0\n  int IntGameVariable; // w0\n  int v7; // w8\n  float v8; // s0\n  __int64 v9; // x0\n  __int64 result; // x0\n  __int64 v11; // x0\n  unsigned int v12; // w8\n  __int64 v13; // x9\n  float v14; // s8\n  int v15; // w10\n\n  v4 = GameManager::sharedState();\n  if ( GameManager::getGameVariable(v4, \"0184\") )\n  {\n    v5 = GameManager::sharedState();\n    IntGameVariable = GameManager::getIntGameVariable(v5, \"0185\");\n    v7 = IntGameVariable >= 1 ? IntGameVariable : 300;\n    v8 = *(float *)(a1 + 15056) + a2;\n    *(float *)(a1 + 15056) = v8;\n    if ( v8 >= (float)v7 )\n    {\n      if ( (unsigned int)LevelEditorLayer::canAutoSave(a1) )\n      {\n        *(_DWORD *)(a1 + 15056) = 0;\n        LevelEditorLayer::doAutoSave(a1);\n      }\n    }\n  }\n  v9 = GameManager::sharedState();\n  result = GameManager::getGameVariable(v9, \"0186\");\n  if ( (_DWORD)result )\n  {\n    v11 = GameManager::sharedState();\n    result = GameManager::getIntGameVariable(v11, \"0187\");\n    if ( (int)result <= 600 )\n      v12 = 600;\n    else\n      v12 = result;\n    v13 = *(_QWORD *)(a1 + 1936);\n    if ( (int)result < 1 )\n      v12 = 3600;\n    v14 = *(double *)(a1 + 14688) + (double)*(int *)(v13 + 652);\n    v15 = *(_DWORD *)(v13 + 1464);\n    if ( v15 < 1 || (float)(unsigned int)v15 > v14 )\n    {\n      v15 = (int)v14;\n      *(_DWORD *)(v13 + 1464) = (int)v14;\n    }\n    if ( (float)(v14 - (float)v15) >= (float)v12 )\n    {\n      result = LevelEditorLayer::canAutoSave(a1);\n      if ( (_DWORD)result )\n      {\n        *(_DWORD *)(*(_QWORD *)(a1 + 1936) + 1464LL) = (int)v14;\n        return LevelEditorLayer::doAutoBackup(a1);\n      }\n    }\n  }\n  return result;\n}", "assembly": "; \n; LevelEditorLayer::checkAutoSave from 0x1003ffc3c to 0x1003ffd78 (316 bytes)\n; \n; 1 xrefs:\n; > LevelEditorLayer::updateEditor @ 0x1003f8218\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 11:04:38 +0000\n; \nSTP             D9, D8, [SP,#-0x10+var_20]!                            ; +0x0, 0x1003ffc3c\nSTP             X20, X19, [SP,#0x20+var_10]                            ; +0x4, 0x1003ffc40\nSTP             X29, X30, [SP,#0x20+var_s0]                            ; +0x8, 0x1003ffc44\nADD             X29, SP, #0x20                                         ; +0xc, 0x1003ffc48\nFMOV            S8, S0                                                 ; +0x10, 0x1003ffc4c\nMOV             X19, X0                                                ; +0x14, 0x1003ffc50\nBL              GameManager__sharedState                               ; +0x18, 0x1003ffc54\nADRL            X1, a0184; \"0184\"                                      ; +0x1c, 0x1003ffc58\nBL              GameManager__getGameVariable                           ; +0x24, 0x1003ffc60\nCBZ             W0, loc_1003FFCB4                                      ; +0x28, 0x1003ffc64\nBL              GameManager__sharedState                               ; +0x2c, 0x1003ffc68\nADRL            X1, a0185; \"0185\"                                      ; +0x30, 0x1003ffc6c\nBL              GameManager__getIntGameVariable                        ; +0x38, 0x1003ffc74\nCMP             W0, #1                                                 ; +0x3c, 0x1003ffc78\nMOV             W8, #0x12C                                             ; +0x40, 0x1003ffc7c\nCSEL            W8, W8, W0, LT                                         ; +0x44, 0x1003ffc80\nLDR             S0, [X19,#0x3AD0]                                      ; +0x48, 0x1003ffc84\nFADD            S0, S0, S8                                             ; +0x4c, 0x1003ffc88\nSTR             S0, [X19,#0x3AD0]                                      ; +0x50, 0x1003ffc8c\nSCVTF           S1, W8                                                 ; +0x54, 0x1003ffc90\nFCMP            S0, S1                                                 ; +0x58, 0x1003ffc94\nB.LT            loc_1003FFCB4                                          ; +0x5c, 0x1003ffc98\nMOV             X0, X19                                                ; +0x60, 0x1003ffc9c\nBL              LevelEditorLayer__canAutoSave                          ; +0x64, 0x1003ffca0\nCBZ             W0, loc_1003FFCB4                                      ; +0x68, 0x1003ffca4\nSTR             WZR, [X19,#0x3AD0]                                     ; +0x6c, 0x1003ffca8\nMOV             X0, X19                                                ; +0x70, 0x1003ffcac\nBL              LevelEditorLayer__doAutoSave                           ; +0x74, 0x1003ffcb0\nBL              GameManager__sharedState                               ; +0x78, 0x1003ffcb4\nADRL            X1, a0186; \"0186\"                                      ; +0x7c, 0x1003ffcb8\nBL              GameManager__getGameVariable                           ; +0x84, 0x1003ffcc0\nCBZ             W0, loc_1003FFD68                                      ; +0x88, 0x1003ffcc4\nBL              GameManager__sharedState                               ; +0x8c, 0x1003ffcc8\nADRL            X1, a0187; \"0187\"                                      ; +0x90, 0x1003ffccc\nBL              GameManager__getIntGameVariable                        ; +0x98, 0x1003ffcd4\nCMP             W0, #0x258                                             ; +0x9c, 0x1003ffcd8\nMOV             W8, #0x258                                             ; +0xa0, 0x1003ffcdc\nCSEL            W8, W0, W8, GT                                         ; +0xa4, 0x1003ffce0\nCMP             W0, #1                                                 ; +0xa8, 0x1003ffce4\nLDR             X9, [X19,#0x790]                                       ; +0xac, 0x1003ffce8\nLDR             W10, [X9,#0x28C]                                       ; +0xb0, 0x1003ffcec\nSCVTF           D0, W10                                                ; +0xb4, 0x1003ffcf0\nMOV             W10, #0xE10                                            ; +0xb8, 0x1003ffcf4\nCSEL            W8, W10, W8, LT                                        ; +0xbc, 0x1003ffcf8\nLDR             D1, [X19,#0x3960]                                      ; +0xc0, 0x1003ffcfc\nFADD            D0, D1, D0                                             ; +0xc4, 0x1003ffd00\nFCVT            S8, D0                                                 ; +0xc8, 0x1003ffd04\nLDR             W10, [X9,#0x5B8]                                       ; +0xcc, 0x1003ffd08\nCMP             W10, #1                                                ; +0xd0, 0x1003ffd0c\nB.LT            loc_1003FFD20                                          ; +0xd4, 0x1003ffd10\nUCVTF           S0, W10                                                ; +0xd8, 0x1003ffd14\nFCMP            S0, S8                                                 ; +0xdc, 0x1003ffd18\nB.LE            loc_1003FFD28                                          ; +0xe0, 0x1003ffd1c\nFCVTZS          W10, S8                                                ; +0xe4, 0x1003ffd20\nSTR             W10, [X9,#0x5B8]                                       ; +0xe8, 0x1003ffd24\nSCVTF           S0, W10                                                ; +0xec, 0x1003ffd28\nFSUB            S0, S8, S0                                             ; +0xf0, 0x1003ffd2c\nUCVTF           S1, W8                                                 ; +0xf4, 0x1003ffd30\nFCMP            S0, S1                                                 ; +0xf8, 0x1003ffd34\nB.LT            loc_1003FFD68                                          ; +0xfc, 0x1003ffd38\nMOV             X0, X19                                                ; +0x100, 0x1003ffd3c\nBL              LevelEditorLayer__canAutoSave                          ; +0x104, 0x1003ffd40\nCBZ             W0, loc_1003FFD68                                      ; +0x108, 0x1003ffd44\nFCVTZS          W8, S8                                                 ; +0x10c, 0x1003ffd48\nLDR             X9, [X19,#0x790]                                       ; +0x110, 0x1003ffd4c\nSTR             W8, [X9,#0x5B8]                                        ; +0x114, 0x1003ffd50\nMOV             X0, X19                                                ; +0x118, 0x1003ffd54\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0x11c, 0x1003ffd58\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0x120, 0x1003ffd5c\nLDP             D9, D8, [SP+0x20+var_20],#0x30                         ; +0x124, 0x1003ffd60\nB               LevelEditorLayer__doAutoBackup                         ; +0x128, 0x1003ffd64\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0x12c, 0x1003ffd68\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0x130, 0x1003ffd6c\nLDP             D9, D8, [SP+0x20+var_20],#0x30                         ; +0x134, 0x1003ffd70\nRET                                                                    ; +0x138, 0x1003ffd74", "xrefs": ["LevelEditorLayer::updateEditor @ 0x1003f8218"], "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"}