// // cocos2d::CCFileUtilsAndroid::doGetFileData from 0xd7c0e8 to 0xd7c354 (620 bytes) // // 3 xrefs: // > cocos2d::CCFileUtilsAndroid::getFileData @ 0xd7c358 // > cocos2d::CCFileUtilsAndroid::getFileDataForAsync @ 0xd7c360 // > @ 0xad3c8 // // 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 // void *__fastcall cocos2d::CCFileUtilsAndroid::doGetFileData( cocos2d::CCFileUtilsAndroid *this, char *a2, const char *a3, unsigned __int64 *a4, unsigned __int8 a5) { int v8; // w24 char *v9; // x1 __int64 v10; // x20 size_t v11; // x0 void *FileData; // x20 char *v14; // x0 FILE *v15; // x0 FILE *v16; // x22 unsigned __int64 v17; // x21 size_t v18; // x21 char v19; // w0 size_t v20; // x0 size_t v21; // x0 __int64 v22; // x0 char *v23; // [xsp+48h] [xbp+48h] char *v24; // [xsp+48h] [xbp+48h] char *v25[2]; // [xsp+58h] [xbp+58h] BYREF char *v26; // [xsp+68h] [xbp+68h] __int64 v27; // [xsp+70h] [xbp+70h] BYREF __int64 v28; // [xsp+78h] [xbp+78h] void *v29; // [xsp+80h] [xbp+80h] v8 = a5; if ( a2 && a3 && *a2 ) { (*(void (__fastcall **)(char **__return_ptr))(*(_QWORD *)this + 48LL))(v25); if ( ((__int64)v25[0] & 1) != 0 ) { v9 = v26; if ( *v26 != 47 ) goto LABEL_6; v14 = v26; } else { v9 = (char *)v25 + 1; if ( BYTE1(v25[0]) != 47 ) { LABEL_6: if ( v8 ) { v24 = v9; v27 = 0; v28 = 0; v29 = nullptr; v20 = strlen(v9); std::string::__init(&v27, v24, v20); FileData = (void *)cocos2d::ZipFile::getFileData(qword_15607F0, &v27, a4, *(_QWORD *)(qword_15607F0 + 16)); if ( (v27 & 1) == 0 ) goto LABEL_8; } else { v23 = v9; v27 = 0; v28 = 0; v10 = qword_15607F0; v29 = nullptr; v11 = strlen(v9); std::string::__init(&v27, v23, v11); FileData = (void *)cocos2d::ZipFile::getFileData(v10, &v27, a4); if ( (v27 & 1) == 0 ) goto LABEL_8; } operator delete(v29); LABEL_8: if ( FileData ) goto LABEL_9; goto LABEL_21; } v14 = (char *)v25 + 1; } v15 = fopen(v14, a3); v16 = v15; if ( v15 ) { fseek(v15, 0, 2); v17 = ftell(v16); fseek(v16, 0, 0); FileData = (void *)operator new[](v17); v18 = fread(FileData, 1u, v17, v16); fclose(v16); if ( a4 ) { v19 = (char)v25[0]; *a4 = v18; if ( (v19 & 1) == 0 ) return FileData; goto LABEL_16; } LABEL_9: if ( ((__int64)v25[0] & 1) == 0 ) return FileData; LABEL_16: operator delete(v26); return FileData; } LABEL_21: v27 = 0; v28 = 0; v29 = nullptr; std::string::__init(&v27, "Get data from file(", 0x13u); v21 = strlen(a2); v22 = std::string::append((__int64)&v27, a2, v21); std::string::append(v22, ") failed!", 9u); FileData = nullptr; if ( (v27 & 1) != 0 ) operator delete(v29); goto LABEL_9; } return nullptr; }
GD Web Decomp Icon

GD Web Decomp

Raw Source