//
// PlatformerControlsPopup::onTouch from 0x1404518c0 to 0x140451916 (86 bytes)
//
// 3 xrefs:
// > PlatformerControlsPopup::init @ 0x14044f676
// > ??> @ 0x1409277f4
// > ??> @ 0x140927800
//
// 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:32:27 +0000
//
__int64 __fastcall PlatformerControlsPopup::onTouch(__int64 a1)
{
__int64 v1; // rax
__int64 v3; // rdx
__int64 v4; // rcx
__int64 v5; // rax
v1 = *(_QWORD *)(a1 + 1032);
if ( v1 && *(_DWORD *)(v1 + 2096) == 1 )
{
PlatformerControlsPopup::ensureCustomDraft(a1);
v3 = *(_QWORD *)(a1 + 1048);
v4 = *(unsigned __int8 *)(a1 + 1041);
}
else
{
v4 = *(unsigned __int8 *)(a1 + 1041);
v3 = 0;
}
v5 = TouchControlEditLayer::create(v4, v3);
return (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 1064LL))(v5);
}