//
// cocos2d::CCFileUtils::addSearchResolutionsOrder from 0xb0950c to 0xb09608 (252 bytes)
//
// 3 xrefs:
// > ??> @ 0x733e0
// > ??> @ 0x1217af0
// > ??> @ 0x1217fb0
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void cocos2d::CCFileUtils::addSearchResolutionsOrder(cocos2d::CCFileUtils *a1, const char *a2)
{
cocos2d::CCFileUtils_vtbl *v3; // x1
char *v4; // x2
char *v5; // x0
unsigned int *v6; // x2
int v7; // w1
char *v8; // [xsp+40h] [xbp+40h] BYREF
sub_D153B8((int)&v8, (char *)a2);
v3 = a1[3].__vftable;
if ( v3 == a1[4].__vftable )
{
std::vector::_M_emplace_back_aux((__int64)&a1[2], &v8);
v4 = v8;
}
else
{
v4 = v8;
if ( v3 )
{
v3->getClassTypeInfo = (__int64 (__fastcall *)(cocos2d::TypeInfo *__hidden))v8;
v4 = &byte_124B6C8;
v8 = &byte_124B6C8;
}
a1[3].__vftable = (cocos2d::CCFileUtils_vtbl *)&v3->~CCFileUtils;
}
v5 = v4 - 24;
if ( v4 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v6 = (unsigned int *)(v4 - 8);
do
v7 = __ldaxr(v6);
while ( __stlxr(v7 - 1, v6) );
}
else
{
v7 = *((_DWORD *)v4 - 2);
*((_DWORD *)v4 - 2) = v7 - 1;
}
if ( v7 <= 0 )
operator delete(v5);
}
}