//
// EC_POINT_point2hex from 0xe34f28 to 0xe35014 (236 bytes)
//
// 1 xrefs:
// > ??> @ 0xa8f48
//
// 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 EC_POINT_point2hex(__int64 a1, _QWORD *a2, __int64 a3)
{
__int64 result; // x0
__int64 v4; // x19
void *v5; // x20
_BYTE *v6; // x0
_BYTE *v7; // x21
char *v8; // x3
_BYTE *v9; // x4
char *v10; // x7
int v11; // t1
char *v12; // [xsp+48h] [xbp+48h] BYREF
v12 = nullptr;
result = EC_POINT_point2buf(a1, a2, a3, (__int64 *)&v12);
v4 = result;
if ( result )
{
v5 = (void *)(2 * (result + 1));
v6 = CRYPTO_malloc(v5, (__int64)"crypto/ec/ec_print.c", 86);
v7 = v6;
if ( v6 )
{
v8 = v12;
v9 = v6;
v10 = &v12[v4];
do
{
v11 = (unsigned __int8)*v8++;
*v9 = a0123456789abcd[v11 >> 4];
v9 += 2;
*(v9 - 1) = a0123456789abcd[v11 & 0xF];
}
while ( v8 != v10 );
*((_BYTE *)v5 + (_QWORD)v6 - 2) = 0;
CRYPTO_free(v12, (__int64)"crypto/ec/ec_print.c", 100);
return (__int64)v7;
}
else
{
CRYPTO_free(v12, (__int64)"crypto/ec/ec_print.c", 88);
return 0;
}
}
return result;
}