// // LevelEditorLayer::getNextFreeControlID from 0x1000bf9a0 to 0x1000bfc25 (645 bytes) // // 2 xrefs: // > IDNameBrowserPopup::onFormNextFree @ 0x10090ad4b // > sub_100914340 @ 0x100914587 // // 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:20:33 +0000 // __int64 __fastcall LevelEditorLayer::getNextFreeControlID(__int64 a1, __int64 a2) { int *i; // r15 __int64 v4; // rdi __int128 *j; // r14 __int64 v6; // rax unsigned int *v7; // rax __int64 *v8; // r15 unsigned __int64 v9; // r12 __int64 v10; // rax void *v11; // rdi unsigned int v12; // ebx unsigned __int64 v13; // r8 unsigned __int64 v14; // rcx __int64 *v15; // rsi __int64 v16; // r9 unsigned __int64 v17; // rsi __int64 **v18; // rax __int64 *k; // r9 unsigned __int64 v20; // rax _QWORD *v21; // rdi _QWORD *v22; // r14 void *v24[2]; // [rsp+0h] [rbp-50h] BYREF void *__p[2]; // [rsp+10h] [rbp-40h] int v26; // [rsp+20h] [rbp-30h] int v27[9]; // [rsp+2Ch] [rbp-24h] BYREF *(_OWORD *)__p = 0; *(_OWORD *)v24 = 0; v26 = 1065353216; for ( i = *(int **)(a2 + 16); i; i = *(int **)i ) sub_10001B800((float *)v24, i + 4, i + 4, (__m128)0LL); v4 = *(_QWORD *)(a1 + 3272); if ( v4 ) { for ( j = sub_1000BEF90(v4, 6) + 1; ; sub_10001B800((float *)v24, (int *)j + 4, (_DWORD *)j + 4, (__m128)0LL) ) { j = *(__int128 **)j; if ( !j ) break; } } v6 = *(_QWORD *)(a1 + 3280); if ( v6 ) { v7 = *(unsigned int **)(v6 + 56); if ( *v7 ) { v8 = *((__int64 **)v7 + 2); v9 = (unsigned __int64)&v8[*v7 - 1]; do { v10 = *v8; if ( !*v8 ) break; if ( *(_DWORD *)(v10 + 1248) == 1 ) { v27[0] = *(_DWORD *)(v10 + 1672); if ( v27[0] > 0 ) sub_10001B800((float *)v24, v27, v27, (__m128)0LL); } ++v8; } while ( (unsigned __int64)v8 <= v9 ); } } v11 = v24[0]; v12 = 1; if ( v24[1] ) { if ( (((__int64)v24[1] - 1) & (__int64)v24[1]) == 0 ) { v13 = (unsigned __int64)v24[1] + 0x7FFFFFFF; v14 = 1; v12 = 1000; LABEL_18: v15 = *((__int64 **)v24[0] + (v13 & v14)); if ( v15 ) { while ( 1 ) { v15 = (__int64 *)*v15; if ( !v15 ) break; v16 = v15[1]; if ( v16 == v14 ) { if ( v14 == *((_DWORD *)v15 + 4) ) { if ( ++v14 != 1001 ) goto LABEL_18; goto LABEL_47; } } else if ( (((unsigned __int64)v24[1] - 1) & v16) != (v13 & v14) ) { goto LABEL_46; } } } goto LABEL_46; } v14 = 1; v12 = 1000; LABEL_27: v17 = v14; if ( v24[1] <= (void *)v14 ) { if ( !(((unsigned __int64)v24[1] | v14) >> 32) ) { v17 = (unsigned int)v14 % LODWORD(v24[1]); v18 = *((__int64 ***)v24[0] + v17); if ( v18 ) goto LABEL_31; goto LABEL_46; } v17 = v14 % (unsigned __int64)v24[1]; } v18 = *((__int64 ***)v24[0] + v17); if ( v18 ) { LABEL_31: for ( k = *v18; k; k = (__int64 *)*k ) { v20 = k[1]; if ( v20 == v14 ) { if ( v14 == *((_DWORD *)k + 4) ) { if ( ++v14 != 1001 ) goto LABEL_27; goto LABEL_47; } } else { if ( (void *)v20 < v24[1] ) goto LABEL_39; if ( ((unsigned __int64)v24[1] | v20) >> 32 ) { v20 %= (unsigned __int64)v24[1]; LABEL_39: if ( v20 != v17 ) break; continue; } if ( (unsigned int)v20 % LODWORD(v24[1]) != v17 ) break; } } } LABEL_46: v12 = v14; } LABEL_47: if ( __p[0] ) { v21 = __p[0]; do { v22 = (_QWORD *)*v21; operator delete(v21); v21 = v22; } while ( v22 ); v11 = v24[0]; } v24[0] = nullptr; if ( v11 ) operator delete(v11); return v12; }
GD Web Decomp Icon

GD Web Decomp

Raw Source