// // sub_1004C5FB4 from 0x1004c5fb4 to 0x1004c62c4 (784 bytes) // // 4 xrefs: // > @ 0x1008286b0 // > @ 0x100828858 // > @ 0x100828a00 // > @ 0x100828b90 // // 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_1004C5FB4(__int64 a1, unsigned int a2, int a3, __int64 a4, _QWORD *a5, int a6, int a7) { char *v14; // x0 _DWORD *v15; // x24 int v16; // w8 __int64 *v17; // x0 _DWORD *v18; // x0 char *v19; // x8 _DWORD *v20; // x0 unsigned int v21; // w8 unsigned int v22; // w9 __int64 v24; // x0 __int64 *v25; // x9 __int64 *v26; // x8 __int64 v28; // x20 __int64 v29; // [xsp+0h] [xbp-50h] BYREF int v30; // [xsp+Ch] [xbp-44h] BYREF if ( *(_QWORD *)(a1 + 240) ) { if ( !a5 ) goto LABEL_8; } else { v14 = (char *)sub_1004B14F8( *((__int64 **)off_1008524C8 + 54), 112, (char)"/opt/teamcity-agent/work/570ad728b1678096/core_api/src/fmod_soundi.cpp", 2224, 0); *(_QWORD *)(a1 + 240) = v14; if ( !v14 ) return 38; *(_QWORD *)(a1 + 248) = v14 + 56; *((_DWORD *)v14 + 6) = -1; *((_QWORD *)v14 + 1) = v14 + 56; *((_QWORD *)v14 + 2) = 0; *((_DWORD *)v14 + 20) = -1; *((_QWORD *)v14 + 8) = v14; *((_QWORD *)v14 + 9) = 0; *((_DWORD *)v14 + 11) = 0; *(_QWORD *)(v14 + 28) = 0; *((_DWORD *)v14 + 25) = -1; *(_QWORD *)(v14 + 84) = 0; *((_QWORD *)v14 + 7) = v14; *(_QWORD *)v14 = v14 + 56; if ( !a5 ) goto LABEL_8; } v15 = (_DWORD *)*a5; if ( *a5 ) { v15[6] = -1; *(_QWORD *)v15 = v15; *((_QWORD *)v15 + 1) = v15; *((_QWORD *)v15 + 2) = 0; v16 = 1; goto LABEL_15; } LABEL_8: v17 = *((__int64 **)off_1008524C8 + 54); if ( a4 ) { v18 = sub_1004B11FC( v17, 312, (char)"/opt/teamcity-agent/work/570ad728b1678096/core_api/src/fmod_soundi.cpp", 2261, 0, 0); if ( v18 ) { v15 = v18; v18[6] = -1; *(_QWORD *)v18 = v18; *((_QWORD *)v18 + 1) = v18; *((_QWORD *)v18 + 2) = 0; v19 = (char *)(v18 + 14); goto LABEL_13; } return 38; } v20 = sub_1004B11FC( v17, 56, (char)"/opt/teamcity-agent/work/570ad728b1678096/core_api/src/fmod_soundi.cpp", 2270, 0, 0); if ( !v20 ) return 38; v15 = v20; v19 = nullptr; v20[6] = -1; *(_QWORD *)v20 = v20; *((_QWORD *)v20 + 1) = v20; *((_QWORD *)v20 + 2) = 0; LABEL_13: *(_QWORD *)(v15 + 7) = v19; v16 = 0; if ( a5 ) *a5 = v15; LABEL_15: v15[13] = v16; if ( a3 == 1 ) { a2 = (unsigned int)(float)((float)((float)a2 / 1000.0) * *(float *)(a1 + 108)); } else if ( a3 != 2 ) { if ( a3 != 4 ) return 31; v21 = *(_DWORD *)(a1 + 104); if ( !v21 ) { a2 = 0; if ( !a4 ) goto LABEL_27; goto LABEL_25; } v22 = *(_DWORD *)(a1 + 40) - 1; if ( v22 <= 4 ) { a2 = (unsigned int)(8 * (unsigned __int64)a2 / qword_10064B368[v22]) / v21; if ( !a4 ) goto LABEL_27; goto LABEL_25; } } if ( !a4 ) goto LABEL_27; LABEL_25: v24 = *(_QWORD *)(v15 + 7); if ( v24 ) sub_1004C6BD0(v24, a4, 256); LABEL_27: v15[11] = a2; v25 = *(__int64 **)(a1 + 248); v26 = **(__int64 ***)(a1 + 240); while ( *((_DWORD *)v26 + 6) <= a2 ) { v26 = (__int64 *)*v26; if ( (__int64 *)v26[1] == v25 ) { v15[6] = a2; *((_QWORD *)v15 + 1) = v25[1]; v26 = v25; goto LABEL_32; } } v15[6] = a2; *((_QWORD *)v15 + 1) = v26[1]; LABEL_32: *(_QWORD *)v15 = v26; v26[1] = (__int64)v15; **((_QWORD **)v15 + 1) = v15; if ( a6 == -1 ) a6 = *(_DWORD *)(a1 + 192); *((_WORD *)v15 + 24) = a6; *(_QWORD *)(v15 + 9) = a1; ++*(_DWORD *)(a1 + 228); if ( a7 ) { v30 = 0; if ( !(*(unsigned int (__fastcall **)(__int64, int *))(*(_QWORD *)a1 + 232LL))(a1, &v30) && v30 >= 1 ) { v28 = 0; do { if ( !(*(unsigned int (__fastcall **)(__int64, __int64, __int64 *))(*(_QWORD *)a1 + 240LL))(a1, v28, &v29) ) *(_WORD *)(v29 + 50) = v28; v28 = (unsigned int)(v28 + 1); } while ( (int)v28 < v30 ); } } return 0; }
GD Web Decomp Icon

GD Web Decomp

Raw Source