//
// URLViewLayer::create from 0x8d9654 to 0x8d986c (536 bytes)
//
// 5 xrefs:
// > SupportLayer::onSFX @ 0x7dbb44
// > SupportLayer::onLinks @ 0x7dc474
// > LevelAreaInnerLayer::onInfo @ 0xa2e6e4
// > SFXBrowser::onCredits @ 0xa5cef8
// > ??> @ 0x9c798
//
// 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
//
__int64 __fastcall URLViewLayer::create(__int64 a1, cocos2d::CCObject *a2)
{
__int64 v3; // x19
_BOOL4 v4; // w21
char *v5; // x0
__int64 v6; // x1
__int64 v7; // x0
unsigned int *v9; // x2
int v10; // w1
const char *v11; // [xsp+50h] [xbp+50h] BYREF
v3 = operator new(0x268u);
cocos2d::CCLayerColor::CCLayerColor((cocos2d::CCLayerColor *)v3);
*(_QWORD *)v3 = &off_117C1B0;
*(_QWORD *)(v3 + 320) = off_117C718;
*(_QWORD *)(v3 + 328) = &off_117C788;
*(_QWORD *)(v3 + 336) = &off_117C7A0;
*(_QWORD *)(v3 + 344) = &off_117C7C0;
*(_QWORD *)(v3 + 352) = off_117C7E0;
*(_QWORD *)(v3 + 408) = &off_117C808;
*(_QWORD *)(v3 + 432) = &off_117C888;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)(v3 + 544));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)(v3 + 552));
*(_QWORD *)(v3 + 560) = 0;
*(_QWORD *)(v3 + 568) = 0;
*(_QWORD *)(v3 + 576) = 0;
*(_BYTE *)(v3 + 584) = 0;
*(_QWORD *)(v3 + 592) = 0;
*(_BYTE *)(v3 + 600) = 0;
*(_QWORD *)v3 = &off_119EB00;
*(_QWORD *)(v3 + 320) = off_119F068;
*(_QWORD *)(v3 + 432) = &off_119F1D8;
*(_QWORD *)(v3 + 328) = &off_119F0D8;
*(_QWORD *)(v3 + 336) = &off_119F0F0;
*(_QWORD *)(v3 + 344) = &off_119F110;
*(_QWORD *)(v3 + 352) = off_119F130;
*(_QWORD *)(v3 + 408) = &off_119F158;
sub_D18D28(&v11);
v4 = URLViewLayer::init(v3, &v11, a2);
v5 = (char *)(v11 - 24);
if ( v11 - 24 != (const char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v9 = (unsigned int *)(v11 - 8);
do
v10 = __ldaxr(v9);
while ( __stlxr(v10 - 1, v9) );
}
else
{
v10 = *((_DWORD *)v11 - 2);
*((_DWORD *)v11 - 2) = v10 - 1;
}
if ( v10 <= 0 )
operator delete(v5);
}
if ( v4 )
{
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v3);
}
else
{
v6 = *(_QWORD *)v3;
v7 = v3;
v3 = 0;
(*(void (__fastcall **)(__int64))(v6 + 16))(v7);
}
return v3;
}