//
// CRYPTO_realloc from 0x80e52c to 0x80e5c0 (148 bytes)
//
// 29 xrefs:
// > SSL_CTX_dane_mtype_set @ 0x796620
// > SSL_CTX_dane_mtype_set @ 0x796648
// > SSL_CTX_use_serverinfo @ 0x79cf28
// > SSL_CTX_use_serverinfo_file @ 0x79d238
// > SSL_CTX_add_server_custom_ext @ 0x7ad494
// > SSL_CTX_add_client_custom_ext @ 0x7ad5ec
// > ASN1_STRING_set @ 0x7c2b18
// > sub_7CCAAC @ 0x7ccbb4
// > sub_7CCC68 @ 0x7cd558
// > sub_7CD900 @ 0x7cdbd4
// > sub_7CD900 @ 0x7cde24
// > BUF_MEM_grow @ 0x7d8ce0
// > ERR_add_error_vdata @ 0x7fb5b4
// > OPENSSL_LH_insert @ 0x80c5a8
// > OPENSSL_LH_delete @ 0x80c83c
// > CRYPTO_realloc @ 0x80e560
// > sub_817860 @ 0x8179fc
// > OPENSSL_sk_insert @ 0x838790
// > sub_858480 @ 0x8586e0
// > sub_858480 @ 0x85885c
// > sub_858480 @ 0x858908
// > a2i_ASN1_STRING @ 0x867374
// > ??> @ 0x5ba0c
// > CRYPTO_realloc @ 0x80e53c
// > CRYPTO_realloc @ 0x80e540
// > CRYPTO_set_mem_functions @ 0x80e5fc
// > CRYPTO_get_mem_functions @ 0x80e688
// > ??> @ 0xab863c
// > ??> @ 0xac0e18
//
// 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 CRYPTO_realloc(void *a1, void *a2, int a3, int a4)
{
bool v4; // zf
v4 = off_AC0E18 == nullptr;
if ( off_AC0E18 )
v4 = (char *)off_AC0E18 == (char *)CRYPTO_realloc;
if ( !v4 )
return (void *)((int (__fastcall *)(void *, void *, int, int))off_AC0E18)(a1, a2, a3, a4);
if ( !a1 )
return CRYPTO_malloc(a2, a3, a4);
if ( a2 )
{
dword_AC0E0C = 0;
return realloc(a1, (size_t)a2);
}
else
{
CRYPTO_free(a1, a3, a4);
return a2;
}
}