//
// EditorUI::create from 0x6bded8 to 0x6be278 (928 bytes)
//
// 2 xrefs:
// > LevelEditorLayer::init @ 0x67c9c0
// > ??> @ 0x43890
//
// 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
//
EditorUI *EditorUI::create(LevelEditorLayer *a1)
{
__int64 v2; // x19
unsigned __int64 v3; // x0
size_t v4; // x20
void *v5; // x23
v2 = operator new(0x5A0u);
cocos2d::CCLayer::CCLayer((cocos2d::CCLayer *)v2);
*(_QWORD *)(v2 + 480) = 0;
*(_QWORD *)v2 = &off_11566B0;
*(_QWORD *)(v2 + 320) = off_1156C28;
*(_QWORD *)(v2 + 328) = &off_1156C98;
*(_QWORD *)(v2 + 336) = &off_1156CB0;
*(_QWORD *)(v2 + 344) = off_1156CD0;
*(_QWORD *)(v2 + 352) = off_1156CF0;
*(_QWORD *)(v2 + 408) = &off_1156D18;
*(_QWORD *)(v2 + 416) = &off_1156D30;
*(_QWORD *)(v2 + 424) = &off_1156D48;
*(_QWORD *)(v2 + 432) = off_1156D70;
*(_QWORD *)(v2 + 440) = off_1156DB8;
*(_QWORD *)(v2 + 448) = &off_1156E48;
*(_QWORD *)(v2 + 456) = &off_1156EA8;
*(_QWORD *)(v2 + 488) = 0;
*(_QWORD *)(v2 + 504) = 0;
*(float *)(v2 + 496) = 1.0;
v3 = sub_D146DC(v2 + 496, 10);
*(_QWORD *)(v2 + 472) = v3;
if ( v3 == 1 )
{
*(_QWORD *)(v2 + 512) = 0;
v5 = (void *)(v2 + 512);
}
else
{
if ( v3 > 0x1FFFFFFFFFFFFFFFLL )
sub_D1383C();
v4 = 8 * v3;
v5 = (void *)operator new(8 * v3);
memset(v5, 0, v4);
}
*(_QWORD *)(v2 + 464) = v5;
*(_BYTE *)(v2 + 548) = 0;
*(_DWORD *)(v2 + 544) = 0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)(v2 + 560));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)(v2 + 568));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)(v2 + 576));
*(float *)(v2 + 520) = 1.0;
*(float *)(v2 + 524) = 1.0;
*(float *)(v2 + 584) = 1.0;
*(float *)(v2 + 588) = 1.0;
*(_DWORD *)(v2 + 528) = 0;
*(_DWORD *)(v2 + 532) = 0;
*(_DWORD *)(v2 + 536) = 0;
*(_DWORD *)(v2 + 540) = 0;
*(_DWORD *)(v2 + 552) = 0;
*(_DWORD *)(v2 + 556) = 0;
*(_DWORD *)(v2 + 560) = 0;
*(_DWORD *)(v2 + 564) = 0;
*(_BYTE *)(v2 + 592) = 0;
*(_QWORD *)(v2 + 600) = 0;
*(_BYTE *)(v2 + 608) = 0;
*(_DWORD *)(v2 + 628) = -1;
*(_DWORD *)(v2 + 632) = -1;
*(_BYTE *)(v2 + 636) = 0;
*(_QWORD *)(v2 + 648) = 0;
*(_BYTE *)(v2 + 656) = 0;
*(_BYTE *)(v2 + 657) = 0;
*(_BYTE *)(v2 + 658) = 0;
*(_BYTE *)(v2 + 659) = 0;
*(_BYTE *)(v2 + 660) = 0;
*(_DWORD *)(v2 + 664) = -1;
*(_DWORD *)(v2 + 668) = -1;
*(_DWORD *)(v2 + 672) = -1;
*(_DWORD *)(v2 + 676) = -1;
*(_QWORD *)(v2 + 680) = 0;
*(_QWORD *)(v2 + 688) = 0;
*(float *)(v2 + 624) = 30.0;
*(_DWORD *)(v2 + 640) = 0;
*(_DWORD *)(v2 + 644) = 0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)(v2 + 696));
*(_BYTE *)(v2 + 704) = 0;
*(_QWORD *)(v2 + 712) = 0;
*(_QWORD *)(v2 + 720) = 0;
*(_QWORD *)(v2 + 744) = 0;
*(_QWORD *)(v2 + 752) = 0;
*(_QWORD *)(v2 + 760) = 0;
*(_QWORD *)(v2 + 768) = 0;
*(_BYTE *)(v2 + 788) = 0;
*(_BYTE *)(v2 + 789) = 0;
*(_BYTE *)(v2 + 792) = 0;
*(_BYTE *)(v2 + 793) = 0;
*(_BYTE *)(v2 + 794) = 0;
*(_BYTE *)(v2 + 795) = 0;
*(_BYTE *)(v2 + 796) = 0;
*(_BYTE *)(v2 + 797) = 0;
*(_DWORD *)(v2 + 776) = 0;
*(_DWORD *)(v2 + 780) = 0;
*(_DWORD *)(v2 + 784) = 0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)(v2 + 800));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)(v2 + 816));
*(_QWORD *)(v2 + 824) = 0;
*(_QWORD *)(v2 + 832) = 0;
*(_QWORD *)(v2 + 840) = 0;
*(_QWORD *)(v2 + 848) = 0;
*(_QWORD *)(v2 + 856) = 0;
*(_QWORD *)(v2 + 864) = 0;
*(_QWORD *)(v2 + 872) = 0;
*(_QWORD *)(v2 + 888) = 0;
*(_QWORD *)(v2 + 896) = 0;
*(_QWORD *)(v2 + 904) = 0;
*(_QWORD *)(v2 + 944) = 0;
*(_QWORD *)(v2 + 952) = 0;
*(_QWORD *)(v2 + 960) = 0;
*(_QWORD *)(v2 + 968) = 0;
*(_QWORD *)(v2 + 976) = 0;
*(_QWORD *)(v2 + 984) = 0;
*(_QWORD *)(v2 + 1008) = 0;
*(_QWORD *)(v2 + 1016) = 0;
*(_QWORD *)(v2 + 1024) = 0;
*(_QWORD *)(v2 + 1200) = 0;
*(_QWORD *)(v2 + 1216) = 0;
*(_QWORD *)(v2 + 1224) = 0;
*(_QWORD *)(v2 + 1240) = 0;
*(_DWORD *)(v2 + 1264) = 0;
*(_QWORD *)(v2 + 1272) = 0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)(v2 + 1280));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)(v2 + 1288));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)(v2 + 1296));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)(v2 + 1304));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)(v2 + 1312));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)(v2 + 1320));
*(_QWORD *)(v2 + 1328) = 0;
*(_QWORD *)(v2 + 1336) = 0;
*(_BYTE *)(v2 + 1344) = 0;
*(_QWORD *)(v2 + 1384) = 0;
*(_BYTE *)(v2 + 1345) = 0;
*(_QWORD *)(v2 + 1392) = 0;
*(_BYTE *)(v2 + 1346) = 0;
*(_QWORD *)(v2 + 1352) = 0;
*(_DWORD *)(v2 + 1360) = 0;
*(_DWORD *)(v2 + 1364) = 1;
*(_QWORD *)(v2 + 1368) = 0;
*(_QWORD *)(v2 + 1376) = 0;
*(_BYTE *)(v2 + 1400) = 0;
*(_BYTE *)(v2 + 1424) = 0;
*(_BYTE *)(v2 + 1432) = 0;
*(_BYTE *)(v2 + 1433) = 0;
*(float *)(v2 + 1428) = 1.0;
if ( EditorUI::init((EditorUI *)v2, a1) )
{
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v2);
return (EditorUI *)v2;
}
else
{
(*(void (__fastcall **)(__int64))(*(_QWORD *)v2 + 16LL))(v2);
return nullptr;
}
}