//
// cocos2d::CCFileUtils::addSearchResolutionsOrder from 0xd76a34 to 0xd76b78 (324 bytes)
//
// 3 xrefs:
// > ??> @ 0x9ac18
// > ??> @ 0x152d930
// > ??> @ 0x152ddf0
//
// 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:03 +0000
//
__int64 __fastcall cocos2d::CCFileUtils::addSearchResolutionsOrder(cocos2d::CCFileUtils *this, const char *a2)
{
size_t v3; // x0
size_t v4; // x19
const char *v5; // x1
char *v6; // x3
void ***v7; // x0
__int64 *v8; // x1
size_t v9; // x3
unsigned __int64 v11; // x0
__int64 v12; // x21
char *v13; // x0
_BYTE *v14; // x3
__int64 v16; // [xsp+50h] [xbp+50h] BYREF
size_t v17; // [xsp+58h] [xbp+58h]
void *v18; // [xsp+60h] [xbp+60h]
v16 = 0;
v17 = 0;
v18 = nullptr;
v3 = strlen(a2);
v4 = v3;
v5 = a2;
if ( v3 > 0x16 )
{
v11 = (v3 + 16) & 0xFFFFFFFFFFFFFFF0LL;
v12 = v11 | 1;
v13 = (char *)operator new(v11);
v16 = v12;
v5 = a2;
v6 = v13;
v18 = v13;
v17 = v4;
LABEL_11:
v14 = memcpy(v6, v5, v4);
v7 = (void ***)((char *)this + 16);
v14[v4] = 0;
v8 = *((__int64 **)this + 3);
if ( (unsigned __int64)v8 < *((_QWORD *)this + 4) )
goto LABEL_4;
LABEL_12:
std::vector::__push_back_slow_path(v7, &v16);
goto LABEL_7;
}
LOBYTE(v16) = 2 * v3;
v6 = (char *)&v16 + 1;
if ( v3 )
goto LABEL_11;
v7 = (void ***)((char *)this + 16);
BYTE1(v16) = 0;
v8 = *((__int64 **)this + 3);
if ( (unsigned __int64)v8 >= *((_QWORD *)this + 4) )
goto LABEL_12;
LABEL_4:
if ( v8 )
{
v9 = v17;
*v8 = v16;
v8[1] = v9;
v8[2] = (__int64)v18;
v16 = 0;
v8 = (__int64 *)v7[1];
v17 = 0;
v18 = nullptr;
}
v7[1] = (void **)(v8 + 3);
LABEL_7:
if ( (v16 & 1) != 0 )
operator delete(v18);
return _stack_chk_guard;
}