// // sub_100588DF0 from 0x100588df0 to 0x100589124 (820 bytes) // // 1 xrefs: // > sub_10058C338 @ 0x10058e5ac // // This function is hookable on this platform (idp: arm, 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 11:08:34 +0000 // __int64 __fastcall sub_100588DF0(__int64 a1, const void **a2, _WORD *a3, int a4, int a5, int a6) { __int64 result; // x0 _WORD *v8; // x22 int v10; // w21 __int64 v12; // x28 size_t v13; // x25 void *v14; // x0 unsigned int *v15; // x1 unsigned __int16 v16; // w11 int v17; // w25 unsigned int v18; // w8 __int16 v19; // w9 __int16 v20; // w10 int v21; // w14 int v22; // w12 unsigned int *v23; // x13 unsigned int v24; // w16 __int16 v25; // w15 unsigned int v26; // w15 unsigned int v27; // w16 unsigned int v28; // t1 unsigned int v29; // w14 unsigned int v30; // t1 int v31; // w14 unsigned int v32; // w0 unsigned int v33; // w17 bool v34; // cf unsigned int v35; // w17 _BYTE *v36; // [xsp+8h] [xbp-58h] result = 31; if ( !a2 ) return result; v8 = a3; if ( !a3 ) return result; if ( !*a2 ) return 31; v10 = a4; if ( !a4 ) return 0; v36 = (_BYTE *)(a1 + 17464); v12 = a6; while ( 1 ) { v13 = *(unsigned __int16 *)*a2; *a2 = (char *)*a2 + 2; v14 = (void *)sub_1005D7364( *((_QWORD *)off_1009DA5E8 + 54), (unsigned int)(2 * v13), "/opt/teamcity-agent/work/570ad728b1678096/core_api/src/fmod_codec_it.cpp", 192, 0, 0, 1); *(_QWORD *)(a1 + 17448) = v14; if ( !v14 ) return 38; memcpy(v14, *a2, v13); *a2 = (char *)*a2 + v13; v15 = *(unsigned int **)(a1 + 17448); *(_QWORD *)(a1 + 17456) = v15; *v36 = 32; v16 = v10 >= 0x4000 ? 0x4000 : v10; v17 = v16; if ( v16 ) break; LABEL_43: if ( v15 ) { sub_1005D7AD8( *((_QWORD *)off_1009DA5E8 + 54), v15, "/opt/teamcity-agent/work/570ad728b1678096/core_api/src/fmod_codec_it.cpp", 223, 1); *(_QWORD *)(a1 + 17448) = 0; } v10 -= v17; if ( !v10 ) return 0; } v18 = 0; v19 = 0; v20 = 0; v21 = 17; v22 = 32; v23 = v15; while ( 1 ) { v26 = (unsigned __int8)v21; if ( (unsigned __int8)v21 <= (unsigned int)(unsigned __int8)v22 ) { v24 = *v23 & ~(-1 << v21); *v23 >>= v21; v22 -= v21; } else { v27 = *v23; v28 = v23[1]; *(_QWORD *)(a1 + 17456) = ++v23; v24 = ((v28 & ~(-1 << (v21 - v22))) << v22) | v27; *v23 = v28 >> (v21 - v22); v22 = 32 - ((unsigned __int8)v21 - (unsigned __int8)v22); } if ( (unsigned __int8)v21 <= 6u ) { if ( v24 != (unsigned int)(1LL << ((unsigned __int8)v21 - 1)) ) goto LABEL_13; if ( (unsigned __int8)v22 >= 4u ) { v31 = *v23 & 0xF; *v23 >>= 4; v22 -= 4; } else { v29 = *v23; v30 = v23[1]; *(_QWORD *)(a1 + 17456) = ++v23; v31 = ((v30 & ~(-1 << (4 - v22))) << v22) | v29; *v23 = v30 >> (4 - v22); v22 = (unsigned __int8)v22 + 28; } if ( v31 + 1 < v26 ) v21 = v31 + 1; else v21 = v31 + 2; goto LABEL_18; } if ( (unsigned __int8)v21 > 0x10u ) break; v32 = 0xFFFFu >> (17 - v21); v33 = (unsigned __int16)(v32 - 8); v34 = v24 >= v33; v35 = v24 - v33; if ( v35 == 0 || !v34 || v24 > (unsigned __int16)(v32 + 8) ) { if ( (unsigned __int8)v21 <= 0xFu ) LABEL_13: v24 = (__int16)(v24 << (16 - v21)) >> (16 - v21); LABEL_14: v20 += v24; v19 += v20; if ( a5 ) v25 = v19; else v25 = v20; v8 += v12; *v8 = v25; ++v18; goto LABEL_18; } if ( v35 < (unsigned __int8)v21 ) v21 = v35; else v21 = v35 + 1; LABEL_18: if ( v18 >= v16 ) { *v36 = v22; goto LABEL_43; } } if ( (unsigned __int8)v21 == 17 ) { if ( (v24 & 0x10000) == 0 ) goto LABEL_14; v21 = v24 + 1; goto LABEL_18; } *v36 = v22; if ( v15 ) { sub_1005D7AD8( *((_QWORD *)off_1009DA5E8 + 54), v15, "/opt/teamcity-agent/work/570ad728b1678096/core_api/src/fmod_codec_it.cpp", 223, 1); *(_QWORD *)(a1 + 17448) = 0; } return 19; }
GD Web Decomp Icon

GD Web Decomp

Raw Source