//
// PlayLayer::toggleMGVisibility from 0x140512120 to 0x140512160 (64 bytes)
//
// 1 xrefs:
// > ??> @ 0x1407d5e90
//
// 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:31 +0000
//
__int64 __fastcall PlayLayer::toggleMGVisibility(__int64 a1, __int64 a2)
{
_BYTE *v2; // rcx
bool v3; // zf
__int64 result; // rax
v2 = *(_BYTE **)(a1 + 4352);
if ( v2 && v2[449] != (_BYTE)a2 )
{
v3 = v2[448] == 0;
v2[449] = a2;
if ( v3 || !(_BYTE)a2 )
{
return (*(__int64 (__fastcall **)(_BYTE *, _QWORD))(*(_QWORD *)v2 + 336LL))(v2, 0);
}
else
{
LOBYTE(a2) = 1;
return (*(__int64 (__fastcall **)(_BYTE *, __int64))(*(_QWORD *)v2 + 336LL))(v2, a2);
}
}
return result;
}