//
// sub_18005C450 from 0x18005c450 to 0x18005c52e (222 bytes)
//
// 5 xrefs:
// > sub_18005C450 @ 0x18005c50b
// > cocos2d::CCClippingNode::visit @ 0x18005c81a
// > ??> @ 0x180139148
// > ??> @ 0x180139158
// > ??> @ 0x1801b3060
//
// 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
//
__int64 __fastcall sub_18005C450(__int64 a1, __int64 a2)
{
__int64 result; // rax
_QWORD *v5; // rbx
__int64 v6; // rdi
unsigned __int64 i; // rdi
(*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 640LL))(a1);
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 464LL))(a1);
if ( result )
{
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 464LL))(a1);
if ( result )
{
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 464LL))(a1);
if ( **(_DWORD **)(result + 56) )
{
v5 = *(_QWORD **)(*(_QWORD *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 464LL))(a1) + 56) + 16LL);
v6 = 8LL * **(unsigned int **)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 464LL))(a1) + 56);
result = *(_QWORD *)(*(_QWORD *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 464LL))(a1) + 56) + 16LL)
- 8LL;
for ( i = result + v6; (unsigned __int64)v5 <= i; ++v5 )
{
if ( !*v5 )
break;
result = sub_18005C450(*v5, a2);
}
}
}
}
return result;
}