// // EditorUI::toggleViewOption from 0x10063e620 to 0x10063ebe9 (1481 bytes) // // 2 xrefs: // > EditorUI::handleEditorAction @ 0x10060cf22 // > sub_10063E3C0 @ 0x10063e3dd // // 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 12:34:42 +0000 // char __fastcall EditorUI::toggleViewOption(_QWORD *a1, unsigned __int64 a2, __int64 a3) { __int64 v3; // r14 unsigned __int64 v6; // rdi unsigned __int64 v7; // r8 __int64 **v8; // rax __int64 *v9; // r15 unsigned __int64 v10; // rdi unsigned __int64 v11; // rax __int64 v12; // rax unsigned int v13; // eax __int64 v14; // rax __int64 v15; // rax std::string::value_type *v16; // r15 char *v17; // rax __int64 v18; // r15 __int64 v19; // r15 __int64 v20; // rax unsigned __int8 GameVariable; // al __int64 v22; // r15 __int64 v23; // rax __int64 v24; // r13 __int64 v25; // r15 __int64 v26; // r12 unsigned int v27; // eax const char *v28; // rsi unsigned __int64 v29; // rax __int64 v30; // rcx char v31; // al const std::string::value_type *v32; // rsi const char *data; // r14 size_t v34; // rax size_t v35; // r15 char *v36; // r12 size_t v37; // r13 char *v38; // r14 float v39; // [rsp+0h] [rbp-A0h] BYREF float v40; // [rsp+8h] [rbp-98h] BYREF __int64 v41; // [rsp+10h] [rbp-90h] std::string v42; // [rsp+18h] [rbp-88h] BYREF __int128 v43; // [rsp+30h] [rbp-70h] BYREF void *v44; // [rsp+40h] [rbp-60h] __int128 __dst; // [rsp+48h] [rbp-58h] BYREF void *v46; // [rsp+58h] [rbp-48h] std::string v47; // [rsp+60h] [rbp-40h] BYREF v3 = (unsigned int)a2; if ( ((_DWORD)a2 == 20 || (_DWORD)a2 == 9) && *(_DWORD *)(a1[180] + 1972LL) ) { strcpy((char *)&v42, "(Stop Playtest First."); EditorUI::showTextAlert((__int64)a1, &v42, 0, 1, 0); if ( (*(_BYTE *)&v42.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v42.__r_.__value_.__l.__data_); return 0; } v6 = a1[175]; if ( !v6 ) goto LABEL_43; a3 = ((v6 - ((v6 >> 1) & 0x5555555555555555LL)) & 0x3333333333333333LL) + (((v6 - ((v6 >> 1) & 0x5555555555555555LL)) >> 2) & 0x3333333333333333LL) + ((((v6 - ((v6 >> 1) & 0x5555555555555555LL)) & 0x3333333333333333LL) + (((v6 - ((v6 >> 1) & 0x5555555555555555LL)) >> 2) & 0x3333333333333333LL)) >> 4); v7 = (0x101010101010101LL * (a3 & 0xF0F0F0F0F0F0F0FuLL)) >> 56; if ( v7 > 1 ) { a2 = (int)a2; if ( v6 <= (int)a2 ) { if ( !((v6 | (int)a2) >> 32) ) { a3 = (unsigned int)a2 % (unsigned int)v6; a2 = a3; v8 = *(__int64 ***)(a1[174] + 8 * a3); if ( !v8 ) goto LABEL_43; goto LABEL_15; } a3 = (int)a2 % v6; a2 = a3; } v8 = *(__int64 ***)(a1[174] + 8 * a2); if ( !v8 ) goto LABEL_43; } else { a2 = (int)a2 & (v6 - 1); v8 = *(__int64 ***)(a1[174] + 8 * a2); if ( !v8 ) goto LABEL_43; } LABEL_15: v9 = *v8; if ( !*v8 ) goto LABEL_43; if ( (unsigned int)v7 < 2 ) { v10 = v6 - 1; while ( 1 ) { v12 = v9[1]; if ( v12 == (int)v3 ) { if ( *((_DWORD *)v9 + 4) == (_DWORD)v3 ) goto LABEL_33; } else if ( (v10 & v12) != a2 ) { goto LABEL_43; } v9 = (__int64 *)*v9; if ( !v9 ) goto LABEL_43; } } while ( 1 ) { v11 = v9[1]; if ( v11 == (int)v3 ) break; if ( v11 < v6 ) goto LABEL_24; if ( (v6 | v11) >> 32 ) { a3 = v11 % v6; v11 %= v6; LABEL_24: if ( v11 != a2 ) goto LABEL_43; goto LABEL_19; } a3 = (unsigned int)v11 % (unsigned int)v6; if ( a3 != a2 ) goto LABEL_43; LABEL_19: v9 = (__int64 *)*v9; if ( !v9 ) goto LABEL_43; } if ( *((_DWORD *)v9 + 4) != (_DWORD)v3 ) goto LABEL_19; LABEL_33: v13 = *((unsigned __int8 *)v9 + 24); if ( (v13 & 1) != 0 ) v14 = v9[4]; else v14 = v13 >> 1; if ( v14 ) { v15 = GameManager::sharedState(); if ( (v9[3] & 1) != 0 ) v16 = (std::string::value_type *)v9[5]; else v16 = (char *)v9 + 25; a2 = (unsigned __int64)v16; GameManager::toggleGameVariable(v15, v16); } LABEL_43: v41 = v3; switch ( (int)v3 ) { case 4: EditorUI::toggleObjectInfoLabel((__int64)a1, a2, a3); break; case 5: v19 = a1[180]; v20 = GameManager::sharedState(); GameVariable = GameManager::getGameVariable(v20, "0037"); a2 = GameVariable; LevelEditorLayer::toggleGround(v19, GameVariable); break; case 7: LevelEditorLayer::updatePreviewParticles(a1[180], a2, a3); break; case 8: LevelEditorLayer::updatePreviewAnim(a1[180], a2, a3); break; case 9: LevelEditorLayer::updateEditorMode(a1[180], a2, a3); break; case 14: v18 = GameManager::sharedState(); *(_BYTE *)(v18 + 921) = *(_BYTE *)(GameManager::sharedState() + 921) ^ 1; break; case 15: v22 = GameManager::sharedState(); *(_BYTE *)(v22 + 922) = *(_BYTE *)(GameManager::sharedState() + 922) ^ 1; break; case 17: sub_1000BD650(a1[180], a2); break; case 18: sub_1000BD670(a1[180], a2); break; case 19: sub_1000BD690(a1[180]); break; case 20: *(_BYTE *)(a1[180] + 14938LL) = 1; break; case 21: v17 = &byte_100BE7AC0; goto LABEL_50; case 22: v17 = &byte_100BE7AC1; LABEL_50: *v17 ^= 1u; break; default: break; } LevelEditorLayer::updateOptions(a1[180], a2, a3); v23 = a1[172]; if ( v23 ) { v24 = *(_QWORD *)(v23 + 56); while ( v24 ) { v25 = *(_QWORD *)(v24 + 264); v24 = *(_QWORD *)(v24 + 288); v26 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v25 + 1072LL))(v25); v27 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v25 + 64LL))(v25); v28 = "GJ_button_04.png"; if ( sub_10063E3F0((__int64)a1, v27) ) v28 = "GJ_button_03.png"; ButtonSprite::updateBGImage(v26, (__int64)v28); } } *(_WORD *)&v47.__r_.__value_.__l.0 = 0; v29 = (unsigned int)(v41 + 16); if ( (unsigned int)v29 < 0x27 ) { v30 = 0x7EFFFE0001LL; if ( _bittest64(&v30, v29) ) std::string::assign( &v47, (const std::string::value_type *)&unk_100A0D9E4 + *((int *)&unk_100A0D9E4 + (unsigned int)v29)); } v31 = *(_BYTE *)&v47.__r_.__value_.__s.0 & 1; if ( (*(_BYTE *)&v47.__r_.__value_.__s.0 & 1) != 0 ) { if ( !v47.__r_.__value_.__l.__size_ ) goto LABEL_88; } else if ( !(*(_BYTE *)&v47.__r_.__value_.__l.0 >> 1) ) { goto LABEL_88; } v32 = "Off"; if ( sub_10063E3F0((__int64)a1, (unsigned int)v41) ) v32 = "On"; std::string::append(&v47, v32); if ( (*(_BYTE *)&v47.__r_.__value_.__s.0 & 1) != 0 ) data = v47.__r_.__value_.__l.__data_; else data = v47.__r_.__value_.__s.__data_; v34 = strlen(data); if ( v34 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); v35 = v34; if ( v34 >= 0x17 ) { v37 = 26; if ( (v34 | 7) != 0x17 ) v37 = (v34 | 7) + 1; v36 = (char *)operator new(v37); v46 = v36; *(_QWORD *)&__dst = v37 | 1; *((_QWORD *)&__dst + 1) = v35; } else { LOBYTE(__dst) = 2 * v34; v36 = (char *)&__dst + 1; if ( !v34 ) goto LABEL_83; } memmove(v36, data, v35); LABEL_83: v36[v35] = 0; LOBYTE(v43) = 24; strcpy((char *)&v43 + 1, "chatFont.fnt"); v38 = TextAlertPopup::create(&__dst, 0x64u, &v43, 0.60000002, 0.60000002); if ( (v43 & 1) != 0 ) operator delete(v44); if ( (__dst & 1) != 0 ) operator delete(v46); TextAlertPopup::setLabelColor((__int64)v38, 65280); sub_100278250(&v39, 0.0, 1.0); sub_100278250(&v40, 20.0, -20.0); TextAlertPopup::setAlertPosition((__int64)v38, &v39, &v40); (*(void (__fastcall **)(_QWORD *, char *, __int64))(*a1 + 464LL))(a1, v38, 100); v31 = *(_BYTE *)&v47.__r_.__value_.__s.0 & 1; LABEL_88: if ( v31 ) operator delete(v47.__r_.__value_.__l.__data_); return 1; }
GD Web Decomp Icon

GD Web Decomp

Raw Source