//
// GameLevelManager::onDeleteServerLevelCompleted from 0x140234de0 to 0x140234f69 (393 bytes)
//
// 2 xrefs:
// > GameLevelManager::handleIt @ 0x140219a57
// > ??> @ 0x14091bf98
//
// 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 11:28:31 +0000
//
// Hidden C++ exception states: #wind=3
void __fastcall GameLevelManager::onDeleteServerLevelCompleted(__int64 a1, const void **a2, _QWORD *a3)
{
_BYTE *v6; // rbx
size_t v7; // r8
void *v8; // rcx
unsigned int v9; // ebp
const void *v10; // rcx
unsigned __int64 v11; // rbx
size_t v12; // r8
void (__fastcall ***v13)(_QWORD, _QWORD); // rcx
__int64 v14; // rcx
void *Block[2]; // [rsp+40h] [rbp-58h] BYREF
__int128 v16; // [rsp+50h] [rbp-48h]
v6 = a3;
if ( a3[3] > 0xFu )
v6 = (_BYTE *)*a3;
*(_OWORD *)Block = 0;
v16 = 0;
v7 = -1;
do
++v7;
while ( v6[v7] );
sub_14003D230(Block, v6, v7);
cocos2d::CCDictionary::removeObjectForKey(*(_QWORD *)(a1 + 1200), Block);
if ( *((_QWORD *)&v16 + 1) > 0xFu )
{
v8 = Block[0];
if ( (unsigned __int64)(*((_QWORD *)&v16 + 1) + 1LL) >= 0x1000 )
{
v8 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v8 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v8);
}
v9 = atoi(v6);
*(_OWORD *)Block = 0;
*(_QWORD *)&v16 = 2;
*((_QWORD *)&v16 + 1) = 15;
strcpy((char *)Block, "-1");
v10 = a2;
if ( (unsigned __int64)a2[3] > 0xF )
v10 = *a2;
v11 = (unsigned __int64)a2[2];
v12 = v11;
if ( v11 > 2 )
v12 = 2;
if ( !memcmp(v10, Block, v12) && v11 == 2 )
{
v14 = *(_QWORD *)(a1 + 1432);
if ( v14 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v14 + 8LL))(v14, v9);
}
else
{
v13 = *(void (__fastcall ****)(_QWORD, _QWORD))(a1 + 1432);
if ( v13 )
(**v13)(v13, v9);
}
sub_14003D310((__int64)a2);
sub_14003D310((__int64)a3);
}