//
// sub_10059D540 from 0x10059d540 to 0x10059d5bc (124 bytes)
//
// 1 xrefs:
// > SetupPortalPopup::init @ 0x10059cdd0
//
// 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 12:32:31 +0000
//
__int64 __fastcall sub_10059D540(__int64 a1)
{
char v1; // al
__int64 v2; // rcx
unsigned int v3; // r14d
v1 = *(_BYTE *)(a1 + 740) ^ 1;
*(_BYTE *)(a1 + 740) = v1;
v2 = *(_QWORD *)(a1 + 672);
if ( v2 )
{
*(_BYTE *)(v2 + 1748) = v1;
}
else if ( (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 664)) )
{
v3 = 0;
do
*(_BYTE *)(sub_1007FEFE0(*(_QWORD *)(a1 + 664), v3++) + 1748) = *(_BYTE *)(a1 + 740);
while ( v3 < (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 664)) );
}
return SetupPortalPopup::updateItemVisibility(a1);
}