//
// sub_1005400C0 from 0x1005400c0 to 0x1005401e0 (288 bytes)
//
// 2 xrefs:
// > sub_100542004 @ 0x1005422cc
// > sub_100542450 @ 0x100542728
//
// This function is hookable on this platform (idp: arm, 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:07:42 +0000
//
_QWORD *__fastcall sub_1005400C0(
__int64 a1,
__int64 a2,
__int64 a3,
__int64 a4,
__int64 a5,
__int64 a6,
__int64 a7,
__int64 a8)
{
_QWORD *v16; // x19
double v17; // d0
v16 = operator new(0x410u);
v17 = SetupTriggerPopup::SetupTriggerPopup((__int64)v16);
*v16 = &off_1009A9148;
v16[40] = off_1009A9738;
v16[41] = &off_1009A97A8;
v16[42] = off_1009A97C0;
v16[43] = off_1009A97E0;
v16[44] = off_1009A9808;
v16[51] = off_1009A9838;
v16[54] = off_1009A98B8;
v16[68] = off_1009A98D8;
v16[83] = &off_1009A9920;
v16[84] = off_1009A9938;
v16[127] = 0;
*((_DWORD *)v16 + 256) = 0;
v16[129] = 0;
if ( (unsigned int)sub_1005401F4(v16, a1, a2, a3, a4, a5, a6, a7, v17, a8) )
{
cocos2d::CCObject::autorelease((__int64)v16);
}
else
{
(*(void (__fastcall **)(_QWORD *))(*v16 + 16LL))(v16);
return nullptr;
}
return v16;
}