//
// sub_100549944 from 0x100549944 to 0x100549afc (440 bytes)
//
// 1 xrefs:
// > sub_1005452FC @ 0x100545fd4
//
// 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:07:49 +0000
//
__int64 __fastcall sub_100549944(__int64 a1, __int64 a2)
{
__int64 result; // x0
signed int v4; // w19
unsigned int *v5; // x0
unsigned int *v6; // x19
__int64 v7; // x1
char *v8; // x20
__int64 v9; // x19
_QWORD *v10; // x0
char *v11; // x0
char *v12; // x20
unsigned __int64 v13; // x2
_BYTE *ModView; // x0
__int128 v15; // [xsp+0h] [xbp-40h] BYREF
__int64 v16; // [xsp+10h] [xbp-30h]
void *__p[2]; // [xsp+18h] [xbp-28h] BYREF
char v18; // [xsp+2Fh] [xbp-11h]
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
if ( *(_DWORD *)(a1 + 1236) )
return result;
v4 = result;
result = *(_QWORD *)(a1 + 1312);
if ( !result )
return result;
if ( v4 < 0 )
return result;
result = sub_1002E757C(result);
if ( v4 >= (int)result )
return result;
v5 = (unsigned int *)sub_1002E75A0(*(_QWORD *)(a1 + 1312), v4);
v6 = v5;
v7 = v5[14];
if ( (unsigned int)(v7 - 1) < 2 )
{
GameToolbox::intToString(v5[15], __p);
v8 = GJSearchObject::create_1(0, (__int128 *)__p);
if ( v18 < 0 )
operator delete(__p[0]);
*((_DWORD *)v8 + 108) = v6[14] == 2;
v9 = cocos2d::CCDirector::sharedDirector();
v10 = LevelBrowserLayer::scene((__int64)v8);
v11 = cocos2d::CCTransitionFade::create_1((__int64)v10, 0.5);
return cocos2d::CCDirector::pushScene(v9, v11);
}
if ( (_DWORD)v7 != 8 )
return sub_10054B298(v5, v7, v5[16]);
if ( *(int *)(a1 + 1260) >= 1 )
return sub_10054A264("Still deleting", 1.2);
v12 = sub_1000C5868();
*((_DWORD *)v12 + 14) = v6[15];
if ( *((char *)v6 + 135) < 0 )
{
v13 = *((_QWORD *)v6 + 15);
if ( v13 )
{
sub_1000097D0(&v15, *((void **)v6 + 14), v13);
goto LABEL_20;
}
LABEL_19:
sub_100009900(&v15, "Thread");
goto LABEL_20;
}
if ( !*((_BYTE *)v6 + 135) )
goto LABEL_19;
v15 = *((_OWORD *)v6 + 7);
v16 = *((_QWORD *)v6 + 16);
LABEL_20:
if ( v12[111] < 0 )
operator delete(*((void **)v12 + 11));
*(_OWORD *)(v12 + 88) = v15;
*((_QWORD *)v12 + 13) = v16;
ModView = ThreadViewPopup::createModView((__int64)v12, *((_QWORD *)v6 + 21));
return (*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)ModView + 1312LL))(ModView);
}