//
// SupportLayer::onLowDetail from 0x14066b4c0 to 0x14066b70d (589 bytes)
//
// 3 xrefs:
// > SupportLayer::createToggleButton @ 0x14066a938
// > ??> @ 0x140931ff4
// > ??> @ 0x140932000
//
// 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:35:52 +0000
//
// Hidden C++ exception states: #wind=6
char SupportLayer::onLowDetail()
{
__int64 v0; // rdi
int v1; // edx
cocos2d::CCString *v2; // rax
const char *CString; // rbx
__int64 v4; // rcx
cocos2d::CCTextureCache *v5; // rax
int i; // edi
cocos2d::CCString *v7; // rax
const char *v8; // rbx
__int64 v9; // rcx
__int64 v10; // rax
char result; // al
__int64 v12; // rax
cocos2d::CCObject *v13; // rbx
__int128 v14; // [rsp+50h] [rbp-48h] BYREF
__int64 v15; // [rsp+60h] [rbp-38h]
__int64 v16; // [rsp+68h] [rbp-30h]
_BYTE v17[32]; // [rsp+70h] [rbp-28h] BYREF
void *v18; // [rsp+B0h] [rbp+18h]
void *v19; // [rsp+B0h] [rbp+18h]
v0 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v18 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v18);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v0 = qword_14090BFD0;
}
v1 = *(_DWORD *)(v0 + 1012);
if ( v1 )
{
v2 = cocos2d::CCString::createWithFormat("game_bg_%02d_001.png", v1);
CString = cocos2d::CCString::getCString(v2);
v5 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache(v4);
cocos2d::CCTextureCache::removeTextureForKey(v5, CString);
*(_DWORD *)(v0 + 1012) = 0;
for ( i = 1; i <= 59; ++i )
{
v7 = cocos2d::CCString::createWithFormat("game_bg_%02d_001.png", i);
v8 = cocos2d::CCString::getCString(v7);
v10 = cocos2d::CCFileUtils::sharedFileUtils(v9);
(*(void (__fastcall **)(__int64, const char *))(*(_QWORD *)v10 + 48LL))(v10, v8);
}
v0 = qword_14090BFD0;
}
if ( !v0 )
{
v19 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v19);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v0 = qword_14090BFD0;
}
result = *(_BYTE *)(v0 + 957) == 0;
*(_BYTE *)(v0 + 957) = result;
if ( !*(_BYTE *)(v0 + 966) )
{
*(_BYTE *)(v0 + 966) = 1;
v14 = 0;
*(_QWORD *)&v14 = sub_14003D460(0x50u);
v15 = 73;
v16 = 79;
strcpy((char *)v14, "Low detail mode disables a lot of visual effects to increase performance.");
v12 = sub_14003F4F0((__int64)v17, (__int64)&v14);
v13 = FLAlertLayer::create(0, (int)"Low Detail Mode", v12, (__int64)"OK", 0, 1133903872, 0, 0, 1065353216);
sub_14003D310((__int64)&v14);
return (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v13 + 1064LL))(v13);
}
return result;
}