//
// ssl_fill_hello_random from 0x9a396c to 0x9a39e4 (120 bytes)
//
// 3 xrefs:
// > tls_construct_client_hello @ 0x9b539c
// > tls_process_client_hello @ 0x9bde18
// > ??> @ 0x7485c
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:06:49 +0000
//
int __fastcall ssl_fill_hello_random(int a1, int a2, _BYTE *a3, int a4)
{
unsigned int v4; // r12
unsigned int v5; // r12
time_t v8; // r0
if ( a4 <= 3 )
return 0;
v4 = *(_DWORD *)(a1 + 304);
if ( a2 )
v5 = v4 >> 6;
else
v5 = v4 >> 5;
if ( (v5 & 1) == 0 )
return RAND_bytes(a3, a4);
v8 = time(nullptr);
a3[3] = v8;
*a3 = HIBYTE(v8);
a3[1] = BYTE2(v8);
a3[2] = BYTE1(v8);
return RAND_bytes(a3 + 4, a4 - 4);
}