//
// ParentalOptionsLayer::applyToggleLock from 0x1404d37e0 to 0x1404d3906 (294 bytes)
//
// 5 xrefs:
// > ParentalOptionsLayer::updateToggleStates @ 0x1404d37b1
// > ParentalOptionsLayer::updateToggleStates @ 0x1404d37d0
// > ??> @ 0x1408d352c
// > ??> @ 0x1408d353c
// > ??> @ 0x1409297f8
//
// 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
//
void __fastcall ParentalOptionsLayer::applyToggleLock(__int64 a1, cocos2d::CCArray *a2, char a3)
{
char v5; // cl
unsigned __int8 v6; // si
unsigned int v7; // r14d
struct cocos2d::CCObject *v8; // rbx
struct cocos2d::CCObject *v9; // rdi
__int64 v10; // rax
__int64 v11; // rax
__int64 v12; // [rsp+40h] [rbp+8h] BYREF
if ( a2 )
{
v12 = a1;
if ( a3 )
{
LOWORD(v12) = -26986;
v5 = -106;
}
else
{
LOWORD(v12) = -1;
v5 = -1;
}
BYTE2(v12) = v5;
if ( cocos2d::CCArray::count(a2) > 1 )
{
v6 = a3 ^ 1;
v7 = 1;
do
{
v8 = cocos2d::CCArray::objectAtIndex(a2, v7 - 1);
v9 = cocos2d::CCArray::objectAtIndex(a2, v7);
(*(void (__fastcall **)(struct cocos2d::CCObject *, _QWORD))(*(_QWORD *)v8 + 936LL))(v8, v6);
v10 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)v8 + 47) + 952LL))(*((_QWORD *)v8 + 47));
(**(void (__fastcall ***)(__int64, __int64 *))(v10 + 320))(v10 + 320, &v12);
v11 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)v8 + 48) + 952LL))(*((_QWORD *)v8 + 48));
(**(void (__fastcall ***)(__int64, __int64 *))(v11 + 320))(v11 + 320, &v12);
(**((void (__fastcall ***)(__int64, __int64 *))v9 + 46))((__int64)v9 + 368, &v12);
v7 += 2;
}
while ( v7 < cocos2d::CCArray::count(a2) );
}
}
}