//
// sub_100401FCC from 0x100401fcc to 0x100402060 (148 bytes)
//
// 5 xrefs:
// > EditorUI::handleEditorAction @ 0x10016344c
// > EditorUI::toggleViewOption @ 0x100189510
// > LevelEditorLayer::updateEditorMode @ 0x1003f8e0c
// > LevelEditorLayer::onPlaytest @ 0x100404b10
// > LevelEditorLayer::onStopPlaytest @ 0x100405324
//
// 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 11:04:39 +0000
//
__int64 __fastcall sub_100401FCC(__int64 a1)
{
_BYTE *v2; // x20
__int64 v3; // x0
bool GameVariable; // w0
__int64 v5; // x0
__int64 result; // x0
unsigned int v7; // w20
_BYTE *v8; // x0
v2 = (_BYTE *)(a1 + 12288);
v3 = GameManager::sharedState();
v2[1724] = GameManager::getGameVariable(v3, "0117");
if ( (v2[1728] & 1) != 0 )
{
GameVariable = 1;
}
else
{
v5 = GameManager::sharedState();
GameVariable = GameManager::getGameVariable(v5, "0137");
}
v2[1727] = GameVariable;
result = sub_1002E757C(*(_QWORD *)(a1 + 14088));
if ( (_DWORD)result )
{
v7 = 0;
do
{
v8 = (_BYTE *)sub_1002E75A0(*(_QWORD *)(a1 + 14088), v7);
sub_1003FF4F4(a1, v8);
++v7;
result = sub_1002E757C(*(_QWORD *)(a1 + 14088));
}
while ( v7 < (unsigned int)result );
}
return result;
}