//
// MemberListPopup::onAddPolicy from 0x100942770 to 0x10094282b (187 bytes)
//
// 1 xrefs:
// > MemberListPopup::refreshPolicyBtn @ 0x100941b25
//
// 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 12:38:32 +0000
//
void __fastcall MemberListPopup::onAddPolicy(__int64 a1)
{
__int64 v1; // rax
__int64 v2; // rcx
int v3; // esi
char updated; // bl
std::string v5; // [rsp+8h] [rbp-28h] BYREF
if ( !*(_BYTE *)(a1 + 864)
&& *(int *)(a1 + 868) <= 0
&& *(int *)(a1 + 872) <= 0
&& *(int *)(a1 + 876) <= 0
&& !*(_BYTE *)(a1 + 848) )
{
v1 = GameLevelManager::sharedState();
v2 = *(_QWORD *)(a1 + 800);
v3 = *(_DWORD *)(v2 + 56);
LOBYTE(v2) = *(_DWORD *)(v2 + 208) == 1;
v5.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)2;
*(_WORD *)((char *)&v5.__r_.__value_.__l.0 + 1) = (unsigned __int8)v2 ^ 0x31;
updated = GameLevelManager::updateThread(v1, v3, 13, &v5);
if ( (*(_BYTE *)&v5.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v5.__r_.__value_.__l.__data_);
if ( updated )
{
*(_BYTE *)(a1 + 848) = 1;
*(_QWORD *)(GameLevelManager::sharedState() + 1264) = a1 + 776;
}
}
}