//
// GameLevelManager::onMuteUserCompleted from 0x10053d340 to 0x10053d55a (538 bytes)
//
// 2 xrefs:
// > GameLevelManager::handleIt @ 0x10051eb3b
// > GameLevelManager::handleIt @ 0x100520c7b
//
// 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 GameLevelManager::onMuteUserCompleted(_QWORD *a1, unsigned __int8 *a2, unsigned __int8 *a3, int a4)
{
unsigned __int8 *v7; // rsi
unsigned int v8; // r13d
unsigned __int64 v9; // r13
unsigned __int8 *v10; // r12
size_t v11; // r13
char *v12; // r14
unsigned int v13; // r12d
size_t v14; // rbx
char *v15; // rbx
char v16; // r14
const void *v17; // rdi
unsigned __int64 v18; // rcx
size_t v19; // rdx
__int64 v20; // rdi
__int64 v21; // rdi
__int64 v22; // rdi
__int64 v23; // rdi
int v25; // [rsp+Ch] [rbp-44h]
__int128 __dst; // [rsp+10h] [rbp-40h] BYREF
char *v27; // [rsp+20h] [rbp-30h]
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 >= 0xAu )
{
v9 = v8 >> 1;
v10 = a3 + 1;
goto LABEL_9;
}
LABEL_35:
sub_100056810();
}
v9 = *((_QWORD *)a3 + 1);
if ( v9 <= 4 )
goto LABEL_35;
v10 = *((unsigned __int8 **)a3 + 2);
LABEL_9:
v11 = v9 - 5;
if ( v11 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v25 = a4;
if ( v11 >= 0x17 )
{
v14 = 26;
if ( (v11 | 7) != 0x17 )
v14 = (v11 | 7) + 1;
v12 = (char *)operator new(v14);
v27 = v12;
*(_QWORD *)&__dst = v14 + 1;
*((_QWORD *)&__dst + 1) = v11;
LABEL_17:
memmove(v12, v10 + 5, v11);
v12[v11] = 0;
if ( (__dst & 1) == 0 )
goto LABEL_13;
goto LABEL_18;
}
v12 = (char *)&__dst + 1;
LOBYTE(__dst) = 2 * v11;
if ( v11 )
goto LABEL_17;
BYTE1(__dst) = 0;
if ( (__dst & 1) == 0 )
{
LABEL_13:
v13 = atoi((const char *)&__dst + 1);
goto LABEL_19;
}
LABEL_18:
v15 = v27;
v13 = atoi(v27);
operator delete(v15);
LABEL_19:
v16 = v25;
strcpy((char *)&__dst + 1, "-1");
v17 = a2 + 1;
v18 = *a2 >> 1;
if ( (*a2 & 1) != 0 )
{
v17 = *((const void **)a2 + 2);
v18 = *((_QWORD *)a2 + 1);
}
v19 = 2;
if ( v18 < 2 )
v19 = v18;
if ( (v18 != 2) | (memcmp(v17, (char *)&__dst + 1, v19) != 0) )
{
v21 = a1[130];
LOBYTE(__dst) = 18;
strcpy((char *)&__dst + 1, "get_muted");
cocos2d::CCDictionary::removeObjectForKey(v21, (char *)&__dst);
if ( (__dst & 1) != 0 )
operator delete(v27);
v22 = a1[171];
if ( v22 )
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v22 + 24LL))(v22, 4);
if ( v16 )
{
v23 = a1[57];
if ( v23 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v23 + 32LL))(v23, v13);
}
}
else if ( v16 )
{
v20 = a1[57];
if ( v20 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v20 + 40LL))(v20, v13);
}
}