//
// GameLevelManager::onDeleteUserMessagesCompleted from 0x10052ad30 to 0x10052aed5 (421 bytes)
//
// 1 xrefs:
// > GameLevelManager::handleIt @ 0x10051f7fa
//
// 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
//
char __fastcall GameLevelManager::onDeleteUserMessagesCompleted(__int64 a1, unsigned __int8 *a2, __int64 a3)
{
const char *v3; // r15
__int64 v4; // r12
size_t v5; // rax
size_t v6; // r13
char *v7; // rbx
size_t v8; // r12
__int64 v9; // rdi
unsigned int SplitIntFromKey; // r12d
int v11; // r15d
const void *v12; // rdi
unsigned __int64 v13; // rcx
size_t v14; // rdx
bool v15; // bl
int v16; // eax
__int64 v17; // rdi
char result; // al
__int64 v20; // [rsp+8h] [rbp-48h]
_QWORD __dst[2]; // [rsp+10h] [rbp-40h] BYREF
void *__p; // [rsp+20h] [rbp-30h]
if ( (*(_BYTE *)a3 & 1) != 0 )
v3 = *(const char **)(a3 + 16);
else
v3 = (const char *)(a3 + 1);
v4 = *(_QWORD *)(a1 + 1088);
v5 = strlen(v3);
if ( v5 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v6 = v5;
if ( v5 >= 0x17 )
{
v20 = *(_QWORD *)(a1 + 1088);
v8 = 26;
if ( (v5 | 7) != 0x17 )
v8 = (v5 | 7) + 1;
v7 = (char *)operator new(v8);
__p = v7;
__dst[0] = v8 + 1;
v4 = v20;
__dst[1] = v6;
goto LABEL_11;
}
v7 = (char *)__dst + 1;
LOBYTE(__dst[0]) = 2 * v5;
if ( v5 )
LABEL_11:
memmove(v7, v3, v6);
v7[v6] = 0;
v9 = v4;
cocos2d::CCDictionary::removeObjectForKey(v4, (char *)__dst);
if ( (__dst[0] & 1) != 0 )
{
v9 = (__int64)__p;
operator delete(__p);
}
SplitIntFromKey = GameLevelManager::getSplitIntFromKey(v9, v3, 1);
v11 = GameLevelManager::getSplitIntFromKey(v9, v3, 2);
*(_WORD *)((char *)__dst + 1) = 12589;
BYTE3(__dst[0]) = 0;
v12 = a2 + 1;
v13 = *a2 >> 1;
if ( (*a2 & 1) != 0 )
{
v12 = *((const void **)a2 + 2);
v13 = *((_QWORD *)a2 + 1);
}
v14 = 2;
if ( v13 < 2 )
v14 = v13;
v15 = v13 != 2;
v16 = memcmp(v12, (char *)__dst + 1, v14);
v17 = *(_QWORD *)(a1 + 1360);
result = v15 || v16 != 0;
if ( result )
{
if ( v17 )
(**(void (__fastcall ***)(__int64, _QWORD, __int64))v17)(v17, SplitIntFromKey, 45);
if ( SplitIntFromKey == -1 )
return sub_100569BF0(a1, v11 != 0, 1);
else
return sub_100569D80(a1, SplitIntFromKey, v11 != 0);
}
else if ( v17 )
{
return (*(__int64 (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)v17 + 8LL))(v17, SplitIntFromKey, 45);
}
return result;
}