//
// GameLevelManager::onReportLevelCompleted from 0x140260f70 to 0x1402610f1 (385 bytes)
//
// 2 xrefs:
// > GameLevelManager::handleIt @ 0x140219de6
// > ??> @ 0x14091c7d8
//
// 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:47 +0000
//
// Hidden C++ exception states: #wind=3
void __fastcall GameLevelManager::onReportLevelCompleted(__int64 a1, const void **a2, const char *a3)
{
const char *v6; // rcx
unsigned int v7; // ebp
const void *v8; // rcx
size_t v9; // r8
cocos2d::CCString *v10; // rax
const char *CString; // rax
size_t v12; // r8
void *v13; // rcx
__int128 Buf2; // [rsp+40h] [rbp-48h] BYREF
__int128 v15; // [rsp+50h] [rbp-38h]
v6 = a3;
if ( *((_QWORD *)a3 + 3) > 0xFu )
v6 = *(const char **)a3;
v7 = atoi(v6);
Buf2 = 0;
*(_QWORD *)&v15 = 2;
*((_QWORD *)&v15 + 1) = 15;
strcpy((char *)&Buf2, "-1");
v8 = a2;
if ( (unsigned __int64)a2[3] > 0xF )
v8 = *a2;
v9 = (size_t)a2[2];
if ( v9 > 2 )
v9 = 2;
if ( !memcmp(v8, &Buf2, v9) && a2[2] == (const void *)2 )
{
v10 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, v7);
CString = cocos2d::CCString::getCString(v10);
Buf2 = 0;
v15 = 0;
v12 = -1;
do
++v12;
while ( CString[v12] );
sub_14003D230(&Buf2, CString, v12);
cocos2d::CCDictionary::removeObjectForKey(*(_QWORD *)(a1 + 920), &Buf2);
if ( *((_QWORD *)&v15 + 1) > 0xFu )
{
v13 = (void *)Buf2;
if ( (unsigned __int64)(*((_QWORD *)&v15 + 1) + 1LL) >= 0x1000 )
{
v13 = *(void **)(Buf2 - 8);
if ( (unsigned __int64)(Buf2 - (_QWORD)v13 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v13);
}
}
sub_14003D310((__int64)a2);
sub_14003D310((__int64)a3);
}