//
// jpeg_write_marker from 0x666f7c to 0x666fce (82 bytes)
//
// 0 xrefs:
//
// 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
//
int __fastcall jpeg_write_marker(_DWORD *a1, int a2, unsigned __int8 *a3, int a4)
{
int result; // r0
int (__fastcall *i)(_DWORD *, int); // r7
int v10; // t1
if ( a1[66] || (unsigned int)(a1[5] - 101) > 2 )
{
*(_DWORD *)(*a1 + 20) = 21;
*(_DWORD *)(*a1 + 24) = a1[5];
(*(void (__fastcall **)(_DWORD *))*a1)(a1);
}
result = (*(int (__fastcall **)(_DWORD *, int, int))(a1[102] + 20))(a1, a2, a4);
for ( i = *(int (__fastcall **)(_DWORD *, int))(a1[102] + 24); a4; --a4 )
{
v10 = *a3++;
result = i(a1, v10);
}
return result;
}