{"type": "func", "start": 5373500160, "end": 5373500698, "name": "ShareLevelSettingsLayer::onUnlisted", "pseudocode": "// \n// ShareLevelSettingsLayer::onUnlisted from 0x140491b00 to 0x140491d1a (538 bytes)\n// \n// 2 xrefs:\n// > ShareLevelSettingsLayer::init @ 0x1404915bd\n// > <???> @ 0x1406dc0d4\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=3\nvoid ShareLevelSettingsLayer::onUnlisted(ShareLevelSettingsLayer *a1, cocos2d::CCObject *a2)\n{\n  GameManager *v3; // rcx\n  GameManager *v4; // rcx\n  __int64 v5; // rax\n  FLAlertLayer *v6; // rbx\n  GJGameLevel *m_level; // rax\n  __int128 v8; // [rsp+50h] [rbp-48h] BYREF\n  __int64 v9; // [rsp+60h] [rbp-38h]\n  __int64 v10; // [rsp+68h] [rbp-30h]\n  _BYTE v11[40]; // [rsp+70h] [rbp-28h] BYREF\n  void *v12; // [rsp+A0h] [rbp+8h]\n  void *v13; // [rsp+A0h] [rbp+8h]\n\n  a1->m_level->m_unlisted = !a1->m_level->m_unlisted;\n  v3 = (GameManager *)qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v12 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00((__int64)v12);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v3 = (GameManager *)qword_1406C2ED8;\n  }\n  if ( !GameManager::getGameVariable(v3, \"0070\") )\n  {\n    v4 = (GameManager *)qword_1406C2ED8;\n    if ( !qword_1406C2ED8 )\n    {\n      v13 = operator new(0x668u);\n      qword_1406C2ED8 = sub_14017AB00((__int64)v13);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n      v4 = (GameManager *)qword_1406C2ED8;\n    }\n    GameManager::setGameVariable(v4, \"0070\", 1);\n    v8 = 0;\n    *(_QWORD *)&v8 = sub_14003AA10(0x80u);\n    v9 = 119;\n    v10 = 127;\n    strcpy(\n      (char *)v8,\n      \"An unlisted level can only be found by entering its levelID. Once a level is unlisted, it cannot change back to listed.\");\n    v5 = sub_14003BDB0((__int64)v11, (__int64)&v8);\n    v6 = FLAlertLayer::create(0, (int)\"Unlisted\", v5, (__int64)\"OK\", 0, 1134559232, 0, 0, 1065353216);\n    sub_14003A830((__int64)&v8);\n    v6->show(v6);\n  }\n  m_level = a1->m_level;\n  if ( !m_level->m_unlisted )\n    m_level->m_friendsOnly = 0;\n  ShareLevelSettingsLayer::updateSettingsState(a1);\n}", "assembly": "; \n; ShareLevelSettingsLayer::onUnlisted from 0x140491b00 to 0x140491d1a (538 bytes)\n; \n; 2 xrefs:\n; > ShareLevelSettingsLayer::init @ 0x1404915bd\n; > <???> @ 0x1406dc0d4\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_8], rbx                                               ; +0x0, 0x140491b00\npush    rdi                                                            ; +0x5, 0x140491b05\nsub     rsp, 90h                                                       ; +0x6, 0x140491b06\nmov     rdi, rcx                                                       ; +0xd, 0x140491b0d\nmov     rdx, [rcx+288h]                                                ; +0x10, 0x140491b10\ncmp     byte ptr [rdx+2A8h], 0                                         ; +0x17, 0x140491b17\nsetz    al                                                             ; +0x1e, 0x140491b1e\nmov     [rdx+2A8h], al                                                 ; +0x21, 0x140491b21\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x27, 0x140491b27\ntest    rcx, rcx                                                       ; +0x2e, 0x140491b2e\njnz     short loc_140491B65                                            ; +0x31, 0x140491b31\nmov     ecx, 668h; Size                                                ; +0x33, 0x140491b33\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x38, 0x140491b38\nmov     [rsp+98h+arg_0], rax                                           ; +0x3d, 0x140491b3d\nmov     rcx, rax                                                       ; +0x45, 0x140491b45\ncall    sub_14017AB00                                                  ; +0x48, 0x140491b48\nnop                                                                    ; +0x4d, 0x140491b4d\nmov     cs:qword_1406C2ED8, rax                                        ; +0x4e, 0x140491b4e\nmov     rdx, [rax]                                                     ; +0x55, 0x140491b55\nmov     rcx, rax                                                       ; +0x58, 0x140491b58\ncall    qword ptr [rdx+48h]                                            ; +0x5b, 0x140491b5b\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x5e, 0x140491b5e\nlea     rdx, a0070; \"0070\"                                             ; +0x65, 0x140491b65\ncall    GameManager__getGameVariable                                   ; +0x6c, 0x140491b6c\ntest    al, al                                                         ; +0x71, 0x140491b71\njnz     loc_140491CEB                                                  ; +0x73, 0x140491b73\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x79, 0x140491b79\ntest    rcx, rcx                                                       ; +0x80, 0x140491b80\njnz     short loc_140491BB8                                            ; +0x83, 0x140491b83\nmov     ecx, 668h; Size                                                ; +0x85, 0x140491b85\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x8a, 0x140491b8a\nmov     [rsp+98h+arg_0], rax                                           ; +0x8f, 0x140491b8f\nmov     rcx, rax                                                       ; +0x97, 0x140491b97\ncall    sub_14017AB00                                                  ; +0x9a, 0x140491b9a\nnop                                                                    ; +0x9f, 0x140491b9f\nmov     cs:qword_1406C2ED8, rax                                        ; +0xa0, 0x140491ba0\nmov     r8, [rax]                                                      ; +0xa7, 0x140491ba7\nmov     rcx, rax                                                       ; +0xaa, 0x140491baa\ncall    qword ptr [r8+48h]                                             ; +0xad, 0x140491bad\nmov     rcx, cs:qword_1406C2ED8                                        ; +0xb1, 0x140491bb1\nmov     r8b, 1                                                         ; +0xb8, 0x140491bb8\nlea     rdx, a0070; \"0070\"                                             ; +0xbb, 0x140491bbb\ncall    GameManager__setGameVariable                                   ; +0xc2, 0x140491bc2\nxorps   xmm0, xmm0                                                     ; +0xc7, 0x140491bc7\nmovups  [rsp+98h+var_48], xmm0                                         ; +0xca, 0x140491bca\nxor     ebx, ebx                                                       ; +0xcf, 0x140491bcf\nmov     [rsp+98h+var_38], rbx                                          ; +0xd1, 0x140491bd1\nmov     [rsp+98h+var_30], 0Fh                                          ; +0xd6, 0x140491bd6\nmov     ecx, 80h                                                       ; +0xdf, 0x140491bdf\ncall    sub_14003AA10                                                  ; +0xe4, 0x140491be4\nmov     rcx, rax                                                       ; +0xe9, 0x140491be9\nmov     qword ptr [rsp+98h+var_48], rax                                ; +0xec, 0x140491bec\nmov     [rsp+98h+var_38], 77h ; 'w'                                    ; +0xf1, 0x140491bf1\nmov     [rsp+98h+var_30], 7Fh                                          ; +0xfa, 0x140491bfa\nmovaps  xmm0, cs:xmmword_14060B510                                     ; +0x103, 0x140491c03\nmovups  xmmword ptr [rax], xmm0                                        ; +0x10a, 0x140491c0a\nmovaps  xmm1, cs:xmmword_14060B520                                     ; +0x10d, 0x140491c0d\nmovups  xmmword ptr [rax+10h], xmm1                                    ; +0x114, 0x140491c14\nmovaps  xmm0, cs:xmmword_14060B530                                     ; +0x118, 0x140491c18\nmovups  xmmword ptr [rax+20h], xmm0                                    ; +0x11f, 0x140491c1f\nmovaps  xmm1, cs:xmmword_14060B540                                     ; +0x123, 0x140491c23\nmovups  xmmword ptr [rax+30h], xmm1                                    ; +0x12a, 0x140491c2a\nmovaps  xmm0, cs:xmmword_14060B550                                     ; +0x12e, 0x140491c2e\nmovups  xmmword ptr [rax+40h], xmm0                                    ; +0x135, 0x140491c35\nmovaps  xmm1, cs:xmmword_14060B560                                     ; +0x139, 0x140491c39\nmovups  xmmword ptr [rax+50h], xmm1                                    ; +0x140, 0x140491c40\nmovaps  xmm0, cs:xmmword_14060B570                                     ; +0x144, 0x140491c44\nmovups  xmmword ptr [rax+60h], xmm0                                    ; +0x14b, 0x140491c4b\nmov     eax, cs:dword_14060B580                                        ; +0x14f, 0x140491c4f\nmov     [rcx+70h], eax                                                 ; +0x155, 0x140491c55\nmovzx   eax, cs:word_14060B584                                         ; +0x158, 0x140491c58\nmov     [rcx+74h], ax                                                  ; +0x15f, 0x140491c5f\nmovzx   eax, cs:byte_14060B586                                         ; +0x163, 0x140491c63\nmov     [rcx+76h], al                                                  ; +0x16a, 0x140491c6a\nmov     [rcx+77h], bl                                                  ; +0x16d, 0x140491c6d\nlea     rax, [rsp+98h+var_48]                                          ; +0x170, 0x140491c70\nmov     [rsp+98h+arg_0], rax                                           ; +0x175, 0x140491c75\nlea     rdx, [rsp+98h+var_48]                                          ; +0x17d, 0x140491c7d\nlea     rcx, [rsp+98h+var_28]                                          ; +0x182, 0x140491c82\ncall    sub_14003BDB0                                                  ; +0x187, 0x140491c87\nmovss   xmm0, cs:flt_140622C24                                         ; +0x18c, 0x140491c8c\nmovss   [rsp+98h+var_58], xmm0                                         ; +0x194, 0x140491c94\nxorps   xmm1, xmm1                                                     ; +0x19a, 0x140491c9a\nmovss   [rsp+98h+var_60], xmm1                                         ; +0x19d, 0x140491c9d\nmov     [rsp+98h+var_68], bl                                           ; +0x1a3, 0x140491ca3\nmovss   xmm0, cs:dword_140623450                                       ; +0x1a7, 0x140491ca7\nmovss   [rsp+98h+var_70], xmm0                                         ; +0x1af, 0x140491caf\nmov     [rsp+98h+var_78], rbx                                          ; +0x1b5, 0x140491cb5\nlea     r9, aOk; \"OK\"                                                  ; +0x1ba, 0x140491cba\nmov     r8, rax                                                        ; +0x1c1, 0x140491cc1\nlea     rdx, aUnlisted; \"Unlisted\"                                     ; +0x1c4, 0x140491cc4\nxor     ecx, ecx                                                       ; +0x1cb, 0x140491ccb\ncall    FLAlertLayer__create                                           ; +0x1cd, 0x140491ccd\nmov     rbx, rax                                                       ; +0x1d2, 0x140491cd2\nlea     rcx, [rsp+98h+var_48]                                          ; +0x1d5, 0x140491cd5\ncall    sub_14003A830                                                  ; +0x1da, 0x140491cda\nmov     rdx, [rbx]                                                     ; +0x1df, 0x140491cdf\nmov     rcx, rbx                                                       ; +0x1e2, 0x140491ce2\ncall    qword ptr [rdx+410h]                                           ; +0x1e5, 0x140491ce5\nmov     rax, [rdi+288h]                                                ; +0x1eb, 0x140491ceb\ncmp     byte ptr [rax+2A8h], 0                                         ; +0x1f2, 0x140491cf2\njnz     short loc_140491D02                                            ; +0x1f9, 0x140491cf9\nmov     byte ptr [rax+2A9h], 0                                         ; +0x1fb, 0x140491cfb\nmov     rcx, rdi                                                       ; +0x202, 0x140491d02\nmov     rbx, [rsp+98h+arg_8]                                           ; +0x205, 0x140491d05\nadd     rsp, 90h                                                       ; +0x20d, 0x140491d0d\npop     rdi                                                            ; +0x214, 0x140491d14\njmp     ShareLevelSettingsLayer__updateSettingsState                   ; +0x215, 0x140491d15", "xrefs": ["ShareLevelSettingsLayer::init @ 0x1404915bd", "<???> @ 0x1406dc0d4"], "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"}