//
// EditorUI::createObject from 0x1401b32a0 to 0x1401b33dd (317 bytes)
//
// 18 xrefs:
// > EditorUI::onCreateObject @ 0x1401b2ca3
// > EditorUI::addObjectsToSmartTemplate @ 0x1401b64be
// > EditorUI::createPrefab @ 0x1401b7615
// > EditorUI::processSmartObjectsFromType @ 0x1401b7e93
// > EditorUI::processSmartObjectsFromType @ 0x1401b7f8f
// > EditorUI::createNewKeyframeAnim @ 0x1401b9237
// > EditorUI::createLoop @ 0x1401b9651
// > EditorUI::createLoop @ 0x1401b993d
// > EditorUI::createGradientFromSelection @ 0x1401b9e20
// > EditorUI::createEdgeForObject @ 0x1401fa629
// > EditorUI::createOutlines @ 0x1401fad70
// > EditorUI::createOutlines @ 0x1401faed3
// > EditorUI::createRockBases @ 0x1401fb82b
// > EditorUI::createRockBases @ 0x1401fb9dd
// > EditorUI::createExtraObject @ 0x1401fea7b
// > ??> @ 0x1408a1820
// > ??> @ 0x1408a1830
// > ??> @ 0x140919ff4
//
// 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:27:56 +0000
//
__int64 __fastcall EditorUI::createObject(__int64 a1, unsigned int a2, const struct cocos2d::CCPoint *a3)
{
__int64 v3; // rbx
__int64 v5; // rax
__int64 result; // rax
__int64 v7; // rbx
float v8; // xmm1_4
float v9; // xmm0_4
__int64 v10; // rax
float v11; // xmm1_4
float v12; // xmm0_4
float v13; // xmm0_4
__int64 v14; // rax
float v15; // xmm2_4
char v16; // [rsp+50h] [rbp+8h] BYREF
v3 = *(_QWORD *)(a1 + 1512);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v16, a3);
result = LevelEditorLayer::createObject(v3, a2, v5, 0);
v7 = result;
if ( result )
{
v8 = *(float *)(result + 1320);
if ( v8 != 1.0 || *(float *)(result + 1324) != 1.0 )
{
v9 = roundf(v8 * 1000.0);
*(_DWORD *)(v7 + 64) = 0;
v10 = *(_QWORD *)v7;
v11 = (float)(int)v9 / 1000.0;
*(float *)(v7 + 1160) = v11;
*(float *)(v7 + 996) = v11;
(*(void (__fastcall **)(__int64))(v10 + 1288))(v7);
v12 = *(float *)(v7 + 1324);
*(_BYTE *)(v7 + 848) = 1;
*(_BYTE *)(v7 + 872) = 1;
v13 = roundf(v12 * 1000.0);
*(_DWORD *)(v7 + 68) = 0;
v14 = *(_QWORD *)v7;
v15 = (float)(int)v13 / 1000.0;
*(float *)(v7 + 1164) = v15;
*(float *)(v7 + 1000) = v15;
(*(void (__fastcall **)(__int64))(v14 + 1296))(v7);
*(_BYTE *)(v7 + 848) = 1;
*(_BYTE *)(v7 + 872) = 1;
}
return v7;
}
return result;
}