//
// sub_10058E830 from 0x10058e830 to 0x10058e908 (216 bytes)
//
// 2 xrefs:
// > sub_10058E910 @ 0x10058e915
// > sub_10058E920 @ 0x10058e929
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:32:25 +0000
//
__int64 __fastcall sub_10058E830(__int64 a1)
{
void *v2; // rdi
*(_QWORD *)a1 = off_100B6F6F0;
if ( (*(_BYTE *)(a1 + 504) & 1) != 0 )
{
operator delete(*(void **)(a1 + 520));
if ( (*(_BYTE *)(a1 + 480) & 1) == 0 )
{
LABEL_3:
if ( (*(_BYTE *)(a1 + 456) & 1) == 0 )
goto LABEL_4;
goto LABEL_11;
}
}
else if ( (*(_BYTE *)(a1 + 480) & 1) == 0 )
{
goto LABEL_3;
}
operator delete(*(void **)(a1 + 496));
if ( (*(_BYTE *)(a1 + 456) & 1) == 0 )
{
LABEL_4:
if ( (*(_BYTE *)(a1 + 432) & 1) == 0 )
goto LABEL_5;
goto LABEL_12;
}
LABEL_11:
operator delete(*(void **)(a1 + 472));
if ( (*(_BYTE *)(a1 + 432) & 1) == 0 )
{
LABEL_5:
if ( (*(_BYTE *)(a1 + 408) & 1) == 0 )
goto LABEL_6;
LABEL_13:
operator delete(*(void **)(a1 + 424));
v2 = *(void **)(a1 + 320);
if ( !v2 )
return cocos2d::CCNode::dCCNode(a1);
goto LABEL_7;
}
LABEL_12:
operator delete(*(void **)(a1 + 448));
if ( (*(_BYTE *)(a1 + 408) & 1) != 0 )
goto LABEL_13;
LABEL_6:
v2 = *(void **)(a1 + 320);
if ( v2 )
{
LABEL_7:
*(_QWORD *)(a1 + 328) = v2;
operator delete(v2);
}
return cocos2d::CCNode::dCCNode(a1);
}