// // LevelEditorLayer::getNextFreeOrderChannel from 0x1000bfc40 to 0x1000bfeb7 (631 bytes) // // 2 xrefs: // > SetGroupIDLayer::onNextFreeOrderChannel @ 0x1003004a2 // > SetupRotateGameplayPopup::onPlusButton @ 0x100878d92 // // 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::getNextFreeOrderChannel(__int64 a1, __int64 a2) { int *i; // r15 __int64 v3; // rax unsigned int *v4; // rax _QWORD *v5; // r15 unsigned __int64 v6; // r12 _DWORD *v7; // r13 void *v8; // rdi unsigned int v9; // ebx unsigned __int64 v10; // r8 unsigned __int64 v11; // rcx __int64 *v12; // rsi __int64 v13; // r9 unsigned __int64 v14; // rsi __int64 **v15; // rax __int64 *j; // r9 unsigned __int64 v17; // rax _QWORD *v18; // rdi _QWORD *v19; // r14 void *v21[2]; // [rsp+0h] [rbp-60h] BYREF void *__p[2]; // [rsp+10h] [rbp-50h] int v23; // [rsp+20h] [rbp-40h] int v24[11]; // [rsp+34h] [rbp-2Ch] BYREF *(_OWORD *)__p = 0; *(_OWORD *)v21 = 0; v23 = 1065353216; for ( i = *(int **)(a2 + 16); i; i = *(int **)i ) sub_10001B800((float *)v21, i + 4, i + 4, (__m128)0LL); v3 = *(_QWORD *)(a1 + 3280); if ( v3 ) { v4 = *(unsigned int **)(v3 + 56); if ( *v4 ) { v5 = *((_QWORD **)v4 + 2); v6 = (unsigned __int64)&v5[*v4 - 1]; do { v7 = (_DWORD *)*v5; if ( !*v5 ) break; if ( v7[312] == 1 ) { v24[0] = v7[444]; sub_10001BC90((float *)v21, v24, v24, (__m128)0LL); if ( v7[257] == 2900 ) { v24[0] = v7[466]; sub_10001BC90((float *)v21, v24, v24, (__m128)0LL); } } ++v5; } while ( (unsigned __int64)v5 <= v6 ); } } v8 = v21[0]; v9 = 1; if ( v21[1] ) { if ( (((__int64)v21[1] - 1) & (__int64)v21[1]) == 0 ) { v10 = (unsigned __int64)v21[1] + 0x7FFFFFFF; v11 = 1; v9 = 1000; LABEL_14: v12 = *((__int64 **)v21[0] + (v10 & v11)); if ( v12 ) { while ( 1 ) { v12 = (__int64 *)*v12; if ( !v12 ) break; v13 = v12[1]; if ( v13 == v11 ) { if ( v11 == *((_DWORD *)v12 + 4) ) { if ( ++v11 != 1001 ) goto LABEL_14; goto LABEL_43; } } else if ( (((unsigned __int64)v21[1] - 1) & v13) != (v10 & v11) ) { goto LABEL_42; } } } goto LABEL_42; } v11 = 1; v9 = 1000; LABEL_23: v14 = v11; if ( v21[1] <= (void *)v11 ) { if ( !(((unsigned __int64)v21[1] | v11) >> 32) ) { v14 = (unsigned int)v11 % LODWORD(v21[1]); v15 = *((__int64 ***)v21[0] + v14); if ( v15 ) goto LABEL_27; goto LABEL_42; } v14 = v11 % (unsigned __int64)v21[1]; } v15 = *((__int64 ***)v21[0] + v14); if ( v15 ) { LABEL_27: for ( j = *v15; j; j = (__int64 *)*j ) { v17 = j[1]; if ( v17 == v11 ) { if ( v11 == *((_DWORD *)j + 4) ) { if ( ++v11 != 1001 ) goto LABEL_23; goto LABEL_43; } } else { if ( (void *)v17 < v21[1] ) goto LABEL_35; if ( ((unsigned __int64)v21[1] | v17) >> 32 ) { v17 %= (unsigned __int64)v21[1]; LABEL_35: if ( v17 != v14 ) break; continue; } if ( (unsigned int)v17 % LODWORD(v21[1]) != v14 ) break; } } } LABEL_42: v9 = v11; } LABEL_43: if ( __p[0] ) { v18 = __p[0]; do { v19 = (_QWORD *)*v18; operator delete(v18); v18 = v19; } while ( v19 ); v8 = v21[0]; } v21[0] = nullptr; if ( v8 ) operator delete(v8); return v9; }
GD Web Decomp Icon

GD Web Decomp

Raw Source