// // cocos2d::CCFileUtilsAndroid::isFileExist from 0xd7c540 to 0xd7c7e4 (676 bytes) // // 2 xrefs: // > @ 0xf75b8 // > @ 0x152de30 // // 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:07 +0000 // __int64 __fastcall cocos2d::CCFileUtilsAndroid::isFileExist(__int64 a1, unsigned __int8 *a2) { int v3; // w0 size_t v4; // x2 _BYTE *v5; // x1 unsigned __int8 v6; // w3 int v7; // w5 unsigned __int8 v8; // w6 size_t v9; // x0 char *v10; // x24 __int64 v11; // x21 int v12; // w1 size_t v13; // x4 unsigned __int8 *v14; // x2 char *v15; // x7 size_t v16; // x20 size_t v17; // x21 unsigned __int64 v18; // x1 char *v19; // x22 size_t v20; // x2 size_t v21; // x20 unsigned int v22; // w20 size_t v23; // x3 char *v24; // x20 __int64 v25; // x0 const char *v27; // x0 FILE *v28; // x0 char *v29; // [xsp+48h] [xbp+48h] __int64 v30; // [xsp+50h] [xbp+50h] BYREF size_t v31; // [xsp+58h] [xbp+58h] void *v32; // [xsp+60h] [xbp+60h] v3 = *a2; if ( (v3 & 1) != 0 ) { v4 = *((_QWORD *)a2 + 1); if ( v4 ) { v5 = *((_BYTE **)a2 + 2); if ( *v5 != 47 ) { v30 = 0; v31 = 0; v32 = nullptr; std::string::__init(&v30, v5, v4); v6 = v30; v7 = v30 & 1; if ( !v7 ) goto LABEL_5; goto LABEL_27; } v27 = v5; goto LABEL_39; } return 0; } if ( !(v3 >> 1) ) return 0; if ( a2[1] == 47 ) { v27 = (const char *)(a2 + 1); LABEL_39: v28 = fopen(v27, "r"); if ( v28 ) { v22 = 1; fclose(v28); return v22; } return 0; } v23 = *((_QWORD *)a2 + 1); v30 = *(_QWORD *)a2; v31 = v23; v6 = v30; v32 = *((void **)a2 + 2); v7 = v30 & 1; if ( !v7 ) { LABEL_5: v8 = *(_BYTE *)(a1 + 64); v9 = v6 >> 1; v10 = (char *)&v30 + 1; v11 = a1 + 64; v12 = v8 & 1; if ( (v8 & 1) == 0 ) goto LABEL_6; goto LABEL_28; } LABEL_27: v8 = *(_BYTE *)(a1 + 64); v11 = a1 + 64; v10 = (char *)v32; v9 = v31; v12 = v8 & 1; if ( (v8 & 1) == 0 ) { LABEL_6: v13 = v8 >> 1; v14 = (unsigned __int8 *)(a1 + 65); if ( v9 < v13 ) goto LABEL_7; goto LABEL_29; } LABEL_28: v13 = *(_QWORD *)(v11 + 8); v14 = *(unsigned __int8 **)(v11 + 16); if ( v9 < v13 ) { LABEL_7: if ( v12 ) goto LABEL_8; goto LABEL_36; } LABEL_29: if ( v13 ) { v24 = &v10[v9]; v25 = std::__search( (__int64)v10, (__int64)&v10[v9], v14, &v14[v13], (unsigned __int8 (__fastcall *)(__int64, _QWORD))std::char_traits::eq); if ( v24 == (char *)v25 || (char *)v25 != v10 ) { v8 = *(_BYTE *)(a1 + 64); v6 = v30; v7 = v30 & 1; if ( (v8 & 1) != 0 ) { LABEL_8: v15 = *(char **)(v11 + 16); v16 = *(_QWORD *)(v11 + 8); if ( v7 ) { LABEL_9: v17 = v31; v18 = (v30 & 0xFFFFFFFFFFFFFFFELL) - 1; goto LABEL_10; } LABEL_37: v17 = v6 >> 1; v18 = 22; LABEL_10: if ( v16 > v18 - v17 ) { std::string::__grow_by_and_replace((__int64)&v30, v18, v17 + v16 - v18, v17, 0, 0, v16, v15); } else if ( v16 ) { v19 = (char *)&v30 + 1; if ( v7 ) v19 = (char *)v32; if ( v17 ) { if ( v19 <= v15 && v15 < &v19[v17] ) v15 += v16; v29 = v15; memmove(&v19[v16], v19, v17); v15 = v29; } v20 = v16; v21 = v17 + v16; memmove(v19, v15, v20); if ( (v30 & 1) != 0 ) v31 = v21; else LOBYTE(v30) = 2 * v21; v19[v21] = 0; } goto LABEL_22; } LABEL_36: v15 = (char *)(a1 + 65); v16 = v8 >> 1; if ( v7 ) goto LABEL_9; goto LABEL_37; } } LABEL_22: v22 = (unsigned __int8)cocos2d::ZipFile::fileExists(qword_15607F0, &v30, v14); if ( (v30 & 1) != 0 ) operator delete(v32); return v22; }
GD Web Decomp Icon

GD Web Decomp

Raw Source