//
// SetTargetIDLayer::create from 0x1002a7c90 to 0x1002a7e3f (431 bytes)
//
// 2 xrefs:
// > EditorUI::editObject @ 0x1000099af
// > EditorUI::editObject @ 0x10000a084
//
// 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:27:56 +0000
//
_QWORD *__fastcall SetTargetIDLayer::create(int a1, int a2, __int128 *a3, __int128 *a4, int a5, int a6, int a7)
{
_QWORD *v10; // rbx
char v11; // r14
__int128 v13; // [rsp+20h] [rbp-70h] BYREF
void *v14; // [rsp+30h] [rbp-60h]
__int128 v15; // [rsp+40h] [rbp-50h] BYREF
void *__p; // [rsp+50h] [rbp-40h]
int v17; // [rsp+64h] [rbp-2Ch]
v17 = a5;
v10 = operator new(0x400u);
SetupTriggerPopup::SetupTriggerPopup((__int64)v10);
*v10 = off_100B0CE00;
v10[40] = off_100B0D3F0;
v10[41] = &off_100B0D460;
v10[42] = off_100B0D478;
v10[43] = off_100B0D498;
v10[44] = off_100B0D4C0;
v10[51] = off_100B0D4F0;
v10[54] = off_100B0D570;
v10[68] = off_100B0D590;
v10[83] = &off_100B0D5D8;
v10[84] = off_100B0D5F0;
v10[127] = 0;
if ( (*(_BYTE *)a3 & 1) != 0 )
{
sub_10001AD30(&v13, *((const void **)a3 + 2), *((_QWORD *)a3 + 1));
if ( (*(_BYTE *)a4 & 1) != 0 )
goto LABEL_3;
}
else
{
v14 = *((void **)a3 + 2);
v13 = *a3;
if ( (*(_BYTE *)a4 & 1) != 0 )
{
LABEL_3:
sub_10001AD30(&v15, *((const void **)a4 + 2), *((_QWORD *)a4 + 1));
goto LABEL_6;
}
}
__p = *((void **)a4 + 2);
v15 = *a4;
LABEL_6:
v11 = sub_1002A7EA0((_DWORD)v10, a1, a2, (unsigned int)&v13, (unsigned int)&v15, v17, a6, a7);
if ( (v15 & 1) == 0 )
{
if ( (v13 & 1) == 0 )
goto LABEL_8;
LABEL_11:
operator delete(v14);
if ( v11 )
goto LABEL_9;
LABEL_12:
(*(void (__fastcall **)(_QWORD *))(*v10 + 16LL))(v10);
return nullptr;
}
operator delete(__p);
if ( (v13 & 1) != 0 )
goto LABEL_11;
LABEL_8:
if ( !v11 )
goto LABEL_12;
LABEL_9:
cocos2d::CCObject::autorelease(v10);
return v10;
}