//
// sub_10053CFE0 from 0x10053cfe0 to 0x10053d25b (635 bytes)
//
// 2 xrefs:
// > GameLevelManager::handleIt @ 0x100520a70
// > GameLevelManager::handleIt @ 0x100520d8b
//
// 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:31:55 +0000
//
void __fastcall sub_10053CFE0(_QWORD *a1, __int64 a2, unsigned __int8 *a3, int a4)
{
size_t v4; // r14
unsigned __int8 *v7; // rsi
unsigned int v8; // r13d
unsigned __int64 v9; // r13
unsigned __int8 *v10; // r12
size_t v11; // r13
char *v12; // rbx
unsigned int v13; // r12d
_QWORD *v14; // rbx
char *v15; // rbx
__int64 v16; // rdi
__int64 v17; // rdi
__int64 v18; // rdi
__int64 v19; // rdi
void (__fastcall ***v20)(_QWORD, _QWORD, _QWORD); // rdi
int v21; // [rsp+Ch] [rbp-44h]
__int128 __dst; // [rsp+10h] [rbp-40h] BYREF
char *v23; // [rsp+20h] [rbp-30h]
LODWORD(v4) = a4;
if ( (*a3 & 1) != 0 )
v7 = *((unsigned __int8 **)a3 + 2);
else
v7 = a3 + 1;
GameLevelManager::removeDLFromActive(a1, v7);
v8 = *a3;
if ( (v8 & 1) == 0 )
{
if ( (unsigned __int8)v8 >= 0xEu )
{
v9 = v8 >> 1;
v10 = a3 + 1;
goto LABEL_9;
}
LABEL_36:
sub_100056810();
}
v9 = *((_QWORD *)a3 + 1);
if ( v9 <= 6 )
goto LABEL_36;
v10 = *((unsigned __int8 **)a3 + 2);
LABEL_9:
v11 = v9 - 7;
if ( v11 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
if ( v11 >= 0x17 )
{
v21 = v4;
v4 = 26;
if ( (v11 | 7) != 0x17 )
v4 = (v11 | 7) + 1;
v12 = (char *)operator new(v4);
v23 = v12;
*(_QWORD *)&__dst = v4 + 1;
LOBYTE(v4) = v21;
*((_QWORD *)&__dst + 1) = v11;
}
else
{
v12 = (char *)&__dst + 1;
LOBYTE(__dst) = 2 * v11;
if ( !v11 )
{
BYTE1(__dst) = 0;
if ( (__dst & 1) == 0 )
goto LABEL_13;
goto LABEL_21;
}
}
memmove(v12, v10 + 7, v11);
v12[v11] = 0;
if ( (__dst & 1) == 0 )
{
LABEL_13:
v13 = atoi((const char *)&__dst + 1);
v14 = a1;
if ( (*(_BYTE *)a2 & 1) != 0 )
goto LABEL_14;
LABEL_22:
if ( atoi((const char *)(a2 + 1)) >= 0 )
goto LABEL_15;
goto LABEL_23;
}
LABEL_21:
v15 = v23;
v13 = atoi(v23);
operator delete(v15);
v14 = a1;
if ( (*(_BYTE *)a2 & 1) == 0 )
goto LABEL_22;
LABEL_14:
if ( atoi(*(const char **)(a2 + 16)) >= 0 )
{
LABEL_15:
if ( (_BYTE)v4 )
GameLevelManager::followUser(v14, v13);
else
sub_10054E850(v14, v13);
v17 = v14[130];
LOBYTE(__dst) = 26;
strcpy((char *)&__dst + 1, "get_following");
cocos2d::CCDictionary::removeObjectForKey(v17, (char *)&__dst);
if ( (__dst & 1) != 0 )
operator delete(v23);
v18 = v14[171];
if ( v18 )
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v18 + 24LL))(v18, 3);
if ( !(_BYTE)v4 )
{
v19 = v14[130];
LOBYTE(__dst) = 18;
strcpy((char *)&__dst + 1, "get_muted");
cocos2d::CCDictionary::removeObjectForKey(v19, (char *)&__dst);
if ( (__dst & 1) != 0 )
operator delete(v23);
}
v20 = (void (__fastcall ***)(_QWORD, _QWORD, _QWORD))v14[58];
if ( v20 )
(**v20)(v20, v13, (unsigned __int8)v4);
return;
}
LABEL_23:
v16 = v14[58];
if ( v16 )
(*(void (__fastcall **)(__int64, _QWORD, _QWORD))(*(_QWORD *)v16 + 8LL))(v16, v13, (unsigned __int8)v4);
}