//
// sub_10037BFBC from 0x10037bfbc to 0x10037c07c (192 bytes)
//
// 3 xrefs:
// > sub_10002C684 @ 0x10002c6c8
// > sub_10011127C @ 0x1001112b8
// > LevelBrowserLayer::onGoToFolder @ 0x1004980a0
//
// 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 11:03:28 +0000
//
void *__fastcall sub_10037BFBC(__int64 a1, __int64 a2, __int64 a3)
{
void *v6; // x19
int v7; // w0
int v8; // w20
void *__p[2]; // [xsp+0h] [xbp-40h] BYREF
__int64 v11; // [xsp+10h] [xbp-30h]
v6 = operator new(0x2D8u);
sub_1003817F4();
if ( *(char *)(a3 + 23) < 0 )
{
sub_1000097D0(__p, *(void **)a3, *(_QWORD *)(a3 + 8));
}
else
{
*(_OWORD *)__p = *(_OWORD *)a3;
v11 = *(_QWORD *)(a3 + 16);
}
v7 = sub_10037C0A4(v6, a1, a2, __p);
v8 = v7;
if ( SHIBYTE(v11) < 0 )
{
operator delete(__p[0]);
if ( v8 )
goto LABEL_6;
LABEL_8:
(*(void (__fastcall **)(void *))(*(_QWORD *)v6 + 16LL))(v6);
return nullptr;
}
if ( !v7 )
goto LABEL_8;
LABEL_6:
cocos2d::CCObject::autorelease((__int64)v6);
return v6;
}