//
// LevelBindingsLayer::create from 0x14044c580 to 0x14044c6e4 (356 bytes)
//
// 3 xrefs:
// > PlatformerControlsPopup::onKeyboard @ 0x140451840
// > PlatformerControlsPopup::onController @ 0x1404518a0
// > ??> @ 0x1409274e8
//
// 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:25 +0000
//
// Hidden C++ exception states: #wind=1
void *__fastcall LevelBindingsLayer::create(__int64 a1, char a2)
{
void *v4; // rbx
__int64 v5; // r8
int v6; // r9d
v4 = operator new(0x4B0u);
memset(v4, 0, 0x4B0u);
sub_1403D56D0((__int64)v4);
*(_QWORD *)v4 = &LevelBindingsLayer::`vftable';
*((_QWORD *)v4 + 40) = &LevelBindingsLayer::`vftable';
*((_QWORD *)v4 + 41) = &LevelBindingsLayer::`vftable';
*((_QWORD *)v4 + 42) = &LevelBindingsLayer::`vftable';
*((_QWORD *)v4 + 43) = &LevelBindingsLayer::`vftable';
*((_QWORD *)v4 + 44) = &LevelBindingsLayer::`vftable';
*((_QWORD *)v4 + 51) = &LevelBindingsLayer::`vftable';
*((_QWORD *)v4 + 54) = &LevelBindingsLayer::`vftable';
*((_QWORD *)v4 + 68) = &LevelBindingsLayer::`vftable';
*((_QWORD *)v4 + 83) = &LevelBindingsLayer::`vftable';
*((_QWORD *)v4 + 84) = &LevelBindingsLayer::`vftable';
*((_BYTE *)v4 + 1193) = 0;
*((_QWORD *)v4 + 148) = a1;
*((_BYTE *)v4 + 1192) = a2;
*((_QWORD *)v4 + 135) = a1;
*((_BYTE *)v4 + 1088) = 0;
if ( !*(_QWORD *)(a1 + 16) )
{
LevelControlConfig::bindGlobalBinds(a1, a2);
*((_BYTE *)v4 + 1193) = 1;
}
*(_BYTE *)(*((_QWORD *)v4 + 148) + 24LL) = 0;
if ( KeybindingsLayer::init((__int64 *)v4, nullptr, v5, v6) )
{
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v4);
return v4;
}
else
{
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v4 + 8LL))(v4, 1);
return nullptr;
}
}