//
// sub_C15EB4 from 0xc15eb4 to 0xc15fa8 (244 bytes)
//
// 1 xrefs:
// > jpeg_std_error @ 0xc16074
//
// 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_C15EB4(__int64 *a1, char *s)
{
__int64 v2; // x8
int v4; // w2
__int64 v5; // x3
int v6; // w1
const char *v7; // x1
const char *i; // x4
const char **v10; // x1
v2 = *a1;
v4 = *(_DWORD *)(v2 + 40);
if ( v4 <= 0 || v4 > *(_DWORD *)(v2 + 144) )
{
v5 = *(_QWORD *)(v2 + 152);
if ( v5 )
{
v6 = *(_DWORD *)(v2 + 160);
if ( v4 >= v6 && v4 <= *(_DWORD *)(v2 + 164) )
{
v7 = *(const char **)(v5 + 8LL * (v4 - v6));
if ( v7 )
goto LABEL_7;
}
}
goto LABEL_16;
}
v7 = *(const char **)(*(_QWORD *)(v2 + 136) + 8LL * v4);
if ( !v7 )
{
LABEL_16:
v10 = *(const char ***)(v2 + 136);
*(_DWORD *)(v2 + 44) = v4;
v7 = *v10;
}
LABEL_7:
for ( i = v7; ; ++i )
{
if ( !*i )
return sprintf(
s,
v7,
*(unsigned int *)(v2 + 44),
*(unsigned int *)(v2 + 48),
*(unsigned int *)(v2 + 52),
*(unsigned int *)(v2 + 56),
*(unsigned int *)(v2 + 60),
*(unsigned int *)(v2 + 64),
*(_DWORD *)(v2 + 68),
*(_DWORD *)(v2 + 72));
if ( *i == 37 )
break;
}
if ( i[1] != 115 )
return sprintf(
s,
v7,
*(unsigned int *)(v2 + 44),
*(unsigned int *)(v2 + 48),
*(unsigned int *)(v2 + 52),
*(unsigned int *)(v2 + 56),
*(unsigned int *)(v2 + 60),
*(unsigned int *)(v2 + 64),
*(_DWORD *)(v2 + 68),
*(_DWORD *)(v2 + 72));
return sprintf(s, v7, v2 + 44);
}