//
// png_malloc_base from 0x652038 to 0x652050 (24 bytes)
//
// 21 xrefs:
// > png_create_info_struct @ 0x64d454
// > png_info_init_3 @ 0x64d49c
// > png_malloc_array @ 0x65207e
// > png_realloc_array @ 0x6520f0
// > png_malloc @ 0x65212e
// > png_malloc_default @ 0x652168
// > png_malloc_warn @ 0x652188
// > sub_65C398 @ 0x65c4ec
// > png_handle_iCCP @ 0x65d35a
// > png_handle_iCCP @ 0x65d3b2
// > png_handle_sPLT @ 0x65d63c
// > png_handle_pCAL @ 0x65ddf4
// > png_handle_sCAL @ 0x65dfaa
// > png_handle_tEXt @ 0x65e22c
// > png_handle_zTXt @ 0x65e362
// > png_handle_iTXt @ 0x65e510
// > png_read_IDAT_data @ 0x65f268
// > png_set_text_2 @ 0x66023e
// > png_set_sPLT @ 0x6605ba
// > png_set_unknown_chunks @ 0x660746
// > sub_663EF0 @ 0x663f6e
//
// 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
//
void *__fastcall png_malloc_base(int a1, size_t byte_count)
{
int (*v2)(void); // r3
if ( !byte_count )
return nullptr;
if ( a1 )
{
v2 = *(int (**)(void))(a1 + 820);
if ( v2 )
return (void *)v2();
}
return j_malloc(byte_count);
}