//
// SetTargetIDLayer::create from 0x140401cd0 to 0x140401e5c (396 bytes)
//
// 3 xrefs:
// > EditorUI::editObject @ 0x14011cb7e
// > EditorUI::editObject @ 0x14011d54a
// > ??> @ 0x1406d88b8
//
// 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
//
// Hidden C++ exception states: #wind=4
char *__fastcall SetTargetIDLayer::create(int a1, int a2, __int64 a3, __int64 a4)
{
char *v8; // r14
__int64 v9; // rbx
int v10; // eax
char v12[32]; // [rsp+50h] [rbp-98h] BYREF
char v13[32]; // [rsp+70h] [rbp-78h] BYREF
__int64 v14; // [rsp+90h] [rbp-58h]
__int64 v15; // [rsp+98h] [rbp-50h]
v14 = a3;
v15 = a4;
v8 = (char *)operator new(0x3B8u);
SetupTriggerPopup::SetupTriggerPopup((SetupTriggerPopup *)v8);
*(_QWORD *)v8 = &SetTargetIDLayer::`vftable';
*((_QWORD *)v8 + 40) = &SetTargetIDLayer::`vftable';
*((_QWORD *)v8 + 41) = &SetTargetIDLayer::`vftable';
*((_QWORD *)v8 + 42) = &SetTargetIDLayer::`vftable';
*((_QWORD *)v8 + 43) = &SetTargetIDLayer::`vftable';
*((_QWORD *)v8 + 44) = &SetTargetIDLayer::`vftable';
*((_QWORD *)v8 + 51) = &SetTargetIDLayer::`vftable';
*((_QWORD *)v8 + 54) = &SetTargetIDLayer::`vftable';
*((_QWORD *)v8 + 79) = &SetTargetIDLayer::`vftable';
*((_QWORD *)v8 + 80) = &SetTargetIDLayer::`vftable';
*((_QWORD *)v8 + 81) = &SetTargetIDLayer::`vftable';
*(_QWORD *)(v8 + 940) = 0;
v9 = sub_14003BDB0((__int64)v12, a4);
v10 = sub_14003BDB0((__int64)v13, a3);
if ( (unsigned __int8)SetTargetIDLayer::init((_DWORD)v8, a1, a2, v10, v9) )
{
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v8);
}
else
{
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v8 + 8LL))(v8, 1);
v8 = nullptr;
}
sub_14003A830(a3);
sub_14003A830(a4);
return v8;
}