//
// ParentalOptionsLayer::updateToggleStates from 0x1404d36b0 to 0x1404d37d5 (293 bytes)
//
// 3 xrefs:
// > ParentalOptionsLayer::init @ 0x1404d1805
// > ParentalOptionsLayer::onMasterToggle @ 0x1404d301d
// > ??> @ 0x1409297ec
//
// 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 11:33:01 +0000
//
// Hidden C++ exception states: #wind=2
__int64 __fastcall ParentalOptionsLayer::updateToggleStates(_QWORD *a1)
{
__int64 v2; // rcx
bool GameVariable; // si
__int64 v4; // rdi
bool v5; // di
__int64 v6; // rcx
__int64 v7; // rcx
__int64 v8; // rcx
void *v10; // [rsp+30h] [rbp+8h]
void *v11; // [rsp+30h] [rbp+8h]
v2 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v10 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v10);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v2 = qword_14090BFD0;
}
GameVariable = GameManager::getGameVariable(v2, "0219");
v4 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v11 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v11);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v4 = qword_14090BFD0;
}
v5 = GameManager::getGameVariable(v4, "0218") || GameManager::getGameVariable(v4, "0219");
v6 = a1[87];
if ( v6 )
CCMenuItemToggler::toggle(v6, v5);
v7 = a1[88];
if ( v7 )
CCMenuItemToggler::toggle(v7, GameVariable);
ParentalOptionsLayer::applyToggleLock(v7, a1[90], GameVariable);
return ParentalOptionsLayer::applyToggleLock(v8, a1[91], v5);
}