//
// RAND_set_rand_engine from 0x829f50 to 0x829fac (92 bytes)
//
// 1 xrefs:
// > ??> @ 0x6608c
//
// 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 __fastcall RAND_set_rand_engine(_DWORD *a1)
{
int result; // r0
int RAND; // r4
if ( !a1 )
{
RAND = 0;
LABEL_4:
RAND_set_rand_method(RAND);
dword_AD451C = (int)a1;
return 1;
}
result = ENGINE_init(a1);
if ( !result )
return result;
RAND = ENGINE_get_RAND((int)a1);
if ( RAND )
goto LABEL_4;
ENGINE_finish((int)a1);
return 0;
}