// // cocos2d::ZipFile::setFilter from 0xd9d0b8 to 0xd9d0d8 (32 bytes) // // 3 xrefs: // > cocos2d::ZipFile::setFilter @ 0xd9d0f0 // > cocos2d::ZipFile::setFilter @ 0xd9d120 // > @ 0x8a2e0 // // This function is hookable on this platform (idp: arm, 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 13:08:27 +0000 // __int64 __fastcall cocos2d::ZipFile::setFilter(__int64 a1, unsigned __int8 *a2, _QWORD *a3) { __int64 v5; // x27 __int64 v6; // x20 __int64 v7; // x0 size_t v8; // x0 int v9; // w3 size_t v10; // x3 __int64 v11; // x28 __int64 *v12; // x0 _QWORD *v13; // x3 size_t v14; // x2 __int64 v15; // x1 int v16; // w28 unsigned __int8 *v17; // x0 unsigned __int8 *v18; // x1 unsigned __int8 *v19; // x3 unsigned __int8 *v20; // x2 int v21; // t1 _BOOL4 v22; // w28 __int64 *v23; // x3 __int64 *v24; // x5 char v25; // w0 __int64 **v26; // x4 size_t v27; // x1 __int64 v28; // x0 __int64 v29; // x0 __int64 *v30; // x1 __int64 *v32; // [xsp+68h] [xbp-218h] __int64 *v33; // [xsp+70h] [xbp-210h] __int64 *v34; // [xsp+78h] [xbp-208h] __int64 *v35; // [xsp+78h] [xbp-208h] __int64 *v36; // [xsp+78h] [xbp-208h] __int64 v37; // [xsp+88h] [xbp-1F8h] __int64 v38; // [xsp+90h] [xbp-1F0h] __int64 v39; // [xsp+A0h] [xbp-1E0h] BYREF _QWORD v40[2]; // [xsp+A8h] [xbp-1D8h] BYREF __int64 v41; // [xsp+B8h] [xbp-1C8h] BYREF size_t v42; // [xsp+C0h] [xbp-1C0h] void *v43; // [xsp+C8h] [xbp-1B8h] __int64 v44[2]; // [xsp+D0h] [xbp-1B0h] BYREF unsigned __int8 *v45; // [xsp+E0h] [xbp-1A0h] _QWORD v46[17]; // [xsp+E8h] [xbp-198h] BYREF char v47[264]; // [xsp+170h] [xbp-110h] BYREF if ( !a3 || !*a3 ) return 0; v5 = (__int64)(a3 + 1); v6 = a3[2]; if ( v6 ) { std::__tree,std::__map_value_compare,std::less,true>,std::allocator>>::destroy( v5, *(void **)v6); std::__tree,std::__map_value_compare,std::less,true>,std::allocator>>::destroy( v5, *(void **)(v6 + 8)); if ( (*(_BYTE *)(v6 + 32) & 1) != 0 ) operator delete(*(void **)(v6 + 48)); operator delete((void *)v6); } v7 = *a3; a3[1] = a3 + 2; a3[3] = 0; a3[2] = 0; if ( !(unsigned int)cocos2d::unzGoToFirstFile64(v7, v46, v47, 256) ) { do { while ( (unsigned int)cocos2d::unzGetFilePos(*a3, v40) ) { LABEL_10: if ( (unsigned int)cocos2d::unzGoToNextFile64(*a3, v46, v47, 256) ) return 1; } v41 = 0; v42 = 0; v43 = nullptr; v8 = strlen(v47); std::string::__init(&v41, v47, v8); v9 = *a2; if ( (v9 & 1) != 0 ) { v10 = *((_QWORD *)a2 + 1); if ( !v10 ) goto LABEL_14; } else { LODWORD(v10) = v9 >> 1; if ( !(_DWORD)v10 ) goto LABEL_14; v10 = (int)v10; } std::string::basic_string(v44, (__int64)&v41, 0, v10); v14 = LOBYTE(v44[0]) >> 1; if ( (v44[0] & 1) != 0 ) v14 = v44[1]; v15 = *a2 >> 1; if ( (*a2 & 1) != 0 ) v15 = *((_QWORD *)a2 + 1); if ( v14 == v15 ) { v17 = (unsigned __int8 *)v44 + 1; if ( (v44[0] & 1) != 0 ) v17 = v45; v18 = a2 + 1; if ( (*a2 & 1) != 0 ) v18 = *((unsigned __int8 **)a2 + 2); if ( (v44[0] & 1) == 0 ) { if ( v14 ) { if ( *v17 != *v18 ) goto LABEL_16; v19 = v17 + 1; v20 = &v17[v14]; while ( 1 ) { ++v18; if ( v19 == v20 ) break; v21 = *v19++; if ( *v18 != v21 ) goto LABEL_16; } } goto LABEL_14; } v16 = 1; if ( v14 ) { v22 = memcmp(v17, v18, v14) == 0; operator delete(v45); if ( !v22 ) goto LABEL_16; goto LABEL_14; } } else { if ( (v44[0] & 1) == 0 ) goto LABEL_16; v16 = 0; } operator delete(v45); if ( !v16 ) goto LABEL_16; LABEL_14: v38 = v40[1]; v37 = v46[7]; v11 = v40[0]; v12 = std::__tree,std::__map_value_compare,std::less,true>,std::allocator>>::__find_equal( v5, &v39, (__int64)&v41); v13 = (_QWORD *)*v12; if ( !*v12 ) { v34 = v12; v23 = (__int64 *)operator new(0x50u); v24 = v23 + 4; v25 = v41; v26 = (__int64 **)v34; v23[4] = 0; v23[5] = 0; v23[6] = 0; if ( (v25 & 1) != 0 ) { v32 = v23; v33 = v34; v36 = v23 + 4; std::string::__init(v24, v43, v42); v23 = v32; v26 = (__int64 **)v33; v24 = v36; } else { v27 = v42; v23[4] = v41; v23[5] = v27; v23[6] = (__int64)v43; } v24[3] = 0; v24[4] = 0; v24[5] = 0; v28 = v39; v23[1] = 0; *v23 = 0; v23[2] = v28; *v26 = v23; v29 = *(_QWORD *)a3[1]; if ( v29 ) { a3[1] = v29; v30 = *v26; } else { v30 = v23; } v35 = v23; std::__tree_balance_after_insert *>((__int64 *)a3[2], v30); v13 = v35; ++a3[3]; } v13[8] = v38; v13[7] = v11; v13[9] = v37; LABEL_16: if ( (v41 & 1) == 0 ) goto LABEL_10; operator delete(v43); } while ( !(unsigned int)cocos2d::unzGoToNextFile64(*a3, v46, v47, 256) ); } return 1; }
GD Web Decomp Icon

GD Web Decomp

Raw Source