{"type": "func", "start": 5373730144, "end": 5373730790, "name": "SupportLayer::onLowDetail", "pseudocode": "// \n// SupportLayer::onLowDetail from 0x1404c9d60 to 0x1404c9fe6 (646 bytes)\n// \n// 2 xrefs:\n// > SupportLayer::createToggleButton @ 0x1404c91b2\n// > <???> @ 0x1406dd340\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\n// Hidden C++ exception states: #wind=6\nvoid SupportLayer::onLowDetail(SupportLayer *a1, cocos2d::CCObject *a2)\n{\n  __int64 v2; // rdi\n  cocos2d::CCString *v3; // rax\n  const char *CString; // rbx\n  cocos2d::CCTextureCache *v5; // rax\n  int i; // edi\n  cocos2d::CCString *v7; // rax\n  const char *v8; // rbx\n  __int64 v9; // rcx\n  __int64 v10; // rax\n  __int64 v11; // rbx\n  __int64 v12; // rax\n  FLAlertLayer *v13; // rbx\n  __int128 v14; // [rsp+50h] [rbp-48h] BYREF\n  __int64 v15; // [rsp+60h] [rbp-38h]\n  __int64 v16; // [rsp+68h] [rbp-30h]\n  _BYTE v17[40]; // [rsp+70h] [rbp-28h] BYREF\n  void *v18; // [rsp+B0h] [rbp+18h]\n  void *v19; // [rsp+B0h] [rbp+18h]\n  void *v20; // [rsp+B0h] [rbp+18h]\n\n  v2 = qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v18 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00((__int64)v18);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v2 = qword_1406C2ED8;\n  }\n  if ( *(_DWORD *)(v2 + 960) )\n  {\n    v3 = cocos2d::CCString::createWithFormat(\"game_bg_%02d_001.png\", *(_DWORD *)(v2 + 960));\n    CString = cocos2d::CCString::getCString(v3);\n    v5 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache();\n    cocos2d::CCTextureCache::removeTextureForKey(v5, CString);\n    *(_DWORD *)(v2 + 960) = 0;\n    for ( i = 1; i <= 59; ++i )\n    {\n      v7 = cocos2d::CCString::createWithFormat(\"game_bg_%02d_001.png\", i);\n      v8 = cocos2d::CCString::getCString(v7);\n      v10 = cocos2d::CCFileUtils::sharedFileUtils(v9);\n      (*(void (__fastcall **)(__int64, const char *))(*(_QWORD *)v10 + 48LL))(v10, v8);\n    }\n    v2 = qword_1406C2ED8;\n  }\n  if ( !v2 )\n  {\n    v19 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00((__int64)v19);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v2 = qword_1406C2ED8;\n  }\n  v11 = v2;\n  if ( !v2 )\n  {\n    v20 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00((__int64)v20);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v2 = qword_1406C2ED8;\n  }\n  *(_BYTE *)(v2 + 917) = *(_BYTE *)(v11 + 917) == 0;\n  if ( !*(_BYTE *)(v2 + 926) )\n  {\n    *(_BYTE *)(v2 + 926) = 1;\n    v14 = 0;\n    *(_QWORD *)&v14 = sub_14003AA10(0x50u);\n    v15 = 73;\n    v16 = 79;\n    strcpy((char *)v14, \"Low detail mode disables a lot of visual effects to increase performance.\");\n    v12 = sub_14003BDB0((__int64)v17, (__int64)&v14);\n    v13 = FLAlertLayer::create(0, (int)\"Low Detail Mode\", v12, (__int64)\"OK\", 0, 1133903872, 0, 0, 1065353216);\n    sub_14003A830((__int64)&v14);\n    v13->show(v13);\n  }\n}", "assembly": "; \n; SupportLayer::onLowDetail from 0x1404c9d60 to 0x1404c9fe6 (646 bytes)\n; \n; 2 xrefs:\n; > SupportLayer::createToggleButton @ 0x1404c91b2\n; > <???> @ 0x1406dd340\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1404c9d60\npush    rdi                                                            ; +0x5, 0x1404c9d65\nsub     rsp, 90h                                                       ; +0x6, 0x1404c9d66\nmov     rdi, cs:qword_1406C2ED8                                        ; +0xd, 0x1404c9d6d\ntest    rdi, rdi                                                       ; +0x14, 0x1404c9d74\njnz     short loc_1404C9DAB                                            ; +0x17, 0x1404c9d77\nmov     ecx, 668h; Size                                                ; +0x19, 0x1404c9d79\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x1e, 0x1404c9d7e\nmov     [rsp+98h+arg_10], rax                                          ; +0x23, 0x1404c9d83\nmov     rcx, rax                                                       ; +0x2b, 0x1404c9d8b\ncall    sub_14017AB00                                                  ; +0x2e, 0x1404c9d8e\nnop                                                                    ; +0x33, 0x1404c9d93\nmov     cs:qword_1406C2ED8, rax                                        ; +0x34, 0x1404c9d94\nmov     rdx, [rax]                                                     ; +0x3b, 0x1404c9d9b\nmov     rcx, rax                                                       ; +0x3e, 0x1404c9d9e\ncall    qword ptr [rdx+48h]                                            ; +0x41, 0x1404c9da1\nmov     rdi, cs:qword_1406C2ED8                                        ; +0x44, 0x1404c9da4\ncmp     dword ptr [rdi+3C0h], 0                                        ; +0x4b, 0x1404c9dab\njz      loc_1404C9E3C                                                  ; +0x52, 0x1404c9db2\nmov     edx, [rdi+3C0h]                                                ; +0x58, 0x1404c9db8\nlea     rcx, aGameBg02d001Pn; \"game_bg_%02d_001.png\"                   ; +0x5e, 0x1404c9dbe\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x65, 0x1404c9dc5\nmov     rcx, rax                                                       ; +0x6b, 0x1404c9dcb\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x6e, 0x1404c9dce\nmov     rbx, rax                                                       ; +0x74, 0x1404c9dd4\ncall    cs:?sharedTextureCache@CCTextureCache@cocos2d@@SAPEAV12@XZ; cocos2d::CCTextureCache::sharedTextureCache(void) ; +0x77, 0x1404c9dd7\nmov     rcx, rax                                                       ; +0x7d, 0x1404c9ddd\nmov     rdx, rbx                                                       ; +0x80, 0x1404c9de0\ncall    cs:?removeTextureForKey@CCTextureCache@cocos2d@@QEAAXPEBD@Z; cocos2d::CCTextureCache::removeTextureForKey(char const *) ; +0x83, 0x1404c9de3\nmov     dword ptr [rdi+3C0h], 0                                        ; +0x89, 0x1404c9de9\nmov     edi, 1                                                         ; +0x93, 0x1404c9df3\nnop     dword ptr [rax+rax+00000000h]                                  ; +0x98, 0x1404c9df8\nmov     edx, edi                                                       ; +0xa0, 0x1404c9e00\nlea     rcx, aGameBg02d001Pn; \"game_bg_%02d_001.png\"                   ; +0xa2, 0x1404c9e02\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0xa9, 0x1404c9e09\nmov     rcx, rax                                                       ; +0xaf, 0x1404c9e0f\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0xb2, 0x1404c9e12\nmov     rbx, rax                                                       ; +0xb8, 0x1404c9e18\ncall    cs:?sharedFileUtils@CCFileUtils@cocos2d@@SAPEAV12@XZ; cocos2d::CCFileUtils::sharedFileUtils(void) ; +0xbb, 0x1404c9e1b\nmov     r8, [rax]                                                      ; +0xc1, 0x1404c9e21\nmov     rdx, rbx                                                       ; +0xc4, 0x1404c9e24\nmov     rcx, rax                                                       ; +0xc7, 0x1404c9e27\ncall    qword ptr [r8+30h]                                             ; +0xca, 0x1404c9e2a\ninc     edi                                                            ; +0xce, 0x1404c9e2e\ncmp     edi, 3Bh ; ';'                                                 ; +0xd0, 0x1404c9e30\njle     short loc_1404C9E00                                            ; +0xd3, 0x1404c9e33\nmov     rdi, cs:qword_1406C2ED8                                        ; +0xd5, 0x1404c9e35\ntest    rdi, rdi                                                       ; +0xdc, 0x1404c9e3c\njnz     short loc_1404C9E73                                            ; +0xdf, 0x1404c9e3f\nmov     ecx, 668h; Size                                                ; +0xe1, 0x1404c9e41\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xe6, 0x1404c9e46\nmov     [rsp+98h+arg_10], rax                                          ; +0xeb, 0x1404c9e4b\nmov     rcx, rax                                                       ; +0xf3, 0x1404c9e53\ncall    sub_14017AB00                                                  ; +0xf6, 0x1404c9e56\nnop                                                                    ; +0xfb, 0x1404c9e5b\nmov     cs:qword_1406C2ED8, rax                                        ; +0xfc, 0x1404c9e5c\nmov     rdx, [rax]                                                     ; +0x103, 0x1404c9e63\nmov     rcx, rax                                                       ; +0x106, 0x1404c9e66\ncall    qword ptr [rdx+48h]                                            ; +0x109, 0x1404c9e69\nmov     rdi, cs:qword_1406C2ED8                                        ; +0x10c, 0x1404c9e6c\nmov     rbx, rdi                                                       ; +0x113, 0x1404c9e73\ntest    rdi, rdi                                                       ; +0x116, 0x1404c9e76\njnz     short loc_1404C9EAD                                            ; +0x119, 0x1404c9e79\nmov     ecx, 668h; Size                                                ; +0x11b, 0x1404c9e7b\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x120, 0x1404c9e80\nmov     [rsp+98h+arg_10], rax                                          ; +0x125, 0x1404c9e85\nmov     rcx, rax                                                       ; +0x12d, 0x1404c9e8d\ncall    sub_14017AB00                                                  ; +0x130, 0x1404c9e90\nnop                                                                    ; +0x135, 0x1404c9e95\nmov     cs:qword_1406C2ED8, rax                                        ; +0x136, 0x1404c9e96\nmov     rdx, [rax]                                                     ; +0x13d, 0x1404c9e9d\nmov     rcx, rax                                                       ; +0x140, 0x1404c9ea0\ncall    qword ptr [rdx+48h]                                            ; +0x143, 0x1404c9ea3\nmov     rdi, cs:qword_1406C2ED8                                        ; +0x146, 0x1404c9ea6\ncmp     byte ptr [rbx+395h], 0                                         ; +0x14d, 0x1404c9ead\nsetz    al                                                             ; +0x154, 0x1404c9eb4\nmov     [rdi+395h], al                                                 ; +0x157, 0x1404c9eb7\ncmp     byte ptr [rdi+39Eh], 0                                         ; +0x15d, 0x1404c9ebd\njnz     loc_1404C9FD5                                                  ; +0x164, 0x1404c9ec4\nmov     byte ptr [rdi+39Eh], 1                                         ; +0x16a, 0x1404c9eca\nxorps   xmm0, xmm0                                                     ; +0x171, 0x1404c9ed1\nmovups  [rsp+98h+var_48], xmm0                                         ; +0x174, 0x1404c9ed4\nmov     [rsp+98h+var_38], 0                                            ; +0x179, 0x1404c9ed9\nmov     [rsp+98h+var_30], 0Fh                                          ; +0x182, 0x1404c9ee2\nmov     ecx, 50h ; 'P'                                                 ; +0x18b, 0x1404c9eeb\ncall    sub_14003AA10                                                  ; +0x190, 0x1404c9ef0\nmov     rcx, rax                                                       ; +0x195, 0x1404c9ef5\nmov     qword ptr [rsp+98h+var_48], rax                                ; +0x198, 0x1404c9ef8\nmov     [rsp+98h+var_38], 49h ; 'I'                                    ; +0x19d, 0x1404c9efd\nmov     [rsp+98h+var_30], 4Fh ; 'O'                                    ; +0x1a6, 0x1404c9f06\nmovaps  xmm0, cs:xmmword_140620C40                                     ; +0x1af, 0x1404c9f0f\nmovups  xmmword ptr [rax], xmm0                                        ; +0x1b6, 0x1404c9f16\nmovaps  xmm1, cs:xmmword_140620C50                                     ; +0x1b9, 0x1404c9f19\nmovups  xmmword ptr [rax+10h], xmm1                                    ; +0x1c0, 0x1404c9f20\nmovaps  xmm0, cs:xmmword_140620C60                                     ; +0x1c4, 0x1404c9f24\nmovups  xmmword ptr [rax+20h], xmm0                                    ; +0x1cb, 0x1404c9f2b\nmovaps  xmm1, cs:xmmword_140620C70                                     ; +0x1cf, 0x1404c9f2f\nmovups  xmmword ptr [rax+30h], xmm1                                    ; +0x1d6, 0x1404c9f36\nmovsd   xmm0, cs:qword_140620C80                                       ; +0x1da, 0x1404c9f3a\nmovsd   qword ptr [rax+40h], xmm0                                      ; +0x1e2, 0x1404c9f42\nmovzx   eax, cs:byte_140620C88                                         ; +0x1e7, 0x1404c9f47\nmov     [rcx+48h], al                                                  ; +0x1ee, 0x1404c9f4e\nmov     byte ptr [rcx+49h], 0                                          ; +0x1f1, 0x1404c9f51\nlea     rax, [rsp+98h+var_48]                                          ; +0x1f5, 0x1404c9f55\nmov     [rsp+98h+arg_10], rax                                          ; +0x1fa, 0x1404c9f5a\nlea     rdx, [rsp+98h+var_48]                                          ; +0x202, 0x1404c9f62\nlea     rcx, [rsp+98h+var_28]                                          ; +0x207, 0x1404c9f67\ncall    sub_14003BDB0                                                  ; +0x20c, 0x1404c9f6c\nmovss   xmm0, cs:flt_140622C24                                         ; +0x211, 0x1404c9f71\nmovss   [rsp+98h+var_58], xmm0                                         ; +0x219, 0x1404c9f79\nxorps   xmm1, xmm1                                                     ; +0x21f, 0x1404c9f7f\nmovss   [rsp+98h+var_60], xmm1                                         ; +0x222, 0x1404c9f82\nmov     [rsp+98h+var_68], 0                                            ; +0x228, 0x1404c9f88\nmovss   xmm0, cs:dword_14062343C                                       ; +0x22d, 0x1404c9f8d\nmovss   [rsp+98h+var_70], xmm0                                         ; +0x235, 0x1404c9f95\nmov     [rsp+98h+var_78], 0                                            ; +0x23b, 0x1404c9f9b\nlea     r9, aOk; \"OK\"                                                  ; +0x244, 0x1404c9fa4\nmov     r8, rax                                                        ; +0x24b, 0x1404c9fab\nlea     rdx, aLowDetailMode; \"Low Detail Mode\"                         ; +0x24e, 0x1404c9fae\nxor     ecx, ecx                                                       ; +0x255, 0x1404c9fb5\ncall    FLAlertLayer__create                                           ; +0x257, 0x1404c9fb7\nmov     rbx, rax                                                       ; +0x25c, 0x1404c9fbc\nlea     rcx, [rsp+98h+var_48]                                          ; +0x25f, 0x1404c9fbf\ncall    sub_14003A830                                                  ; +0x264, 0x1404c9fc4\nmov     rdx, [rbx]                                                     ; +0x269, 0x1404c9fc9\nmov     rcx, rbx                                                       ; +0x26c, 0x1404c9fcc\ncall    qword ptr [rdx+410h]                                           ; +0x26f, 0x1404c9fcf\nmov     rbx, [rsp+98h+arg_0]                                           ; +0x275, 0x1404c9fd5\nadd     rsp, 90h                                                       ; +0x27d, 0x1404c9fdd\npop     rdi                                                            ; +0x284, 0x1404c9fe4\nretn                                                                   ; +0x285, 0x1404c9fe5", "xrefs": ["SupportLayer::createToggleButton @ 0x1404c91b2", "<???> @ 0x1406dd340"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}