// // sub_1003EFA30 from 0x1003efa30 to 0x1003efbe3 (435 bytes) // // 2 xrefs: // > FMODAudioEngine::swapMusicIndex @ 0x1003e920d // > FMODAudioEngine::stopAndRemoveMusic @ 0x1003e9ea8 // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // __int64 __fastcall sub_1003EFA30(__int64 *a1, int *a2) { unsigned __int64 v2; // r11 unsigned __int64 v4; // rcx unsigned __int64 v5; // rsi __int64 v6; // rdi __int64 *v8; // rax __int64 v9; // r9 unsigned __int64 v10; // r11 __int64 v11; // r8 __int64 v12; // rax unsigned __int64 v13; // rax __int64 v14; // rdi __int64 v15; // [rsp-28h] [rbp-28h] BYREF char v16; // [rsp-18h] [rbp-18h] v2 = a1[1]; if ( !v2 ) return 0; v4 = *a2; v5 = (0x101010101010101LL * ((((v2 - ((v2 >> 1) & 0x5555555555555555LL)) & 0x3333333333333333LL) + (((v2 - ((v2 >> 1) & 0x5555555555555555LL)) >> 2) & 0x3333333333333333LL) + ((((v2 - ((v2 >> 1) & 0x5555555555555555LL)) & 0x3333333333333333LL) + (((v2 - ((v2 >> 1) & 0x5555555555555555LL)) >> 2) & 0x3333333333333333LL)) >> 4)) & 0xF0F0F0F0F0F0F0FLL)) >> 56; if ( v5 > 1 ) { v6 = v4; if ( v2 <= v4 ) { if ( (v2 | v4) >> 32 ) v6 = v4 % v2; else v6 = (unsigned int)v4 % (unsigned int)v2; } } else { v6 = v4 & (v2 - 1); } v8 = *(__int64 **)(*a1 + 8 * v6); if ( !v8 ) return 0; v9 = *v8; if ( !*v8 ) return 0; if ( (unsigned int)v5 < 2 ) { v10 = v2 - 1; v11 = 0; while ( 1 ) { v12 = *(_QWORD *)(v9 + 8); if ( v12 == v4 ) { if ( *(_DWORD *)(v9 + 16) == (_DWORD)v4 ) goto LABEL_31; } else if ( (v10 & v12) != v6 ) { return v11; } v9 = *(_QWORD *)v9; if ( !v9 ) return v11; } } v11 = 0; while ( 1 ) { v13 = *(_QWORD *)(v9 + 8); if ( v13 == v4 ) break; if ( v13 < v2 ) goto LABEL_27; if ( (v2 | v13) >> 32 ) { v13 %= v2; LABEL_27: if ( v13 != v6 ) return v11; goto LABEL_22; } if ( (unsigned int)v13 % (unsigned int)v2 != v6 ) return v11; LABEL_22: v9 = *(_QWORD *)v9; if ( !v9 ) return v11; } if ( *(_DWORD *)(v9 + 16) != (_DWORD)v4 ) goto LABEL_22; LABEL_31: sub_100056B40((__int64)&v15, a1, (__int64 *)v9); v14 = v15; v15 = 0; if ( v14 ) { if ( v16 == 1 && (*(_BYTE *)(v14 + 40) & 1) != 0 ) operator delete(*(void **)(v14 + 56)); operator delete((void *)v14); } return 1; }
GD Web Decomp Icon

GD Web Decomp

Raw Source