//
// ssl_fill_hello_random from 0xfb67d4 to 0xfb6868 (148 bytes)
//
// 3 xrefs:
// > tls_construct_client_hello @ 0xfc71c8
// > tls_process_client_hello @ 0xfcf204
// > ??> @ 0x41a28
//
// 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:15:15 +0000
//
__int64 __fastcall ssl_fill_hello_random(__int64 a1, int a2, _BYTE *a3, int a4)
{
unsigned __int64 v4; // x0
int v7; // w0
if ( a4 <= 3 )
return 0;
v4 = *(unsigned int *)(a1 + 488);
if ( !a2 )
{
if ( ((v4 >> 5) & 1) == 0 )
return RAND_bytes(a3, (unsigned int)a4);
LABEL_7:
v7 = time(nullptr);
a3[3] = v7;
*a3 = HIBYTE(v7);
a3[1] = BYTE2(v7);
a3[2] = BYTE1(v7);
return RAND_bytes(a3 + 4, (unsigned int)(a4 - 4));
}
if ( ((v4 >> 6) & 1) != 0 )
goto LABEL_7;
return RAND_bytes(a3, (unsigned int)a4);
}