//
// RAND_get_rand_method from 0x829eec to 0x829f48 (92 bytes)
//
// 7 xrefs:
// > rand_cleanup_int @ 0x829fb4
// > RAND_seed @ 0x829fe8
// > RAND_add @ 0x82a024
// > RAND_bytes @ 0x82a060
// > RAND_pseudo_bytes @ 0x82a09c
// > RAND_status @ 0x82a0d0
// > ??> @ 0x6606c
//
// 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
//
int RAND_get_rand_method()
{
int result; // r0
int default_RAND; // r0
int v2; // r5
result = dword_AD4520;
if ( !dword_AD4520 )
{
default_RAND = ENGINE_get_default_RAND();
v2 = default_RAND;
if ( default_RAND )
{
result = ENGINE_get_RAND(default_RAND);
dword_AD4520 = result;
if ( result )
{
dword_AD451C = v2;
return result;
}
default_RAND = ENGINE_finish(v2);
}
result = RAND_OpenSSL(default_RAND);
dword_AD4520 = result;
}
return result;
}