// // sub_BEAE04 from 0xbeae04 to 0xbeaf94 (400 bytes) // // 6 xrefs: // > png_write_iCCP @ 0xbec254 // > png_write_sPLT @ 0xbec450 // > png_write_tEXt @ 0xbecffc // > png_write_zTXt @ 0xbed18c // > png_write_iTXt @ 0xbed388 // > png_write_pCAL @ 0xbed8ec // // 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_BEAE04(__int64 a1, char *a2, _BYTE *a3) { char *v5; // x4 int v6; // w6 int v7; // w3 unsigned int v8; // w5 unsigned int v9; // w0 bool v10; // cc unsigned __int8 v11; // w1 unsigned int v12; // w19 unsigned int v14; // w19 int v15; // [xsp+38h] [xbp+38h] _BYTE v16[256]; // [xsp+40h] [xbp+40h] BYREF if ( a2 ) { v5 = a2; v6 = 1; v7 = 0; v8 = 0; LABEL_3: v9 = (unsigned __int8)*v5; v10 = v8 > 0x4E; v11 = v9 - 33; if ( *v5 ) { while ( !v10 ) { ++v5; if ( v11 <= 0x5Du || v9 > 0xA0 ) { *a3 = v9; ++v8; ++a3; v6 = 0; goto LABEL_3; } if ( v6 ) { v6 = 1; if ( !v7 ) v7 = v9; goto LABEL_3; } *a3 = 32; if ( v9 != 32 ) v7 = v9; ++v8; v9 = (unsigned __int8)*v5; ++a3; v6 = 1; v10 = v8 > 0x4E; v11 = v9 - 33; if ( !*v5 ) break; } } if ( v6 && v8 ) { --v8; --a3; if ( !v7 ) v7 = 32; } *a3 = 0; v12 = 0; if ( !v8 ) return v12; if ( *v5 ) { v14 = v8; png_warning(a1, "keyword truncated"); return v14; } else { v12 = v8; if ( !v7 ) return v12; v15 = v7; png_warning_parameter((unsigned __int64)v16, 1, a2); png_warning_parameter_signed((unsigned __int64)v16, 2, 4, v15); png_formatted_warning(a1, (__int64)v16, "keyword \"@1\": bad character '0x@2'"); return v12; } } else { *a3 = 0; return 0; } }
GD Web Decomp Icon

GD Web Decomp

Raw Source