INT64 __fastcall RtlpCreateHeapEncoding(__int64 a1){
INT64 result;
result = *(unsigned int *)(a1 + 120);
if( (result & 2) == 0 && (*(_DWORD *)(a1 + 112) & 0x4000000) == 0 )
{
*(_DWORD *)(a1 + 136) = 0;
*(_BYTE *)(a1 + 138) = 16;
*(_DWORD *)(a1 + 124) = *(_DWORD *)(a1 + 136);
*(_DWORD *)(a1 + 136) |= ExGenRandom(1i64);
result = ExGenRandom(1i64);
*(_DWORD *)(a1 + 140) = (unsigned __int16)result;
}
return result;
}