//
// sub_18006C9C0 from 0x18006c9c0 to 0x18006ca6a (170 bytes)
//
// 4 xrefs:
// > sub_18006C6D0 @ 0x18006c71c
// > cocos2d::CCFileUtils::removeFullPath @ 0x180070ca8
// > ??> @ 0x1801b3fe4
// > ??> @ 0x1801b3ff0
//
// 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_18006C9C0(__int64 a1, __int64 a2)
{
unsigned __int64 v3; // rdx
_QWORD *v4; // rcx
unsigned __int64 v5; // rdx
void *v6; // rcx
v3 = *(_QWORD *)(a2 + 56);
if ( v3 > 0xF )
{
v4 = *(_QWORD **)(a2 + 32);
if ( v3 + 1 >= 0x1000 )
{
if ( (unsigned __int64)v4 - *(v4 - 1) - 8 > 0x1F )
goto LABEL_12;
v4 = (_QWORD *)*(v4 - 1);
}
j_j_free_0(v4);
}
*(_QWORD *)(a2 + 48) = 0;
*(_QWORD *)(a2 + 56) = 15;
*(_BYTE *)(a2 + 32) = 0;
v5 = *(_QWORD *)(a2 + 24);
if ( v5 > 0xF )
{
v6 = *(void **)a2;
if ( v5 + 1 < 0x1000 )
{
LABEL_10:
j_j_free_0(v6);
goto LABEL_11;
}
if ( (unsigned __int64)v6 - *((_QWORD *)v6 - 1) - 8 <= 0x1F )
{
v6 = *((void **)v6 - 1);
goto LABEL_10;
}
LABEL_12:
invalid_parameter_noinfo_noreturn();
}
LABEL_11:
*(_QWORD *)(a2 + 16) = 0;
*(_QWORD *)(a2 + 24) = 15;
*(_BYTE *)a2 = 0;
}