//
// sub_100886760 from 0x100886760 to 0x1008868b7 (343 bytes)
//
// 1 xrefs:
// > ParentalOptionsLayer::onToggle @ 0x1008866f4
//
// 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
//
void __fastcall sub_100886760(__int64 a1, unsigned __int8 a2)
{
__int64 v2; // rax
char v3; // r14
__int64 v4; // rax
int IntGameVariable; // eax
__int64 v6; // rdi
int v7; // eax
int v8; // ebx
__int64 v9; // rax
__int64 v10; // rax
__int64 v11; // rdi
__int64 v12; // rax
__int64 v13; // rdi
__int64 v14; // rdi
__int64 v15; // rax
__int64 v16; // rax
__int64 v17; // rax
v2 = GameManager::sharedState();
v3 = sub_10036D8A0(v2);
v4 = GameManager::sharedState();
IntGameVariable = GameManager::getIntGameVariable(v4, "0227");
if ( a2 | (unsigned __int8)v3 ^ 1 )
{
if ( a2 ^ 1 | (unsigned __int8)v3 )
return;
if ( IntGameVariable == 4 || IntGameVariable == 2 )
{
v6 = GameManager::sharedState();
v7 = GameManager::getIntGameVariable(v6, "0244");
if ( v7 <= 0
|| (v8 = v7,
v9 = GJAccountManager::sharedState(v6, (__int64)"0244"),
*(_DWORD *)(v9 + 352) <= *(_DWORD *)(v9 + 356))
|| (v10 = GJAccountManager::sharedState(v6, (__int64)"0244"),
v8 == *(_DWORD *)(v10 + 352) - *(_DWORD *)(v10 + 356)) )
{
v11 = GameManager::sharedState();
GameManager::setIntGameVariable(v11, "0227");
v12 = GJAccountManager::sharedState(v11, (__int64)"0227");
if ( *(_DWORD *)(v12 + 352) > *(_DWORD *)(v12 + 356) )
{
v13 = 1;
LABEL_14:
v16 = ParentalPrivacyPopup::create(v13);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v16 + 1312LL))(v16);
return;
}
return;
}
}
LABEL_16:
v17 = GameManager::sharedState();
GameManager::setIntGameVariable(v17, "0227");
return;
}
if ( IntGameVariable == 2 )
return;
if ( IntGameVariable == 3 )
goto LABEL_16;
v14 = GameManager::sharedState();
GameManager::setIntGameVariable(v14, "0227");
v15 = GJAccountManager::sharedState(v14, (__int64)"0227");
if ( *(_DWORD *)(v15 + 352) > *(_DWORD *)(v15 + 356) )
{
v13 = 0;
goto LABEL_14;
}
}