// // cocos2d::CCFileUtils::fullPathForFilename from 0x7e9bc4 to 0x7e9fb4 (1008 bytes) // // 0 xrefs: // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // 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 12:00:58 +0000 // cocos2d::CCFileUtils *__fastcall cocos2d::CCFileUtils::fullPathForFilename( cocos2d::CCFileUtils *this, const char *a2, char *a3, int a4) { size_t v7; // r0 size_t v8; // r0 int (__fastcall *v9)(const char *, int *); // r9 size_t v10; // r0 int v11; // r9 size_t v12; // r0 size_t v13; // r0 int *v14; // r5 cocos2d::CCDirector *v15; // r0 int i; // r3 cocos2d::CCDirector *v17; // r0 float v18; // r0 int v19; // r8 cocos2d::CCDirector *v20; // r0 void (__fastcall *v21)(int *, const char *, int *, int *); // r9 void (__fastcall *v22)(int *, const char *, int *, int *); // r9 int v23; // r0 int v24; // r1 _BYTE *v25; // r2 int v26; // r3 size_t v27; // r0 int v28; // r0 int v29; // r1 _BYTE *v30; // r2 int v31; // r3 size_t v32; // r0 int v33; // r0 int v34; // r1 _BYTE *v35; // r2 size_t v36; // r0 int v38; // [sp+Ch] [bp-90h] int v39; // [sp+10h] [bp-8Ch] int **v40; // [sp+14h] [bp-88h] _BYTE v42[8]; // [sp+2Ch] [bp-70h] BYREF int v43[3]; // [sp+34h] [bp-68h] BYREF unsigned __int8 v44[12]; // [sp+40h] [bp-5Ch] BYREF int v45; // [sp+4Ch] [bp-50h] BYREF int v46; // [sp+50h] [bp-4Ch] _BYTE *v47; // [sp+54h] [bp-48h] int v48; // [sp+58h] [bp-44h] BYREF int v49; // [sp+5Ch] [bp-40h] _BYTE *v50; // [sp+60h] [bp-3Ch] int v51[3]; // [sp+64h] [bp-38h] BYREF int v52; // [sp+70h] [bp-2Ch] BYREF int v53; // [sp+74h] [bp-28h] int v54; // [sp+78h] [bp-24h] int v55; // [sp+7Ch] [bp-20h] BYREF int v56; // [sp+80h] [bp-1Ch] _BYTE *v57; // [sp+84h] [bp-18h] int v58[3]; // [sp+88h] [bp-14h] BYREF if ( !*a3 ) { *(_DWORD *)this = 0; *((_DWORD *)this + 1) = 0; *((_DWORD *)this + 2) = 0; v7 = strlen(a3); std::string::__init((int *)this, a3, v7); return this; } memset(v43, 0, sizeof(v43)); v8 = strlen(a3); std::string::__init(v43, a3, v8); v9 = *(int (__fastcall **)(const char *, int *))(*(_DWORD *)a2 + 84); v55 = 0; v56 = 0; v57 = nullptr; v10 = strlen(a3); std::string::__init(&v55, a3, v10); v11 = v9(a2, &v55); std::string::~string((int)&v55); if ( v11 ) { *(_DWORD *)this = 0; *((_DWORD *)this + 1) = 0; *((_DWORD *)this + 2) = 0; v12 = strlen(a3); std::string::__init((int *)this, a3, v12); goto LABEL_46; } v55 = 0; v56 = 0; v57 = nullptr; v13 = strlen(a3); std::string::__init(&v55, a3, v13); v40 = (int **)(a2 + 44); v14 = std::__tree,std::__map_value_compare,std::less,true>,std::allocator>>::find( (int)(a2 + 44), (unsigned __int8 *)&v55); std::string::~string((int)&v55); if ( v14 != (int *)(a2 + 48) ) { std::string::basic_string((int *)this, (int)(v14 + 7)); goto LABEL_46; } (*(void (__fastcall **)(unsigned __int8 *, const char *, char *))(*(_DWORD *)a2 + 100))(v44, a2, a3); v45 = 0; v46 = 0; v47 = nullptr; v15 = (cocos2d::CCDirector *)std::string::__init(&v45, &unk_B6B226, 0); v38 = *((_DWORD *)a2 + 5); LABEL_8: if ( v38 != *((_DWORD *)a2 + 6) ) { for ( i = *((_DWORD *)a2 + 2); ; i = v39 + 12 ) { v39 = i; if ( i == *((_DWORD *)a2 + 3) ) { v38 += 12; goto LABEL_8; } v17 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v15); v18 = COERCE_FLOAT(cocos2d::CCDirector::getContentScaleFactor(v17)); if ( v18 < 4.0 || a4 ) { v20 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v18)); if ( COERCE_FLOAT(cocos2d::CCDirector::getContentScaleFactor(v20)) < 2.0 ) { v19 = 2; } else if ( a4 ) { v19 = 2; } else { v19 = 1; } } else { v19 = 0; } do { v48 = 0; v49 = 0; v50 = nullptr; if ( !v19 ) { v21 = *(void (__fastcall **)(int *, const char *, int *, int *))(*(_DWORD *)a2 + 108); std::string::basic_string(v51, (int)v44); v52 = 0; v53 = 0; v54 = 0; std::string::__init(&v52, "-uhd", 4u); v21(&v55, a2, v51, &v52); if ( (v48 & 1) != 0 ) { *v50 = 0; v49 = 0; } else { LOWORD(v48) = 0; } LABEL_26: std::string::reserve(&v48, 0); v48 = v55; v49 = v56; v50 = v57; v55 = 0; v56 = 0; v57 = nullptr; std::string::~string((int)&v55); std::string::~string((int)&v52); std::string::~string((int)v51); goto LABEL_28; } if ( v19 == 1 ) { v22 = *(void (__fastcall **)(int *, const char *, int *, int *))(*(_DWORD *)a2 + 108); std::string::basic_string(v51, (int)v44); v52 = 0; v53 = 0; v54 = 0; std::string::__init(&v52, "-hd", 3u); v22(&v55, a2, v51, &v52); if ( (v48 & 1) != 0 ) { *v50 = 0; v49 = 0; } else { LOWORD(v48) = 0; } goto LABEL_26; } std::string::operator=((unsigned __int8 *)&v48, v44); LABEL_28: (*(void (__fastcall **)(int *, const char *, int *, int, int))(*(_DWORD *)a2 + 112))(&v55, a2, &v48, v39, v38); if ( (v45 & 1) != 0 ) { *v47 = 0; v46 = 0; } else { LOWORD(v45) = 0; } std::string::reserve(&v45, 0); v23 = v55; v24 = v56; v25 = v57; v55 = 0; v56 = 0; v57 = nullptr; v45 = v23; v46 = v24; v47 = v25; std::string::~string((int)&v55); if ( (v45 & 1) != 0 ) v26 = v46; else v26 = (int)(unsigned __int8)v45 >> 1; if ( v26 ) { v55 = 0; v56 = 0; v57 = nullptr; v27 = strlen(a3); std::string::__init(&v55, a3, v27); std::string::basic_string(v58, (int)&v45); std::__tree,std::__map_value_compare,std::less,true>,std::allocator>>::__emplace_unique_key_args>( (int)v42, v40, (unsigned __int8 *)&v55, &v55); std::string::~string((int)v58); std::string::~string((int)&v55); v28 = v45; v29 = v46; v30 = v47; v45 = 0; v46 = 0; *(_DWORD *)this = v28; *((_DWORD *)this + 1) = v29; *((_DWORD *)this + 2) = v30; v47 = nullptr; std::string::~string((int)&v48); goto LABEL_45; } ++v19; v15 = (cocos2d::CCDirector *)std::string::~string((int)&v48); } while ( v19 != 3 ); } } if ( (v45 & 1) != 0 ) v31 = v46; else v31 = (int)(unsigned __int8)v45 >> 1; if ( v31 ) { v55 = 0; v56 = 0; v57 = nullptr; v32 = strlen(a3); std::string::__init(&v55, a3, v32); std::string::basic_string(v58, (int)&v45); std::__tree,std::__map_value_compare,std::less,true>,std::allocator>>::__emplace_unique_key_args>( (int)v42, v40, (unsigned __int8 *)&v55, &v55); std::string::~string((int)v58); std::string::~string((int)&v55); v33 = v45; v34 = v46; v35 = v47; v45 = 0; v46 = 0; v47 = nullptr; *(_DWORD *)this = v33; *((_DWORD *)this + 1) = v34; *((_DWORD *)this + 2) = v35; } else { *(_DWORD *)this = 0; *((_DWORD *)this + 1) = 0; *((_DWORD *)this + 2) = 0; v36 = strlen(a3); std::string::__init((int *)this, a3, v36); } LABEL_45: std::string::~string((int)&v45); std::string::~string((int)v44); LABEL_46: std::string::~string((int)v43); return this; }
GD Web Decomp Icon

GD Web Decomp

Raw Source