//
// sub_18006CEB0 from 0x18006ceb0 to 0x18006cf5a (170 bytes)
//
// 7 xrefs:
// > cocos2d::CCFileUtils::fullPathForFilename @ 0x18006f459
// > unknown_libname_26 @ 0x1800e28d7
// > sub_1800E35D0 @ 0x1800e35d7
// > ??> @ 0x18013a583
// > ??> @ 0x18013a593
// > ??> @ 0x180140adc
// > ??> @ 0x1801b4044
//
// 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 __fastcall sub_18006CEB0(__int64 a1)
{
unsigned __int64 v1; // rdx
_QWORD *v3; // rcx
unsigned __int64 v4; // rdx
void *v5; // rcx
v1 = *(_QWORD *)(a1 + 56);
if ( v1 > 0xF )
{
v3 = *(_QWORD **)(a1 + 32);
if ( v1 + 1 >= 0x1000 )
{
if ( (unsigned __int64)v3 - *(v3 - 1) - 8 > 0x1F )
goto LABEL_12;
v3 = (_QWORD *)*(v3 - 1);
}
j_j_free_0(v3);
}
*(_QWORD *)(a1 + 48) = 0;
*(_QWORD *)(a1 + 56) = 15;
*(_BYTE *)(a1 + 32) = 0;
v4 = *(_QWORD *)(a1 + 24);
if ( v4 > 0xF )
{
v5 = *(void **)a1;
if ( v4 + 1 < 0x1000 )
{
LABEL_10:
j_j_free_0(v5);
goto LABEL_11;
}
if ( (unsigned __int64)v5 - *((_QWORD *)v5 - 1) - 8 <= 0x1F )
{
v5 = *((void **)v5 - 1);
goto LABEL_10;
}
LABEL_12:
invalid_parameter_noinfo_noreturn();
}
LABEL_11:
*(_QWORD *)(a1 + 16) = 0;
*(_QWORD *)(a1 + 24) = 15;
*(_BYTE *)a1 = 0;
}