//
// GameSettingsLayer::onClose from 0x1001671b8 to 0x1001672b8 (256 bytes)
//
// 1 xrefs:
// > ??> @ 0x1008e33f8
//
// This function is hookable on this platform (idp: arm, 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 10:59:48 +0000
//
__int64 __fastcall GameSettingsLayer::onClose(__int64 a1, __int64 a2)
{
__int64 v4; // x0
__int64 IntGameVariable; // x0
int v6; // w21
__int64 v7; // x0
__int64 v8; // x0
int v9; // w22
__int64 v10; // x0
__int64 v11; // x0
__int64 v12; // x0
bool v13; // w8
__int64 v14; // x0
__int64 v15; // x0
__int64 v16; // x0
__int64 v17; // x0
__int64 v18; // x0
v4 = GameManager::sharedState(a1);
IntGameVariable = GameManager::getIntGameVariable(v4, "0049");
v6 = IntGameVariable;
v7 = GameManager::sharedState(IntGameVariable);
v8 = GameManager::getIntGameVariable(v7, "0050");
v9 = v8;
v10 = GameManager::sharedState(v8);
GameManager::getGameVariable(v10, "0191");
if ( *(unsigned __int8 *)(a1 + 1176) == (_DWORD)v11 )
{
v12 = GameManager::sharedState(v11);
GameManager::getGameVariable(v12, "0247");
v13 = *(unsigned __int8 *)(a1 + 1177) != (_DWORD)v11;
}
else
{
v13 = 1;
}
if ( *(_DWORD *)(a1 + 1148) != v6 || *(_DWORD *)(a1 + 1152) != v9 || v13 )
{
v14 = GameManager::sharedState(v11);
v15 = GameManager::setIntGameVariable(v14, "0049", *(unsigned int *)(a1 + 1148));
v16 = GameManager::sharedState(v15);
v17 = GameManager::setIntGameVariable(v16, "0050", *(unsigned int *)(a1 + 1152));
v18 = GameManager::sharedState(v17);
if ( *(_QWORD *)(v18 + 552) )
*(_BYTE *)(*(_QWORD *)(*(_QWORD *)(GameManager::sharedState(v18) + 552) + 14248LL) + 1591LL) = 1;
}
return SetupTriggerPopup::onClose(a1, a2);
}