//
// sub_1800E5438 from 0x1800e5438 to 0x1800e5488 (80 bytes)
//
// 4 xrefs:
// > sub_1800E5624 @ 0x1800e568e
// > sub_1800E5624 @ 0x1800e5700
// > sub_1800E5624 @ 0x1800e9074
// > ??> @ 0x1801c55b0
//
// 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 11:22:38 +0000
//
__int64 __fastcall sub_1800E5438(cocos2d::CCComponent *a1, int a2, __int64 a3)
{
int v3; // edx
unsigned __int64 v4; // rdx
__int64 result; // rax
if ( a2 )
{
v3 = a2 - 1;
if ( v3 )
{
v4 = (unsigned int)(v3 - 1);
if ( (_DWORD)v4 )
{
if ( (_DWORD)v4 != 1 )
return 1;
LOBYTE(result) = sub_1800E4E78(a1, (void *)v4);
}
else
{
LOBYTE(result) = sub_1800E4E50(a1, (void *)v4);
}
return (unsigned __int8)result;
}
else
{
return sub_1800E5488(a1, a3);
}
}
else
{
LOBYTE(a1) = a3 != 0;
return sub_1800E55A0(a1);
}
}