// // LocalLevelManager::tryLoadMainLevelString from 0x14046add0 to 0x14046b066 (662 bytes) // // 2 xrefs: // > LocalLevelManager::getMainLevelString @ 0x14046b088 // > @ 0x140928058 // // 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:32:36 +0000 // // Hidden C++ exception states: #wind=3 void __fastcall LocalLevelManager::tryLoadMainLevelString(_QWORD *a1, unsigned int a2) { _QWORD *v3; // rcx __int64 v4; // rax __int64 v5; // rdi cocos2d::CCString *v6; // rax const char *CString; // rax size_t v8; // rbx size_t v9; // r8 void **v10; // r8 const char *v11; // rcx cocos2d::CCString *v12; // rax const char *v13; // rax size_t v14; // rbx void **v15; // rcx void **v16; // rdx void *v17; // rcx void *v18; // rcx unsigned __int8 v19[8]; // [rsp+30h] [rbp-39h] BYREF _BYTE v20[16]; // [rsp+38h] [rbp-31h] BYREF void *Block[2]; // [rsp+48h] [rbp-21h] BYREF size_t Size; // [rsp+58h] [rbp-11h] unsigned __int64 v23; // [rsp+60h] [rbp-9h] void *v24[2]; // [rsp+68h] [rbp-1h] BYREF __int128 v25; // [rsp+78h] [rbp+Fh] _QWORD v26[4]; // [rsp+88h] [rbp+1Fh] BYREF *(_DWORD *)v19 = a2; v3 = (_QWORD *)(a1[51] + 16 * (a1[54] & (0x100000001B3LL * (HIBYTE(a2) ^ (0x100000001B3LL * (BYTE2(a2) ^ (0x100000001B3LL * ((0x100000001B3LL * ((unsigned __int8)a2 ^ 0xCBF29CE484222325uLL)) ^ BYTE1(a2))))))))); v4 = v3[1]; if ( v4 != a1[49] ) { v3 = (_QWORD *)*v3; if ( a2 == *(_DWORD *)(v4 + 16) ) goto LABEL_7; while ( (_QWORD *)v4 != v3 ) { v4 = *(_QWORD *)(v4 + 8); if ( a2 == *(_DWORD *)(v4 + 16) ) goto LABEL_7; } } v4 = 0; LABEL_7: if ( !v4 ) { v5 = cocos2d::CCFileUtils::sharedFileUtils(v3); v6 = cocos2d::CCString::createWithFormat("levels/%i.txt", *(_DWORD *)v19); CString = cocos2d::CCString::getCString(v6); *(_OWORD *)v24 = 0; v25 = 0; v8 = -1; v9 = -1; do ++v9; while ( CString[v9] ); sub_14003D230(v24, CString, v9); v10 = v24; if ( *((_QWORD *)&v25 + 1) > 0xFu ) v10 = (void **)v24[0]; (*(void (__fastcall **)(__int64, _QWORD *, void **, _QWORD))(*(_QWORD *)v5 + 40LL))(v5, v26, v10, 0); v11 = (const char *)v26; if ( v26[3] > 0xFu ) v11 = (const char *)v26[0]; v12 = cocos2d::CCString::createWithContentsOfFile(v11); if ( v12 ) { v13 = cocos2d::CCString::getCString(v12); *(_OWORD *)Block = 0; Size = 0; v23 = 0; do ++v8; while ( v13[v8] ); sub_14003D230(Block, v13, v8); v14 = Size; if ( Size ) { v15 = (void **)(*(_QWORD *)sub_140067D30((__int64)(a1 + 48), (__int64)v20, v19) + 24LL); if ( v15 != Block ) { v16 = Block; if ( v23 > 0xF ) v16 = (void **)Block[0]; sub_1400405A0(v15, v16, v14); } } if ( v23 > 0xF ) { v17 = Block[0]; if ( v23 + 1 >= 0x1000 ) { v17 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v17 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free(v17); } } sub_14003D310((__int64)v26); if ( *((_QWORD *)&v25 + 1) > 0xFu ) { v18 = v24[0]; if ( (unsigned __int64)(*((_QWORD *)&v25 + 1) + 1LL) >= 0x1000 ) { v18 = *((void **)v24[0] - 1); if ( (unsigned __int64)((char *)v24[0] - (char *)v18 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free(v18); } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source