//
// ThreadViewPopup::threadUpdateFailed from 0xc68c1c to 0xc68ed0 (692 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'ThreadViewPopup::threadUpdateFailed @ 0xc68ed8
// > ??> @ 0x59380
// > ??> @ 0x14ecac8
//
// This function is hookable on this platform (idp: arm, 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 13:05:26 +0000
//
__int64 __fastcall ThreadViewPopup::threadUpdateFailed(ThreadViewPopup *this, int a2, int a3)
{
cocos2d::CCDirector *v4; // x0
__int64 v5; // x22
void (__fastcall *v6)(__int64, __int64, __int64); // x23
__int64 v7; // x0
cocos2d::CCDirector *ResponseHadServerPopup; // x0
__int64 v9; // x22
void (__fastcall *v10)(__int64, __int64, __int64); // x23
__int64 v11; // x0
__int64 v12; // [xsp+48h] [xbp+48h] BYREF
__int64 v13; // [xsp+50h] [xbp+50h]
void *v14; // [xsp+58h] [xbp+58h]
__int64 v15; // [xsp+60h] [xbp+60h] BYREF
__int64 v16; // [xsp+68h] [xbp+68h]
void *v17; // [xsp+70h] [xbp+70h]
if ( *(_DWORD *)(*((_QWORD *)this + 94) + 56LL) == a2 )
{
if ( a3 == 103 || a3 == 12 )
{
*((_QWORD *)this + 137) = 0;
ResponseHadServerPopup = (cocos2d::CCDirector *)(unsigned __int8)GameToolbox::lastResponseHadServerPopup(this);
if ( (_BYTE)ResponseHadServerPopup )
return _stack_chk_guard;
v9 = *(_QWORD *)(cocos2d::CCDirector::sharedDirector(ResponseHadServerPopup) + 272);
v10 = *(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v9 + 464LL);
v12 = 0;
v13 = 0;
v14 = nullptr;
std::string::__init(&v12, "Delete failed", 0xDu);
v15 = 0;
v16 = 0;
v17 = nullptr;
std::string::__init(&v15, &byte_11B8890, 0);
v11 = TextAlertPopup::create((char *)&v12, 150, (char *)&v15, 0.5, 0.6);
v10(v9, v11, 1000);
}
else
{
if ( a3 == 4 )
{
if ( !*((_BYTE *)this + 1001) )
return _stack_chk_guard;
*((_BYTE *)this + 1001) = 0;
v4 = (cocos2d::CCDirector *)(unsigned __int8)GameToolbox::lastResponseHadServerPopup(this);
if ( (_BYTE)v4 )
return _stack_chk_guard;
}
else
{
if ( a3 != 10 )
return _stack_chk_guard;
if ( !*((_BYTE *)this + 1000) )
return _stack_chk_guard;
*((_BYTE *)this + 1000) = 0;
v4 = (cocos2d::CCDirector *)(unsigned __int8)GameToolbox::lastResponseHadServerPopup(this);
if ( (_BYTE)v4 )
return _stack_chk_guard;
}
v5 = *(_QWORD *)(cocos2d::CCDirector::sharedDirector(v4) + 272);
v6 = *(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v5 + 464LL);
v12 = 0;
v13 = 0;
v14 = nullptr;
std::string::__init(&v12, "Action failed", 0xDu);
v15 = 0;
v16 = 0;
v17 = nullptr;
std::string::__init(&v15, &byte_11B8890, 0);
v7 = TextAlertPopup::create((char *)&v12, 150, (char *)&v15, 0.5, 0.6);
v6(v5, v7, 1000);
}
if ( (v15 & 1) != 0 )
operator delete(v17);
if ( (v12 & 1) != 0 )
operator delete(v14);
}
return _stack_chk_guard;
}