//
// png_formatted_warning from 0xe430a8 to 0xe43214 (364 bytes)
//
// 2 xrefs:
// > sub_E60FC4 @ 0xe61120
// > ??> @ 0x725b0
//
// 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 13:10:03 +0000
//
__int64 __fastcall png_formatted_warning(__int64 a1, __int64 a2, unsigned __int8 *a3)
{
unsigned __int64 v3; // x4
int v4; // w3
__int64 v6; // x7
__int64 v7; // x3
char *v8; // x3
unsigned __int64 v9; // x7
char v10[192]; // [xsp+28h] [xbp+28h] BYREF
v3 = 0;
do
{
v4 = *a3;
if ( !*a3 )
break;
if ( v4 == 64 && a2 )
{
v4 = a3[1];
if ( a3[1] )
{
switch ( v4 )
{
case '1':
v6 = 32;
v7 = 0;
goto LABEL_20;
case '2':
v6 = 64;
v7 = 32;
goto LABEL_20;
case '3':
v6 = 96;
v7 = 64;
goto LABEL_20;
case '4':
v6 = 128;
v7 = 96;
goto LABEL_20;
case '5':
v6 = 160;
v7 = 128;
goto LABEL_20;
case '6':
v6 = 192;
v7 = 160;
goto LABEL_20;
case '7':
v6 = 224;
v7 = 192;
goto LABEL_20;
case '8':
v6 = 256;
v7 = 224;
LABEL_20:
v8 = (char *)(a2 + v7);
v9 = a2 + v6;
do
{
if ( !*v8 )
break;
if ( v9 <= (unsigned __int64)v8 )
break;
v10[v3++] = *v8++;
}
while ( v3 != 191 );
a3 += 2;
continue;
}
++a3;
}
else
{
LOBYTE(v4) = 64;
}
}
v10[v3] = v4;
++a3;
++v3;
}
while ( v3 <= 0xBE );
v10[v3] = 0;
png_warning(a1, v10);
return _stack_chk_guard;
}