//
// TouchControlEditLayer::create from 0xd069e4 to 0xd06e00 (1052 bytes)
//
// 3 xrefs:
// > PlatformerControlsPopup::onTouch @ 0xcfa5b4
// > PlatformerControlsPopup::onTouch @ 0xcfa5e0
// > ??> @ 0xf1c78
//
// 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 13:06:57 +0000
//
__int64 *__fastcall TouchControlEditLayer::create(
TouchControlEditLayer *this,
LevelControlConfig *a2,
LevelControlConfig *a3)
{
char v4; // w26
__int64 *v5; // x19
cocos2d::CCPoint *v6; // x20
__int64 v8; // x1
__int64 *v9; // x0
_BYTE v10[8]; // [xsp+70h] [xbp+70h] BYREF
v4 = (char)this;
v5 = (__int64 *)operator new(0x548u);
memset(v5, 0, 0x548u);
cocos2d::CCLayerColor::CCLayerColor((cocos2d::CCLayerColor *)v5);
v5[69] = 0;
*v5 = (__int64)&off_1419A40;
v5[40] = (__int64)off_1419F90;
v5[41] = (__int64)&off_141A000;
v5[42] = (__int64)off_141A018;
v5[43] = (__int64)off_141A038;
v5[44] = (__int64)off_141A060;
v5[51] = (__int64)&off_141A090;
v5[54] = (__int64)&off_141A110;
v5[68] = (__int64)off_141A130;
v5[70] = 0;
v5[71] = 0;
*((_BYTE *)v5 + 576) = 0;
v5[73] = 0;
*((_DWORD *)v5 + 148) = 0;
*((_BYTE *)v5 + 596) = 0;
*((_BYTE *)v5 + 597) = 0;
*((_BYTE *)v5 + 598) = 0;
*((_BYTE *)v5 + 599) = 0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)(v5 + 75));
v5[76] = 0;
*((_DWORD *)v5 + 158) = -1;
*((_DWORD *)v5 + 160) = -1;
v5[77] = 0;
v6 = (cocos2d::CCPoint *)((char *)v5 + 1052);
v5[78] = 0;
*((_BYTE *)v5 + 636) = 0;
*((_BYTE *)v5 + 637) = 0;
*((_BYTE *)v5 + 644) = 0;
*((_DWORD *)v5 + 162) = 0;
*((_BYTE *)v5 + 656) = 0;
*((_DWORD *)v5 + 163) = 0;
v5[85] = 0;
v5[86] = 0;
*((_BYTE *)v5 + 696) = 0;
*((_BYTE *)v5 + 697) = 0;
v5[88] = 0;
v5[89] = 0;
v5[90] = 0;
*((_BYTE *)v5 + 728) = 0;
*((_DWORD *)v5 + 183) = 0;
*((_BYTE *)v5 + 744) = 0;
*((_DWORD *)v5 + 184) = 0;
v5[94] = 0;
*((_DWORD *)v5 + 185) = 0;
v5[95] = 0;
v5[96] = 0;
v5[97] = 0;
v5[98] = 0;
v5[99] = 0;
v5[100] = 0;
v5[101] = 0;
*((_DWORD *)v5 + 204) = 0;
*((_DWORD *)v5 + 205) = 0;
v5[103] = 0;
*((_DWORD *)v5 + 252) = 10;
v5[107] = (__int64)(v5 + 108);
v5[110] = (__int64)(v5 + 111);
v5[104] = 0;
v5[105] = 0;
v5[106] = 0;
v5[108] = 0;
v5[109] = 0;
v5[111] = 0;
v5[112] = 0;
*((_BYTE *)v5 + 904) = 0;
*((_BYTE *)v5 + 905) = 0;
v5[114] = 0;
*((_DWORD *)v5 + 230) = 0;
v5[116] = 0;
v5[117] = 0;
v5[118] = 0;
v5[119] = 0;
v5[120] = 0;
v5[121] = 0;
v5[122] = 0;
v5[123] = 0;
*((_BYTE *)v5 + 992) = 0;
v5[125] = 0;
*((float *)v5 + 231) = 1.0;
*v5 = (__int64)&off_1508840;
v5[40] = (__int64)off_1508E30;
v5[41] = (__int64)&off_1508EA0;
v5[42] = (__int64)off_1508EB8;
v5[43] = (__int64)off_1508ED8;
v5[44] = (__int64)off_1508F00;
v5[51] = (__int64)&off_1508F30;
v5[54] = (__int64)&off_1508FB0;
v5[68] = (__int64)off_1508FD0;
v5[83] = (__int64)&off_1509018;
v5[84] = (__int64)off_1509030;
*((_BYTE *)v5 + 1012) = 0;
v5[127] = 0;
do
{
cocos2d::CCPoint::CCPoint(v6);
*((_DWORD *)v6 - 6) = 120;
*((_DWORD *)v6 - 7) = 280;
*((_DWORD *)v6 - 3) = 255;
*((_BYTE *)v6 - 4) = 0;
*((_DWORD *)v6 - 5) = 0;
*((float *)v6 - 4) = 1.0;
*((float *)v6 - 2) = 10.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v10, 95.0, 36.0);
cocos2d::CCPoint::operator=(v6, v10);
*((_BYTE *)v6 + 8) = 0;
v6 = (cocos2d::CCPoint *)((char *)v6 + 40);
*((_BYTE *)v6 - 31) = 0;
*((_BYTE *)v6 - 43) = 0;
*((_BYTE *)v6 - 30) = 0;
}
while ( v6 != (cocos2d::CCPoint *)((char *)v5 + 1252) );
v5[153] = 0;
v5[154] = 0;
v5[155] = 0;
v5[156] = 0;
v5[157] = 0;
v5[158] = 0;
v5[159] = 0;
v5[160] = 0;
*((_DWORD *)v5 + 322) = 0;
v5[162] = 0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)(v5 + 163));
*((_DWORD *)v5 + 328) = 0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)((char *)v5 + 1316));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)((char *)v5 + 1324));
*((_BYTE *)v5 + 1336) = 0;
v5[168] = 0;
*((_DWORD *)v5 + 333) = 0;
if ( (unsigned __int8)TouchControlEditLayer::init((TouchControlEditLayer *)v5, v4, a2) )
{
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v5);
}
else
{
v8 = *v5;
v9 = v5;
v5 = nullptr;
(*(void (__fastcall **)(__int64 *))(v8 + 16))(v9);
}
return v5;
}