//
// ParentalPrivacyPopup::init from 0x1008871f0 to 0x1008872f5 (261 bytes)
//
// 1 xrefs:
// > ParentalPrivacyPopup::create @ 0x100886a87
//
// 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:36:59 +0000
//
__int64 __fastcall ParentalPrivacyPopup::init(_BYTE *a1, unsigned int a2)
{
_BYTE *v2; // rbx
const char *v3; // r14
unsigned int v4; // r14d
__int64 v5; // r15
__int64 v6; // rax
__int64 v7; // rsi
__int64 v8; // rax
__int64 v9; // rbx
__int64 v11; // [rsp+0h] [rbp-40h] BYREF
size_t v12; // [rsp+8h] [rbp-38h]
void *__p; // [rsp+10h] [rbp-30h]
v2 = a1;
a1[720] = a2;
v3 = "Updating privacy settings...";
if ( a2 )
v3 = "Restoring privacy settings...";
__p = operator new(0x20u);
v11 = 33;
v12 = a2 + 28LL;
memcpy(__p, v3, v12);
*((_BYTE *)__p + a2 + 28) = 0;
v4 = UploadActionPopup::init(a1, 0, (__int64)&v11);
if ( (v11 & 1) != 0 )
{
a1 = __p;
operator delete(__p);
}
if ( (_BYTE)v4 )
{
v5 = GameLevelManager::sharedState();
v6 = GJAccountManager::sharedState((__int64)a1, 0);
v7 = (unsigned int)(*(_DWORD *)(v6 + 352) - *(_DWORD *)(v6 + 356));
v8 = GameLevelManager::userInfoForAccountID(v5, v7);
if ( v8 )
{
ParentalPrivacyPopup::startWithScore(v2, v8);
}
else
{
*(_QWORD *)(GameLevelManager::sharedState() + 1352) = v2 + 712;
v9 = GameLevelManager::sharedState();
GJAccountManager::sharedState(v5, v7);
GameLevelManager::getGJUserInfo(v9);
}
}
return v4;
}