//
// GameLevelManager::onUpdateDescriptionCompleted from 0x140258c50 to 0x140258ec3 (627 bytes)
//
// 2 xrefs:
// > GameLevelManager::handleIt @ 0x140219ea4
// > ??> @ 0x14091c694
//
// 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:45 +0000
//
// Hidden C++ exception states: #wind=3
void __fastcall GameLevelManager::onUpdateDescriptionCompleted(__int64 a1, const void **a2, _QWORD *a3)
{
_BYTE *v6; // rdi
size_t v7; // rbx
size_t v8; // r8
void *v9; // rcx
unsigned int v10; // esi
cocos2d::CCArray *v11; // rbx
void *v12; // rcx
cocos2d::CCString *v13; // rax
const char *CString; // rax
const void *v15; // rcx
unsigned __int64 v16; // rbx
size_t v17; // r8
void (__fastcall ***v18)(_QWORD, _QWORD, __int64); // rcx
__int64 v19; // rcx
void *Block[2]; // [rsp+40h] [rbp-58h] BYREF
__m128i si128; // [rsp+50h] [rbp-48h]
v6 = a3;
if ( a3[3] > 0xFu )
v6 = (_BYTE *)*a3;
*(_OWORD *)Block = 0;
si128 = 0;
v7 = -1;
v8 = -1;
do
++v8;
while ( v6[v8] );
sub_14003D230(Block, v6, v8);
cocos2d::CCDictionary::removeObjectForKey(*(_QWORD *)(a1 + 1200), Block);
if ( si128.m128i_i64[1] > 0xFuLL )
{
v9 = Block[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v9 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v9 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v9);
}
v10 = 0;
*(_OWORD *)Block = 0;
si128 = 0;
do
++v7;
while ( v6[v7] );
sub_14003D230(Block, v6, v7);
v11 = sub_1400D2840((__int64 *)Block, "_");
if ( si128.m128i_i64[1] > 0xFuLL )
{
v12 = Block[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v12 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v12 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v12);
}
si128 = _mm_load_si128((const __m128i *)&Size);
LOBYTE(Block[0]) = 0;
if ( cocos2d::CCArray::count(v11) >= 2 )
{
v13 = cocos2d::CCArray::objectAtIndex(v11, 1u);
CString = cocos2d::CCString::getCString(v13);
v10 = atoi(CString);
}
*(_OWORD *)Block = 0;
si128.m128i_i64[0] = 2;
si128.m128i_i64[1] = 15;
strcpy((char *)Block, "-1");
v15 = a2;
if ( (unsigned __int64)a2[3] > 0xF )
v15 = *a2;
v16 = (unsigned __int64)a2[2];
v17 = v16;
if ( v16 > 2 )
v17 = 2;
if ( !memcmp(v15, Block, v17) && v16 == 2 )
{
v19 = *(_QWORD *)(a1 + 1488);
if ( v19 )
(*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)v19 + 8LL))(v19, v10, 27);
}
else
{
v18 = *(void (__fastcall ****)(_QWORD, _QWORD, __int64))(a1 + 1488);
if ( v18 )
(**v18)(v18, v10, 27);
}
sub_14003D310((__int64)a2);
sub_14003D310((__int64)a3);
}