//
// ThreadOptionsPopup::threadUpdateFailed from 0xc6c394 to 0xc6c558 (452 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'ThreadOptionsPopup::threadUpdateFailed @ 0xc6c560
// > ??> @ 0x6be60
// > ??> @ 0x14f0530
//
// 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:28 +0000
//
__int64 __fastcall ThreadOptionsPopup::threadUpdateFailed(ThreadOptionsPopup *this, int a2, int a3)
{
__int64 v4; // x0
int v6; // w21
GameToolbox *v7; // x0
unsigned __int64 ResponseHadServerPopup; // x0
char *v9; // x20
__int64 *v10; // x21
__int64 v11; // x1
void (__fastcall *v12)(__int64 *, __int64, __int64); // x24
size_t v13; // x0
__int64 v14; // x0
__int64 v15[2]; // [xsp+48h] [xbp+48h] BYREF
void *v16; // [xsp+58h] [xbp+58h]
__int64 v17[2]; // [xsp+60h] [xbp+60h] BYREF
void *v18; // [xsp+70h] [xbp+70h]
if ( *(_DWORD *)(*((_QWORD *)this + 129) + 56LL) == a2 )
{
v6 = *((_DWORD *)this + 262);
if ( v6 == a3 )
{
*((_DWORD *)this + 262) = 0;
v7 = ThreadOptionsPopup::handBackSlot(this);
ResponseHadServerPopup = (unsigned __int8)GameToolbox::lastResponseHadServerPopup(v7);
if ( (_BYTE)ResponseHadServerPopup )
return _stack_chk_guard;
if ( v6 != 18 )
{
if ( v6 != 5 )
{
if ( v6 != 1 )
{
v9 = "Action failed";
LABEL_11:
v10 = *(__int64 **)(cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)ResponseHadServerPopup) + 272);
v11 = *v10;
v15[0] = 0;
v15[1] = 0;
v12 = *(void (__fastcall **)(__int64 *, __int64, __int64))(v11 + 464);
v16 = nullptr;
v13 = strlen(v9);
std::string::__init(v15, v9, v13);
v17[0] = 0;
v17[1] = 0;
v18 = nullptr;
std::string::__init(v17, &byte_11B8890, 0);
v14 = TextAlertPopup::create((char *)v15, 150, (char *)v17, 0.5, 0.6);
v12(v10, v14, 1000);
if ( (v17[0] & 1) != 0 )
operator delete(v18);
if ( (v15[0] & 1) != 0 )
operator delete(v16);
return _stack_chk_guard;
}
ResponseHadServerPopup = *((unsigned int *)this + 263);
if ( (_DWORD)ResponseHadServerPopup )
{
v9 = "Clear failed";
goto LABEL_11;
}
}
v9 = "Leave failed";
goto LABEL_11;
}
v9 = "Remove failed";
goto LABEL_11;
}
}
v4 = *((_QWORD *)this + 130);
if ( v4 )
(*(void (__fastcall **)(__int64))(*(_QWORD *)v4 + 1464LL))(v4);
return _stack_chk_guard;
}