//
// ParentalGateLayer::onDone from 0x1404d3ee0 to 0x1404d4009 (297 bytes)
//
// 2 xrefs:
// > ??> @ 0x1407cf370
// > ??> @ 0x140929858
//
// 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=1
__int64 __fastcall ParentalGateLayer::onDone(_DWORD *a1)
{
_DWORD *v2; // rcx
int v3; // ebx
_QWORD *v4; // rax
__int64 v5; // rdx
__int64 v7; // rbx
__int64 v8; // rdx
__int64 v9; // r8
cocos2d::CCNode *v10; // rax
_WORD v11[8]; // [rsp+30h] [rbp-48h] BYREF
__int64 v12; // [rsp+40h] [rbp-38h]
__int64 v13; // [rsp+48h] [rbp-30h]
__int128 v14; // [rsp+50h] [rbp-28h] BYREF
__int64 v15; // [rsp+60h] [rbp-18h]
__int64 v16; // [rsp+68h] [rbp-10h]
v2 = a1 + 182;
if ( *((_QWORD *)v2 + 3) > 0xFu )
v2 = *(_DWORD **)v2;
v3 = a1[192];
if ( atoi((const char *)v2) == v3 )
{
v4 = ParentalOptionsLayer::create();
(*(void (__fastcall **)(_QWORD *))(*v4 + 1064LL))(v4);
(*(void (__fastcall **)(_DWORD *, _QWORD))(*(_QWORD *)a1 + 992LL))(a1, 0);
LOBYTE(v5) = 1;
return (*(__int64 (__fastcall **)(_DWORD *, __int64))(*(_QWORD *)a1 + 520LL))(a1, v5);
}
else
{
ParentalGateLayer::generateChallenge((__int64)a1);
v14 = 0;
v15 = 0;
v16 = 15;
LOBYTE(v14) = 0;
v11[7] = 0;
v12 = 13;
v13 = 15;
strcpy((char *)v11, "Wrong answer!");
v7 = *(_QWORD *)a1;
v10 = TextAlertPopup::create((__int64)v11, v8, v9, 150, (__int64)&v14);
return (*(__int64 (__fastcall **)(_DWORD *, cocos2d::CCNode *, __int64))(v7 + 456))(a1, v10, 100);
}
}