// // LevelEditorLayer::checkAutoSave from 0x140408b10 to 0x140408ed4 (964 bytes) // // 2 xrefs: // > LevelEditorLayer::updateEditor @ 0x1403f62dc // > @ 0x140925c28 // // This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 11:31:59 +0000 // // Hidden C++ exception states: #wind=5 char __fastcall LevelEditorLayer::checkAutoSave(__int64 a1, float a2) { __int64 v3; // rcx __int64 v4; // rdi cocos2d::CCString *v5; // rax int v6; // edi void *v7; // r8 float v8; // xmm6_4 __int64 v9; // rcx __int64 v10; // rax __int64 v11; // rdi cocos2d::CCString *v12; // rax int v13; // edi void *v14; // rax __int64 v15; // rax float v16; // xmm1_4 int v17; // ecx int v18; // esi void *v20; // [rsp+30h] [rbp-40h] void *v21; // [rsp+30h] [rbp-40h] void *v22; // [rsp+30h] [rbp-40h] void *v23; // [rsp+30h] [rbp-40h] void *Block[2]; // [rsp+38h] [rbp-38h] BYREF __int64 v25; // [rsp+48h] [rbp-28h] unsigned __int64 v26; // [rsp+50h] [rbp-20h] v3 = qword_14090BFD0; if ( !qword_14090BFD0 ) { v20 = operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager((__int64)v20); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); v3 = qword_14090BFD0; } if ( GameManager::getGameVariable(v3, "0184") ) { v4 = qword_14090BFD0; if ( !qword_14090BFD0 ) { v21 = operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager((__int64)v21); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); v4 = qword_14090BFD0; } *(_OWORD *)Block = 0; v25 = 3; v26 = 15; LODWORD(Block[0]) = 6256231; sub_140044D80(Block, "0185", 4u); v5 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v4 + 432), Block); v6 = cocos2d::CCString::intValue(v5); if ( v26 > 0xF ) { v7 = Block[0]; if ( v26 + 1 >= 0x1000 ) { v7 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v7 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free(v7); } v25 = 0; v26 = 15; LOBYTE(Block[0]) = 0; if ( v6 <= 0 ) v6 = 300; v8 = a2 + *(float *)(a1 + 15808); *(float *)(a1 + 15808) = v8; if ( v8 >= (float)v6 && LevelEditorLayer::canAutoSave(a1) ) { *(_DWORD *)(a1 + 15808) = 0; LevelEditorLayer::doAutoSave(a1); } } v9 = qword_14090BFD0; if ( !qword_14090BFD0 ) { v22 = operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager((__int64)v22); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); v9 = qword_14090BFD0; } LOBYTE(v10) = GameManager::getGameVariable(v9, "0186"); if ( (_BYTE)v10 ) { v11 = qword_14090BFD0; if ( !qword_14090BFD0 ) { v23 = operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager((__int64)v23); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); v11 = qword_14090BFD0; } *(_OWORD *)Block = 0; v25 = 3; v26 = 15; LODWORD(Block[0]) = 6256231; sub_140044D80(Block, "0187", 4u); v12 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v11 + 432), Block); v13 = cocos2d::CCString::intValue(v12); if ( v26 > 0xF ) { v14 = Block[0]; if ( v26 + 1 >= 0x1000 ) { v14 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v14 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free(v14); } if ( v13 > 0 ) { if ( v13 < 600 ) v13 = 600; } else { v13 = 3600; } v15 = *(_QWORD *)(a1 + 2168); v16 = (double)*(int *)(v15 + 724) + *(double *)(a1 + 15392); v17 = *(_DWORD *)(v15 + 1624); if ( v17 <= 0 || (float)v17 > v16 ) { v18 = (int)v16; *(_DWORD *)(v15 + 1624) = (int)v16; } else { v18 = (int)v16; } v10 = *(_QWORD *)(a1 + 2168); if ( (float)(v16 - (float)*(int *)(v10 + 1624)) >= (float)v13 ) { LOBYTE(v10) = LevelEditorLayer::canAutoSave(a1); if ( (_BYTE)v10 ) { *(_DWORD *)(*(_QWORD *)(a1 + 2168) + 1624LL) = v18; LOBYTE(v10) = LevelEditorLayer::doAutoBackup(a1); } } } return v10; }
GD Web Decomp Icon

GD Web Decomp

Raw Source