//
// cocos2d::CCSpriteFrame::setFrameName from 0x1800d20a0 to 0x1800d2140 (160 bytes)
//
// 2 xrefs:
// > ??> @ 0x1801438a8
// > ??> @ 0x1801ba464
//
// 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
//
// Hidden C++ exception states: #wind=1
void __fastcall cocos2d::CCSpriteFrame::setFrameName(__int64 a1, void **a2)
{
void **v2; // rbx
void **v3; // rcx
unsigned __int64 v4; // rdx
_QWORD *v5; // rcx
v2 = a2;
v3 = (void **)(a1 + 168);
if ( v3 != a2 )
{
if ( (unsigned __int64)a2[3] > 0xF )
a2 = (void **)*a2;
sub_180010050(v3, a2, (size_t)v2[2]);
}
v4 = (unsigned __int64)v2[3];
if ( v4 > 0xF )
{
v5 = *v2;
if ( v4 + 1 >= 0x1000 )
{
if ( (unsigned __int64)v5 - *(v5 - 1) - 8 > 0x1F )
invalid_parameter_noinfo_noreturn();
v5 = (_QWORD *)*(v5 - 1);
}
j_j_free_0(v5);
}
v2[2] = nullptr;
v2[3] = (void *)15;
*(_BYTE *)v2 = 0;
}