//
// MemberListPopup::onAddPolicy from 0xc6b390 to 0xc6b4a0 (272 bytes)
//
// 3 xrefs:
// > ??> @ 0xb2138
// > MemberListPopup::refreshPolicyBtn @ 0xc67368
// > ??> @ 0x1545130
//
// 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:27 +0000
//
__int64 __fastcall MemberListPopup::onAddPolicy(MemberListPopup *this, cocos2d::CCObject *a2)
{
GameLevelManager *v3; // x0
cocos2d::CCObject *v5; // x22
__int64 v6; // x0
unsigned int v7; // w21
char *v8; // x1
int updated; // w21
__int64 v10[2]; // [xsp+40h] [xbp+40h] BYREF
void *v11; // [xsp+50h] [xbp+50h]
v3 = (GameLevelManager *)(unsigned __int8)MemberListPopup::opPending(this);
if ( !(_BYTE)v3 )
{
v5 = (cocos2d::CCObject *)GameLevelManager::sharedState(v3);
v6 = *((_QWORD *)this + 100);
v7 = *(_DWORD *)(v6 + 56);
if ( *(_DWORD *)(v6 + 208) == 1 )
v8 = "0";
else
v8 = "1";
v10[0] = 0;
v10[1] = 0;
v11 = nullptr;
std::string::__init(v10, v8, 1u);
updated = (unsigned __int8)GameLevelManager::updateThread(v5, (char *)v7, 13, (char *)v10);
if ( (v10[0] & 1) != 0 )
{
operator delete(v11);
if ( !updated )
return _stack_chk_guard;
}
else if ( !updated )
{
return _stack_chk_guard;
}
*((_BYTE *)this + 848) = (unsigned __int8)&dword_0 + 1;
*(_QWORD *)(GameLevelManager::sharedState((GameLevelManager *)((char *)&dword_0 + 1)) + 1264) = (char *)this + 776;
}
return _stack_chk_guard;
}