//
// sub_100528BC0 from 0x100528bc0 to 0x100528e46 (646 bytes)
//
// 1 xrefs:
// > GameLevelManager::handleIt @ 0x10051edd1
//
// 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:47 +0000
//
void __fastcall sub_100528BC0(_QWORD *a1, unsigned __int8 *a2, __int64 a3)
{
_QWORD *v3; // r12
const char *v4; // r14
size_t v5; // rax
size_t v6; // r13
char *v7; // rbx
size_t v8; // r12
__int64 v9; // rdi
unsigned int SplitIntFromKey; // r14d
const void *v11; // rdi
unsigned __int64 v12; // rcx
size_t v13; // rdx
bool v14; // bl
int v15; // eax
__int64 v16; // rdi
__int64 v17; // rax
__int64 v18; // rdi
__int64 v19; // rdi
__int64 v20; // r15
unsigned int v21; // ebx
__int64 v22; // rdi
__int64 v23; // rdi
__int64 v24; // [rsp+0h] [rbp-50h]
__int128 __dst; // [rsp+10h] [rbp-40h] BYREF
void *__p; // [rsp+20h] [rbp-30h]
v3 = a1;
if ( (*(_BYTE *)a3 & 1) != 0 )
v4 = *(const char **)(a3 + 16);
else
v4 = (const char *)(a3 + 1);
v5 = strlen(v4);
if ( v5 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v6 = v5;
v24 = a1[136];
if ( v5 >= 0x17 )
{
v8 = 26;
if ( (v5 | 7) != 0x17 )
v8 = (v5 | 7) + 1;
v7 = (char *)operator new(v8);
__p = v7;
*(_QWORD *)&__dst = v8 + 1;
v3 = a1;
*((_QWORD *)&__dst + 1) = v6;
goto LABEL_11;
}
v7 = (char *)&__dst + 1;
LOBYTE(__dst) = 2 * v5;
if ( v5 )
LABEL_11:
memmove(v7, v4, v6);
v7[v6] = 0;
v9 = v24;
cocos2d::CCDictionary::removeObjectForKey(v24, (char *)&__dst);
if ( (__dst & 1) != 0 )
{
v9 = (__int64)__p;
operator delete(__p);
}
SplitIntFromKey = GameLevelManager::getSplitIntFromKey(v9, v4, 1);
*(_WORD *)((char *)&__dst + 1) = 12589;
BYTE3(__dst) = 0;
v11 = a2 + 1;
v12 = *a2 >> 1;
if ( (*a2 & 1) != 0 )
{
v11 = *((const void **)a2 + 2);
v12 = *((_QWORD *)a2 + 1);
}
v13 = 2;
if ( v12 < 2 )
v13 = v12;
v14 = v12 != 2;
v15 = memcmp(v11, (char *)&__dst + 1, v13);
v16 = v3[170];
if ( v14 || v15 != 0 )
{
if ( v16 )
(**(void (__fastcall ***)(__int64, _QWORD, __int64))v16)(v16, SplitIntFromKey, 39);
v17 = cocos2d::CCDictionary::objectForKey_1(v3[140], (int)SplitIntFromKey);
if ( v17 )
{
*(_DWORD *)(v17 + 688) = 0;
v18 = v3[169];
if ( v18 )
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v18 + 16LL))(v18, v17);
}
v19 = v3[130];
LOBYTE(__dst) = 22;
strcpy((char *)&__dst + 1, "get_friends");
v20 = cocos2d::CCDictionary::objectForKey(v19, (char *)&__dst);
if ( (__dst & 1) != 0 )
operator delete(__p);
if ( v20 && (unsigned int)sub_1007FEF90(v20) )
{
v21 = 0;
while ( *(_DWORD *)(sub_1007FEFE0(v20, v21) + 376) != SplitIntFromKey )
{
if ( ++v21 >= (unsigned int)sub_1007FEF90(v20) )
goto LABEL_36;
}
sub_1007FF150(v20, v21, 1);
v22 = v3[171];
if ( v22 )
(*(void (__fastcall **)(__int64, __int64, _QWORD))(*(_QWORD *)v22 + 16LL))(v22, v20, 0);
}
LABEL_36:
v23 = v3[130];
LOBYTE(__dst) = 18;
strcpy((char *)&__dst + 1, "get_muted");
cocos2d::CCDictionary::removeObjectForKey(v23, (char *)&__dst);
if ( (__dst & 1) != 0 )
operator delete(__p);
}
else if ( v16 )
{
(*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)v16 + 8LL))(v16, SplitIntFromKey, 39);
}
}