//
// GJMGLayer::create from 0x1006bece0 to 0x1006bedda (250 bytes)
//
// 4 xrefs:
// > GJBaseGameLayer::swapMiddleground @ 0x1000f0d36
// > GJBaseGameLayer::createMiddleground @ 0x1000f0e06
// > GJBaseGameLayer::asyncMGLoaded @ 0x1000f0ea6
// > GJBaseGameLayer::syncBGTextures @ 0x10013849f
//
// 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 12:35:31 +0000
//
char *__fastcall GJMGLayer::create(unsigned int a1)
{
char *v1; // rbx
v1 = (char *)operator new(0x1E8u);
cocos2d::CCLayer::CCLayer((__int64)v1);
*(_QWORD *)v1 = off_100B8CFC8;
*((_QWORD *)v1 + 40) = off_100B8D460;
*((_QWORD *)v1 + 41) = &off_100B8D4D0;
*((_QWORD *)v1 + 42) = off_100B8D4E8;
*((_QWORD *)v1 + 43) = off_100B8D508;
*((_QWORD *)v1 + 44) = off_100B8D530;
*((_QWORD *)v1 + 54) = 0;
v1[440] = 0;
*((_DWORD *)v1 + 111) = 0;
*(_OWORD *)(v1 + 408) = 0;
*((_DWORD *)v1 + 106) = 0;
*((_WORD *)v1 + 224) = 257;
*((_DWORD *)v1 + 113) = 0;
*(_DWORD *)(v1 + 455) = 0;
*((_OWORD *)v1 + 29) = 0;
*((_QWORD *)v1 + 60) = 0;
if ( (unsigned __int8)GJMGLayer::init(v1, a1) )
{
cocos2d::CCObject::autorelease((__int64)v1);
}
else
{
(*(void (__fastcall **)(char *))(*(_QWORD *)v1 + 16LL))(v1);
return nullptr;
}
return v1;
}