{"type": "func", "start": 5372817312, "end": 5372817878, "name": "LevelBrowserLayer::onSafeMode", "pseudocode": "// \n// LevelBrowserLayer::onSafeMode from 0x1403eafa0 to 0x1403eb1d6 (566 bytes)\n// \n// 6 xrefs:\n// > LevelBrowserLayer::init @ 0x1403e3a64\n// > LevelBrowserLayer::init @ 0x1403e3af9\n// > LevelBrowserLayer::init @ 0x1403e3b91\n// > <???> @ 0x1408c51a0\n// > <???> @ 0x1408c51dc\n// > <???> @ 0x14092516c\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:31:45 +0000\n// \n\n__int64 __fastcall LevelBrowserLayer::onSafeMode(_QWORD *a1, __int64 a2)\n{\n  __int64 result; // rax\n  int v4; // ebx\n  bool v5; // si\n  __int64 v6; // r14\n  __int64 v7; // r15\n  __int64 v8; // r14\n  __int64 v9; // r14\n  bool v10; // si\n  __int64 v11; // r15\n  __int64 v12; // r14\n  __int64 v13; // r14\n  bool v14; // si\n  __int64 v15; // r15\n  __int64 v16; // r14\n  int v17; // ecx\n  int v18; // ecx\n  int v19; // eax\n  __int64 v20; // rax\n\n  result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);\n  if ( (_DWORD)result != dword_1408FE4A4 )\n  {\n    v4 = 2;\n    v5 = (_DWORD)result == 0;\n    v6 = a1[101];\n    dword_1408FE4A4 = result;\n    if ( v6 )\n    {\n      v7 = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v6 + 472LL))(v6, 1);\n      v8 = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v6 + 472LL))(v6, 2);\n      if ( v7 )\n        (*(void (__fastcall **)(__int64, bool))(*(_QWORD *)v7 + 336LL))(v7, v5);\n      if ( v8 )\n        (*(void (__fastcall **)(__int64, bool))(*(_QWORD *)v8 + 336LL))(v8, !v5);\n    }\n    v9 = a1[102];\n    v10 = dword_1408FE4A4 == 1;\n    if ( v9 )\n    {\n      v11 = (*(__int64 (__fastcall **)(_QWORD, __int64))(*(_QWORD *)v9 + 472LL))(a1[102], 1);\n      v12 = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v9 + 472LL))(v9, 2);\n      if ( v11 )\n        (*(void (__fastcall **)(__int64, bool))(*(_QWORD *)v11 + 336LL))(v11, v10);\n      if ( v12 )\n        (*(void (__fastcall **)(__int64, bool))(*(_QWORD *)v12 + 336LL))(v12, !v10);\n    }\n    v13 = a1[103];\n    v14 = dword_1408FE4A4 == 2;\n    if ( v13 )\n    {\n      v15 = (*(__int64 (__fastcall **)(_QWORD, __int64))(*(_QWORD *)v13 + 472LL))(a1[103], 1);\n      v16 = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v13 + 472LL))(v13, 2);\n      if ( v15 )\n        (*(void (__fastcall **)(__int64, bool))(*(_QWORD *)v15 + 336LL))(v15, v14);\n      if ( v16 )\n        (*(void (__fastcall **)(__int64, bool))(*(_QWORD *)v16 + 336LL))(v16, !v14);\n    }\n    v17 = *(_DWORD *)(a1[83] + 320LL);\n    if ( v17 == 33 || v17 == 22 )\n    {\n      v4 = 1;\n    }\n    else if ( v17 != 34 && v17 != 23 )\n    {\n      v4 = 0;\n    }\n    if ( dword_1408FE4A4 == 2 )\n    {\n      if ( v4 == 1 )\n      {\n        v18 = 22;\nLABEL_32:\n        v20 = GJSearchObject::create_2(v18);\n        *(_BYTE *)(v20 + 436) = dword_1408FE4A4 == 1;\n        LevelBrowserLayer::loadPage((__int64)a1, (int *)v20);\n        return LevelBrowserLayer::updateBackgroundColor(a1);\n      }\n      v18 = 21;\n      v19 = 23;\n    }\n    else\n    {\n      if ( v4 == 1 )\n      {\n        v18 = 33;\n        goto LABEL_32;\n      }\n      v18 = 32;\n      v19 = 34;\n    }\n    if ( v4 == 2 )\n      v18 = v19;\n    goto LABEL_32;\n  }\n  return result;\n}", "assembly": "; \n; LevelBrowserLayer::onSafeMode from 0x1403eafa0 to 0x1403eb1d6 (566 bytes)\n; \n; 6 xrefs:\n; > LevelBrowserLayer::init @ 0x1403e3a64\n; > LevelBrowserLayer::init @ 0x1403e3af9\n; > LevelBrowserLayer::init @ 0x1403e3b91\n; > <???> @ 0x1408c51a0\n; > <???> @ 0x1408c51dc\n; > <???> @ 0x14092516c\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:31:45 +0000\n; \npush    rdi                                                            ; +0x0, 0x1403eafa0\nsub     rsp, 20h                                                       ; +0x2, 0x1403eafa2\nmov     rax, [rdx]                                                     ; +0x6, 0x1403eafa6\nmov     rdi, rcx                                                       ; +0x9, 0x1403eafa9\nmov     rcx, rdx                                                       ; +0xc, 0x1403eafac\ncall    qword ptr [rax+38h]                                            ; +0xf, 0x1403eafaf\ncmp     eax, cs:dword_1408FE4A4                                        ; +0x12, 0x1403eafb2\njz      loc_1403EB1D0                                                  ; +0x18, 0x1403eafb8\nmov     [rsp+28h+arg_0], rbx                                           ; +0x1e, 0x1403eafbe\ntest    eax, eax                                                       ; +0x23, 0x1403eafc3\nmov     [rsp+28h+arg_8], rsi                                           ; +0x25, 0x1403eafc5\nmov     ebx, 2                                                         ; +0x2a, 0x1403eafca\nmov     [rsp+28h+arg_10], r14                                          ; +0x2f, 0x1403eafcf\nsetz    sil                                                            ; +0x34, 0x1403eafd4\nmov     r14, [rdi+328h]                                                ; +0x38, 0x1403eafd8\nmov     [rsp+28h+arg_18], r15                                          ; +0x3f, 0x1403eafdf\nmov     cs:dword_1408FE4A4, eax                                        ; +0x44, 0x1403eafe4\ntest    r14, r14                                                       ; +0x4a, 0x1403eafea\njz      short loc_1403EB04A                                            ; +0x4d, 0x1403eafed\nmov     rax, [r14]                                                     ; +0x4f, 0x1403eafef\nmov     edx, 1                                                         ; +0x52, 0x1403eaff2\nmov     rcx, r14                                                       ; +0x57, 0x1403eaff7\ncall    qword ptr [rax+1D8h]                                           ; +0x5a, 0x1403eaffa\nmov     rdx, [r14]                                                     ; +0x60, 0x1403eb000\nmov     rcx, r14                                                       ; +0x63, 0x1403eb003\nmov     r15, rax                                                       ; +0x66, 0x1403eb006\nmov     r8, [rdx+1D8h]                                                 ; +0x69, 0x1403eb009\nmov     edx, ebx                                                       ; +0x70, 0x1403eb010\ncall    r8                                                             ; +0x72, 0x1403eb012\nmov     r14, rax                                                       ; +0x75, 0x1403eb015\ntest    r15, r15                                                       ; +0x78, 0x1403eb018\njz      short loc_1403EB031                                            ; +0x7b, 0x1403eb01b\nmov     rcx, [r15]                                                     ; +0x7d, 0x1403eb01d\nmovzx   edx, sil                                                       ; +0x80, 0x1403eb020\nmov     r8, [rcx+150h]                                                 ; +0x84, 0x1403eb024\nmov     rcx, r15                                                       ; +0x8b, 0x1403eb02b\ncall    r8                                                             ; +0x8e, 0x1403eb02e\ntest    r14, r14                                                       ; +0x91, 0x1403eb031\njz      short loc_1403EB04A                                            ; +0x94, 0x1403eb034\nmov     rax, [r14]                                                     ; +0x96, 0x1403eb036\nxor     sil, 1                                                         ; +0x99, 0x1403eb039\nmovzx   edx, sil                                                       ; +0x9d, 0x1403eb03d\nmov     rcx, r14                                                       ; +0xa1, 0x1403eb041\ncall    qword ptr [rax+150h]                                           ; +0xa4, 0x1403eb044\ncmp     cs:dword_1408FE4A4, 1                                          ; +0xaa, 0x1403eb04a\nmov     r14, [rdi+330h]                                                ; +0xb1, 0x1403eb051\nsetz    sil                                                            ; +0xb8, 0x1403eb058\ntest    r14, r14                                                       ; +0xbc, 0x1403eb05c\njz      short loc_1403EB0BC                                            ; +0xbf, 0x1403eb05f\nmov     rax, [r14]                                                     ; +0xc1, 0x1403eb061\nmov     edx, 1                                                         ; +0xc4, 0x1403eb064\nmov     rcx, r14                                                       ; +0xc9, 0x1403eb069\ncall    qword ptr [rax+1D8h]                                           ; +0xcc, 0x1403eb06c\nmov     rdx, [r14]                                                     ; +0xd2, 0x1403eb072\nmov     rcx, r14                                                       ; +0xd5, 0x1403eb075\nmov     r15, rax                                                       ; +0xd8, 0x1403eb078\nmov     r8, [rdx+1D8h]                                                 ; +0xdb, 0x1403eb07b\nmov     edx, ebx                                                       ; +0xe2, 0x1403eb082\ncall    r8                                                             ; +0xe4, 0x1403eb084\nmov     r14, rax                                                       ; +0xe7, 0x1403eb087\ntest    r15, r15                                                       ; +0xea, 0x1403eb08a\njz      short loc_1403EB0A3                                            ; +0xed, 0x1403eb08d\nmov     rcx, [r15]                                                     ; +0xef, 0x1403eb08f\nmovzx   edx, sil                                                       ; +0xf2, 0x1403eb092\nmov     r8, [rcx+150h]                                                 ; +0xf6, 0x1403eb096\nmov     rcx, r15                                                       ; +0xfd, 0x1403eb09d\ncall    r8                                                             ; +0x100, 0x1403eb0a0\ntest    r14, r14                                                       ; +0x103, 0x1403eb0a3\njz      short loc_1403EB0BC                                            ; +0x106, 0x1403eb0a6\nmov     rax, [r14]                                                     ; +0x108, 0x1403eb0a8\nxor     sil, 1                                                         ; +0x10b, 0x1403eb0ab\nmovzx   edx, sil                                                       ; +0x10f, 0x1403eb0af\nmov     rcx, r14                                                       ; +0x113, 0x1403eb0b3\ncall    qword ptr [rax+150h]                                           ; +0x116, 0x1403eb0b6\ncmp     cs:dword_1408FE4A4, ebx                                        ; +0x11c, 0x1403eb0bc\nmov     r14, [rdi+338h]                                                ; +0x122, 0x1403eb0c2\nsetz    sil                                                            ; +0x129, 0x1403eb0c9\ntest    r14, r14                                                       ; +0x12d, 0x1403eb0cd\njz      short loc_1403EB12D                                            ; +0x130, 0x1403eb0d0\nmov     rax, [r14]                                                     ; +0x132, 0x1403eb0d2\nmov     edx, 1                                                         ; +0x135, 0x1403eb0d5\nmov     rcx, r14                                                       ; +0x13a, 0x1403eb0da\ncall    qword ptr [rax+1D8h]                                           ; +0x13d, 0x1403eb0dd\nmov     rdx, [r14]                                                     ; +0x143, 0x1403eb0e3\nmov     rcx, r14                                                       ; +0x146, 0x1403eb0e6\nmov     r15, rax                                                       ; +0x149, 0x1403eb0e9\nmov     r8, [rdx+1D8h]                                                 ; +0x14c, 0x1403eb0ec\nmov     edx, ebx                                                       ; +0x153, 0x1403eb0f3\ncall    r8                                                             ; +0x155, 0x1403eb0f5\nmov     r14, rax                                                       ; +0x158, 0x1403eb0f8\ntest    r15, r15                                                       ; +0x15b, 0x1403eb0fb\njz      short loc_1403EB114                                            ; +0x15e, 0x1403eb0fe\nmov     rcx, [r15]                                                     ; +0x160, 0x1403eb100\nmovzx   edx, sil                                                       ; +0x163, 0x1403eb103\nmov     r8, [rcx+150h]                                                 ; +0x167, 0x1403eb107\nmov     rcx, r15                                                       ; +0x16e, 0x1403eb10e\ncall    r8                                                             ; +0x171, 0x1403eb111\ntest    r14, r14                                                       ; +0x174, 0x1403eb114\njz      short loc_1403EB12D                                            ; +0x177, 0x1403eb117\nmov     rax, [r14]                                                     ; +0x179, 0x1403eb119\nxor     sil, 1                                                         ; +0x17c, 0x1403eb11c\nmovzx   edx, sil                                                       ; +0x180, 0x1403eb120\nmov     rcx, r14                                                       ; +0x184, 0x1403eb124\ncall    qword ptr [rax+150h]                                           ; +0x187, 0x1403eb127\nmov     rax, [rdi+298h]                                                ; +0x18d, 0x1403eb12d\nmov     r15, [rsp+28h+arg_18]                                          ; +0x194, 0x1403eb134\nmov     r14, [rsp+28h+arg_10]                                          ; +0x199, 0x1403eb139\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x19e, 0x1403eb13e\nmov     ecx, [rax+140h]                                                ; +0x1a3, 0x1403eb143\ncmp     ecx, 21h ; '!'                                                 ; +0x1a9, 0x1403eb149\njz      short loc_1403EB161                                            ; +0x1ac, 0x1403eb14c\ncmp     ecx, 16h                                                       ; +0x1ae, 0x1403eb14e\njz      short loc_1403EB161                                            ; +0x1b1, 0x1403eb151\ncmp     ecx, 22h ; '\"'                                                 ; +0x1b3, 0x1403eb153\njz      short loc_1403EB166                                            ; +0x1b6, 0x1403eb156\ncmp     ecx, 17h                                                       ; +0x1b8, 0x1403eb158\njz      short loc_1403EB166                                            ; +0x1bb, 0x1403eb15b\nxor     ebx, ebx                                                       ; +0x1bd, 0x1403eb15d\njmp     short loc_1403EB166                                            ; +0x1bf, 0x1403eb15f\nmov     ebx, 1                                                         ; +0x1c1, 0x1403eb161\ncmp     cs:dword_1408FE4A4, 2                                          ; +0x1c6, 0x1403eb166\njnz     short loc_1403EB187                                            ; +0x1cd, 0x1403eb16d\ncmp     ebx, 1                                                         ; +0x1cf, 0x1403eb16f\njnz     short loc_1403EB17B                                            ; +0x1d2, 0x1403eb172\nmov     ecx, 16h                                                       ; +0x1d4, 0x1403eb174\njmp     short loc_1403EB1A3                                            ; +0x1d9, 0x1403eb179\nmov     ecx, 15h                                                       ; +0x1db, 0x1403eb17b\nmov     eax, 17h                                                       ; +0x1e0, 0x1403eb180\njmp     short loc_1403EB19D                                            ; +0x1e5, 0x1403eb185\ncmp     ebx, 1                                                         ; +0x1e7, 0x1403eb187\njnz     short loc_1403EB193                                            ; +0x1ea, 0x1403eb18a\nmov     ecx, 21h ; '!'                                                 ; +0x1ec, 0x1403eb18c\njmp     short loc_1403EB1A3                                            ; +0x1f1, 0x1403eb191\nmov     ecx, 20h ; ' '                                                 ; +0x1f3, 0x1403eb193\nmov     eax, 22h ; '\"'                                                 ; +0x1f8, 0x1403eb198\ncmp     ebx, 2                                                         ; +0x1fd, 0x1403eb19d\ncmovz   ecx, eax                                                       ; +0x200, 0x1403eb1a0\ncall    GJSearchObject__create_2                                       ; +0x203, 0x1403eb1a3\ncmp     cs:dword_1408FE4A4, 1                                          ; +0x208, 0x1403eb1a8\nmov     rdx, rax                                                       ; +0x20f, 0x1403eb1af\nsetz    cl                                                             ; +0x212, 0x1403eb1b2\nmov     [rax+1B4h], cl                                                 ; +0x215, 0x1403eb1b5\nmov     rcx, rdi                                                       ; +0x21b, 0x1403eb1bb\ncall    LevelBrowserLayer__loadPage                                    ; +0x21e, 0x1403eb1be\nmov     rcx, rdi                                                       ; +0x223, 0x1403eb1c3\ncall    LevelBrowserLayer__updateBackgroundColor                       ; +0x226, 0x1403eb1c6\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x22b, 0x1403eb1cb\nadd     rsp, 20h                                                       ; +0x230, 0x1403eb1d0\npop     rdi                                                            ; +0x234, 0x1403eb1d4\nretn                                                                   ; +0x235, 0x1403eb1d5", "xrefs": ["LevelBrowserLayer::init @ 0x1403e3a64", "LevelBrowserLayer::init @ 0x1403e3af9", "LevelBrowserLayer::init @ 0x1403e3b91", "<???> @ 0x1408c51a0", "<???> @ 0x1408c51dc", "<???> @ 0x14092516c"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}